mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-11 01:43:23 +01:00
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
/// <reference types="cypress" />
|
|
|
|
describe('Maps Page', () => {
|
|
beforeEach(() => {
|
|
cy.visit('/c/maps');
|
|
cy.waitForPageLoaded();
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
|
});
|
|
|
|
it('should match the snapshot', () => {
|
|
cy.matchImageSnapshot('maps');
|
|
});
|
|
});
|
|
|
|
context('iphone-5 resolution', () => {
|
|
beforeEach(() => {
|
|
cy.viewport('iphone-5');
|
|
cy.visit('/c/maps');
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
|
});
|
|
|
|
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);
|
|
});
|
|
|
|
it('should match the snapshot', () => {
|
|
cy.matchImageSnapshot('maps-iphone-5');
|
|
});
|
|
});
|
|
|
|
context('720p resolution', () => {
|
|
beforeEach(() => {
|
|
cy.viewport(1280, 720);
|
|
cy.visit('/c/maps');
|
|
cy.get('.MuiCard-root').should('have.length', 3);
|
|
});
|
|
|
|
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');
|
|
});
|
|
|
|
it('should match the snapshot', () => {
|
|
cy.matchImageSnapshot('maps-720p-resolution');
|
|
});
|
|
});
|