|
@@ -8,10 +8,10 @@ context('Module blog categories', () => {
|
|
|
it('should render data table', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.get('table#cp-table-blog_cats thead tr').should('have.length', 1);
|
|
|
- cy.get('table#cp-table-blog_cats thead tr th').should('have.length', 2);
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr').should('have.length', 11);
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr:nth-child(1) td').should('have.length', 2);
|
|
|
+ cy.get('table.data-table thead tr').should('have.length', 1);
|
|
|
+ cy.get('table.data-table thead tr th').should('have.length', 2);
|
|
|
+ cy.get('table.data-table tbody tr').should('have.length', 11);
|
|
|
+ cy.get('table.data-table tbody tr:nth-child(1) td').should('have.length', 2);
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
@@ -44,15 +44,15 @@ context('Module blog categories', () => {
|
|
|
it('should render added category in list', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr').should('have.length', 12);
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr td').should('contain', 'Some test category');
|
|
|
+ cy.get('table.data-table tbody tr').should('have.length', 12);
|
|
|
+ cy.get('table.data-table tbody tr td').should('contain', 'Some test category');
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
|
it('should render added category in edit form', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.contains('table#cp-table-blog_cats tbody tr td a', 'Some test category').click();
|
|
|
+ cy.contains('table.data-table tbody tr td a', 'Some test category').click();
|
|
|
cy.get('.data-form.blog-categories-modify select[name=parent]').should('have.value', '0');
|
|
|
cy.get('.data-form.blog-categories-modify input[name=name]').should('have.value', 'Some test category');
|
|
|
cy.get('.data-form.blog-categories-modify input[name=alias]').should('have.value', 'some-test-category');
|
|
@@ -72,15 +72,15 @@ context('Module blog categories', () => {
|
|
|
it('should render added child category in list', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr').should('have.length', 13);
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr td').should('contain', '— Some test child category');
|
|
|
+ cy.get('table.data-table tbody tr').should('have.length', 13);
|
|
|
+ cy.get('table.data-table tbody tr td').should('contain', '— Some test child category');
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
|
it('should render added child category in edit form', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.contains('table#cp-table-blog_cats tbody tr td a', '— Some test child category').click();
|
|
|
+ cy.contains('table.data-table tbody tr td a', '— Some test child category').click();
|
|
|
cy.get('.data-form.blog-categories-modify select[name=parent]').find(':selected').contains('Some test category')
|
|
|
cy.get('.data-form.blog-categories-modify input[name=name]').should('have.value', 'Some test child category');
|
|
|
cy.get('.data-form.blog-categories-modify input[name=alias]').should('have.value', 'some-test-child-category');
|
|
@@ -90,22 +90,18 @@ context('Module blog categories', () => {
|
|
|
it('should delete added child category', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.contains('table#cp-table-blog_cats tbody tr td a', '— Some test child category').parentsUntil('tr').parent().within(() => {
|
|
|
- cy.get('td a.ico.delete').click();
|
|
|
- });
|
|
|
+ cy.contains('table.data-table tbody tr td a', '— Some test child category').parentsUntil('tr').parent().find('td a.ico.delete').click();
|
|
|
cy.actionWait();
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr').should('have.length', 12);
|
|
|
+ cy.get('table.data-table tbody tr').should('have.length', 12);
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
|
it('should delete added category', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/blog/categories/');
|
|
|
- cy.contains('table#cp-table-blog_cats tbody tr td a', 'Some test category').parentsUntil('tr').parent().within(() => {
|
|
|
- cy.get('td a.ico.delete').click();
|
|
|
- });
|
|
|
+ cy.contains('table.data-table tbody tr td a', 'Some test category').parentsUntil('tr').parent().find('td a.ico.delete').click();
|
|
|
cy.actionWait();
|
|
|
- cy.get('table#cp-table-blog_cats tbody tr').should('have.length', 11);
|
|
|
+ cy.get('table.data-table tbody tr').should('have.length', 11);
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
});
|