mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-03 15:05:01 -05:00
refactor(tools): fix selector type error in the footer.ts (#49259)
This commit is contained in:
@@ -1,29 +1,27 @@
|
||||
const selectors = {
|
||||
footer: '.site-footer'
|
||||
};
|
||||
const footer = '.site-footer';
|
||||
|
||||
describe('Footer', () => {
|
||||
it('Should render on landing page', () => {
|
||||
cy.visit('/');
|
||||
cy.get(selectors.footer).should('be.visible');
|
||||
cy.get(footer).should('be.visible');
|
||||
});
|
||||
|
||||
it('Should render on learn page', () => {
|
||||
cy.visit('/learn');
|
||||
cy.get(selectors.footer).should('be.visible');
|
||||
cy.get(footer).should('be.visible');
|
||||
cy.visit('/learn/');
|
||||
cy.get(selectors.footer).should('be.visible');
|
||||
cy.get(footer).should('be.visible');
|
||||
});
|
||||
|
||||
it('Should render on superblock page', () => {
|
||||
cy.visit('/learn/responsive-web-design/');
|
||||
cy.get(selectors.footer).should('be.visible');
|
||||
cy.get(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');
|
||||
cy.get(footer).should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user