feat: render footer correctly (#42096)

Co-authored-by: Ahmad Abdolsaheb <ahmad.abdolsaheb@gmail.com>
This commit is contained in:
saeed
2021-05-24 03:00:07 +04:30
committed by GitHub
parent 4714e033c8
commit 66c5523909
2 changed files with 36 additions and 4 deletions

View File

@ -0,0 +1,31 @@
/* global cy */
const selectors = {
footer: '.site-footer'
};
describe('Footer', () => {
it('Should render on landing page', () => {
cy.visit('/');
cy.get(selectors.footer).should('be.visible');
});
it('Should render on learn page', () => {
cy.visit('/learn');
cy.get(selectors.footer).should('be.visible');
cy.visit('/learn/');
cy.get(selectors.footer).should('be.visible');
});
it('Should render on superblock page', () => {
cy.visit('/learn/responsive-web-design/');
cy.get(selectors.footer).should('be.visible');
});
it('Should not render on challenge page', () => {
cy.visit(
'/learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
);
cy.get(selectors.footer).should('not.exist');
});
});