feat: improve ui/ux learn map (#40579)

Co-authored-by: Kris Koishigawa <scissorsneedfoodtoo@gmail.com>
This commit is contained in:
Tom
2021-01-13 07:09:45 -06:00
committed by Mrugesh Mohapatra
parent 14ca6beb0a
commit 625469c82f
45 changed files with 3297 additions and 965 deletions

View File

@ -0,0 +1,38 @@
/* global cy */
const selectors = {
firstBlock: ':nth-child(1) > .block > .map-title'
};
describe('Certificate intro page', () => {
before(() => {
cy.clearCookies();
cy.login();
cy.visit('/learn/responsive-web-design');
});
it('Should render', () => {
cy.title().should('eq', 'Responsive Web Design | freeCodeCamp.org');
});
it('Should have certificate intro text', () => {
cy.contains(
"In the 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');
});
});