|
@@ -51,15 +51,15 @@ context('Module pages', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/');
|
|
|
cy.get('table#cp-table-pages tbody tr').should('have.length', 4);
|
|
|
- cy.get('table#cp-table-pages tbody tr:nth-child(1) td:nth-child(1)').should('contain', 'Some test page');
|
|
|
- cy.get('table#cp-table-pages tbody tr:nth-child(1) td:nth-child(3) .svg-green').should('exist');
|
|
|
+ cy.get('table#cp-table-pages tbody tr td').should('contain', 'Some test page');
|
|
|
+ cy.contains('table#cp-table-pages tbody tr td a', 'Some test page').parentsUntil('tr').parent().find('.svg-green').should('exist');
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
|
it('should render added page in edit form', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/');
|
|
|
- cy.contains('table#cp-table-pages tbody tr:nth-child(1) td a', 'Some test page').click();
|
|
|
+ cy.contains('table#cp-table-pages tbody tr td a', 'Some test page').click();
|
|
|
cy.get('.data-form.index-modify input[name=name]').should('have.value', 'Some test page');
|
|
|
cy.get('.data-form.index-modify input[name=alias]').should('have.value', '/some-test-page/');
|
|
|
cy.get('.data-form.index-modify textarea[name=content]').should('have.value', 'Some test content');
|
|
@@ -73,9 +73,7 @@ context('Module pages', () => {
|
|
|
it('should delete added page', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/');
|
|
|
- cy.contains('table#cp-table-pages tbody tr td a', 'Some test page').parentsUntil('tr').parent().within(() => {
|
|
|
- cy.get('td a.ico.delete').click();
|
|
|
- });
|
|
|
+ cy.contains('table#cp-table-pages tbody tr td a', 'Some test page').parentsUntil('tr').parent().find('td a.ico.delete').click();
|
|
|
cy.actionWait();
|
|
|
cy.get('table#cp-table-pages tbody tr').should('have.length', 3);
|
|
|
cy.logoutCMS();
|