revert: (test, e2e) test suit for cypress (#42488)

This reverts commit 22b45761a7.
This commit is contained in:
Mrugesh Mohapatra
2021-06-14 23:44:43 +05:30
committed by GitHub
parent 3fc6877bb0
commit 3130265991
35 changed files with 55 additions and 367 deletions

View File

@ -0,0 +1,41 @@
/* global cy */
const selectors = {
firstBlock: '.block-ui > .block:nth-child(1) > .map-title'
};
describe('Certification intro page', () => {
before(() => {
cy.clearCookies();
cy.login();
cy.visit('/learn/responsive-web-design');
});
it('Should render', () => {
cy.title().should(
'eq',
'Responsive Web Design Certification | freeCodeCamp.org'
);
});
it('Should have certification intro text', () => {
cy.contains(
"In this Responsive Web Design Certification, you'll learn the languages that developers use to build webpages"
).should('be.visible');
});
it('First block should be expanded', () => {
cy.contains('Say Hello to HTML Elements').should('be.visible');
});
it('Second block should be closed', () => {
cy.contains('Change the Color of Text').should('not.exist');
});
it('Block should handle toggle clicks correctly', () => {
cy.get(selectors.firstBlock).click();
cy.contains('Say Hello to HTML Elements').should('not.exist');
cy.get(selectors.firstBlock).click();
cy.contains('Say Hello to HTML Elements').should('be.visible');
});
});