* feat: let users save cert project code to db fix: move getChallenges call out of request function so it only runs once fix: use FlashMessages enum fix: transform challengeFiles earlier test: make tribute page use multifile editor stuff I was playing with - revert this to get it to a working state refactor: allow undefined editableRegionBoundaries fix: save history history is not necessarily ["name.ext"] and using the incorrect history could cause weird bugs fix: replace files -> challengeFiles on the client refactor: DRY out ajax fix: use file -> challengefile map refactor: rename ajax types fix: alphatize flash-messages.ts revert: tribute page project fix: remove logs fix: prettier fix: cypress fix: prettier fix: remove submitComplete action fix: block UI for new projects fix: handle code size * fix: catch undefined files * fix: don't default to undefined when it's already the default * fix: only update savedChallenges if applicable * fix: dehumidify backend + fine tune nearby stuff * fix: prop-types * fix: dehumidify sagas * fix: variable name * fix: types * Apply suggestions from code review Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> * fix: typo * fix: prettier * fix: props types * fix: flash messages * Update client/src/utils/challenge-request-helpers.ts Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com> * chore: rename function uniformize -> standardize * fix: flash message * fix: add link to forum on flash messages Co-authored-by: Shaun Hamilton <shauhami020@gmail.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
41 lines
1.1 KiB
JavaScript
41 lines
1.1 KiB
JavaScript
const selectors = {
|
|
firstBlock: '.block-ui > .block:nth-child(1) > .map-title'
|
|
};
|
|
|
|
describe('Certification intro page', () => {
|
|
before(() => {
|
|
cy.exec('npm run seed');
|
|
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');
|
|
});
|
|
});
|