Skip to content

Commit

Permalink
Merge pull request Codeinwp#2734 from Codeinwp/dojo-cypress
Browse files Browse the repository at this point in the history
test: adds new test for homepage settings
  • Loading branch information
Augusto Cesar authored Apr 7, 2021
2 parents 11f6dd9 + 6ce2fb9 commit 37f6458
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
describe('Homepage-settings', function () {
beforeEach(function () {
cy.loginWithRequest('/wp-admin/customize.php');
cy.get('#accordion-panel-neve_layout > .accordion-section-title').click();
cy.get('#accordion-section-static_front_page > .accordion-section-title').click();
cy.get('#_customize-input-show_on_front-radio-page').click();
});

it('Sets up a page to be the homepage', function () {
cy.get('#_customize-input-page_on_front').select('Sample Page');
cy.get('#save').click({ force: true });
cy.visit('/');
cy.get('h1').should('contain.text', 'Sample Page');
});

it('Sets up a page to be the posts page', function () {
cy.get('#_customize-input-page_for_posts').select('Blog');

cy.get('#save').click({ force: true });

cy.visit('/Blog');

cy.get('.nv-index-posts');
});
});

0 comments on commit 37f6458

Please sign in to comment.