feat: add cypress for e2e tests
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
60bbdd99fd
commit
7eb6351530
16
cypress/integration/landing.js
Normal file
16
cypress/integration/landing.js
Normal file
@ -0,0 +1,16 @@
|
||||
/* global cy */
|
||||
const selectors = {
|
||||
heading: "[data-test-label='landing-header']",
|
||||
callToAction: "[data-test-label='landing-big-cta']"
|
||||
};
|
||||
|
||||
describe('Landing page', function() {
|
||||
it('renders', function() {
|
||||
cy.visit('/');
|
||||
|
||||
cy.title().should('eq', 'Learn to code at home | freeCodeCamp.org');
|
||||
|
||||
cy.contains(selectors.heading, 'Welcome to freeCodeCamp.org');
|
||||
cy.contains(selectors.callToAction, "Sign in and get started (it's free)");
|
||||
});
|
||||
});
|
Reference in New Issue
Block a user