/// describe('VnShortcuts', () => { const modules = { item: 'a', customer: 'c', ticket: 't', claim: 'r', worker: 'w', monitor: 'm', order: 'o', supplier: 'p', entry: 'e', zone: 'z', account: 'u', }; beforeEach(() => { cy.login('developer'); cy.visit('/'); }); for (const [module, shortcut] of Object.entries(modules)) { it(`should visit ${module} module`, () => { cy.get('body').trigger('keydown', { ctrlKey: true, altKey: true, code: `Key${shortcut.toUpperCase()}`, }); cy.url().should('include', module); if (['monitor', 'claim'].includes(module)) { return; } cy.waitForElement('.q-page').should('exist'); cy.dataCy('vnTableCreateBtn').should('exist'); cy.get('.q-page').trigger('keydown', { ctrlKey: true, altKey: true, key: '+', }); cy.get('#formModel').should('exist'); }); } });