Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
add cy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danielamormocea committed Dec 27, 2021
1 parent bec1694 commit 37116ce
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions cypress/integration/block-basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,43 @@ describe('Blocks Tests', () => {
// then the page view should contain our changes
cy.contains('My Page');
cy.get('.block.image');

// header
cy.get('.header-wrapper');
cy.get('.header-image-wrapper').contains('My Add-on Page');

// footer
cy.get('.footerWrapper .footerLinkBar').contains('About us').click();

// navigation
cy.get('.navigation').contains('Countries').click();
cy.get('.menu.transition.Countries--section').contains('Austria', {force:true}).click({force:true});
cy.get('.header-image-wrapper').contains('Austria');


// search
cy.get('.navigation .search-widget').first().click();
cy.get('.navigation .search-widget form').type('News {enter}');

//news
cy.get('.ui.container').contains("News");
cy.get('.highlight').contains('News').first().click();
cy.get('.expanded.article-body');
cy.get('.article-header');
cy.get('.article-content');
cy.get('.format-text').contains('Published');

// check unauthorized
cy.visit('/logout');
cy.visit('/edit');
cy.get('.header-image-wrapper').contains('Unauthorized');

// check not found
cy.visit('/something');
cy.get('.header-image-wrapper').contains('This page does not seem to exist');

// loader
cy.get('.header .logo a').click();
cy.get('.header-wrapper .ui.loader');
});
});

0 comments on commit 37116ce

Please sign in to comment.