|
@@ -18,7 +18,6 @@ context('Module pages', () => {
|
|
|
it('should render data form', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/index/add/');
|
|
|
-
|
|
|
cy.get('.data-form.index-add input[type=text]').should('have.length', 4);
|
|
|
cy.get('.data-form.index-add textarea').should('have.length', 2);
|
|
|
cy.get('.data-form.index-add input[type=checkbox]').should('have.length', 1);
|
|
@@ -30,7 +29,6 @@ context('Module pages', () => {
|
|
|
cy.visit('http://localhost:8080/cp/index/add/');
|
|
|
cy.get('#add-edit-button').click();
|
|
|
cy.actionWait();
|
|
|
-
|
|
|
cy.get('.data-form.index-add div.sys-messages').should('exist');
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
@@ -38,7 +36,6 @@ context('Module pages', () => {
|
|
|
it('should add new page', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/index/add/');
|
|
|
-
|
|
|
cy.get('.data-form.index-add input[name=name]').clear().type('Some test page');
|
|
|
cy.get('.data-form.index-add textarea[name=content]').clear().type('Some test content');
|
|
|
cy.get('.data-form.index-add input[name=meta_title]').clear().type('Page meta title');
|
|
@@ -50,7 +47,7 @@ context('Module pages', () => {
|
|
|
cy.logoutCMS();
|
|
|
});
|
|
|
|
|
|
- it('should render added page', () => {
|
|
|
+ it('should render added page in list', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/');
|
|
|
cy.get('table#cp-table-pages tbody tr').should('have.length', 4);
|
|
@@ -59,6 +56,20 @@ context('Module pages', () => {
|
|
|
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.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');
|
|
|
+ cy.get('.data-form.index-modify input[name=meta_title]').should('have.value', 'Page meta title');
|
|
|
+ cy.get('.data-form.index-modify input[name=meta_keywords]').should('have.value', 'Page meta keywords');
|
|
|
+ cy.get('.data-form.index-modify textarea[name=meta_description]').should('have.value', 'Page meta description');
|
|
|
+ cy.get('.data-form.index-modify input[name=active]').should('be.checked');
|
|
|
+ cy.logoutCMS();
|
|
|
+ });
|
|
|
+
|
|
|
it('should delete added page', () => {
|
|
|
cy.loginCMS();
|
|
|
cy.visit('http://localhost:8080/cp/');
|