2023-01-08 06:10:13 +01:00
|
|
|
describe('Maps Page', () => {
|
2022-07-13 03:45:36 +02:00
|
|
|
beforeEach(() => {
|
|
|
|
cy.visit('/c/maps');
|
2023-01-06 18:11:12 +01:00
|
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
2022-07-13 03:45:36 +02:00
|
|
|
});
|
2021-02-23 06:40:02 +01:00
|
|
|
|
2022-07-13 03:45:36 +02:00
|
|
|
it('should match the snapshot', () => {
|
2023-01-05 02:25:59 +01:00
|
|
|
cy.matchImageSnapshot('maps');
|
2022-07-13 03:45:36 +02:00
|
|
|
});
|
2021-02-23 08:02:15 +01:00
|
|
|
});
|
2023-01-05 01:48:01 +01:00
|
|
|
|
|
|
|
context('iphone-5 resolution', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport('iphone-5');
|
2023-01-06 18:11:12 +01:00
|
|
|
cy.visit('/c/maps');
|
|
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
2023-01-05 01:48:01 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Displays mobile menu button', () => {
|
|
|
|
cy.get('#open-main-drawer').should('be.visible');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Displays mobile menu on click', () => {
|
|
|
|
cy.get('.MuiDrawer-root').should('not.be.visible');
|
|
|
|
cy.get('#open-main-drawer').should('be.visible').click();
|
|
|
|
cy.get('.MuiDrawer-root').should('be.visible');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Displays a card list', () => {
|
|
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
|
|
|
});
|
2023-01-05 02:25:59 +01:00
|
|
|
|
|
|
|
it('should match the snapshot', () => {
|
|
|
|
cy.matchImageSnapshot('maps-iphone-5');
|
|
|
|
});
|
2023-01-05 01:48:01 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
context('720p resolution', () => {
|
|
|
|
beforeEach(() => {
|
|
|
|
cy.viewport(1280, 720);
|
|
|
|
cy.visit('/c/maps');
|
2023-01-06 18:11:12 +01:00
|
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
2023-01-05 01:48:01 +01:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Displays mobile menu button', () => {
|
|
|
|
cy.get('#open-desktop-drawer').should('be.visible');
|
|
|
|
});
|
|
|
|
|
|
|
|
it('Displays a table with maps', () => {
|
|
|
|
cy.get('.MuiTableBody-root').should('be.visible');
|
|
|
|
});
|
2023-01-05 02:25:59 +01:00
|
|
|
|
|
|
|
it('should match the snapshot', () => {
|
|
|
|
cy.matchImageSnapshot('maps-720p-resolution');
|
|
|
|
});
|
2023-01-05 01:48:01 +01:00
|
|
|
});
|