diff --git a/cypress/e2e/history.spec.ts b/cypress/e2e/history.spec.ts index ba5073ca..8db8ccfa 100644 --- a/cypress/e2e/history.spec.ts +++ b/cypress/e2e/history.spec.ts @@ -5,7 +5,10 @@ describe('Save History', () => { cy.clock(new Date(2022, 0, 1).getTime()); cy.clearLocalStorage(); cy.visit('/edit'); - + cy.on('uncaught:exception', (error) => { + // Skip the error from inside monaco. + return !error.message.includes('duration'); + }); cy.contains('History').click(); }); diff --git a/cypress/e2e/util.ts b/cypress/e2e/util.ts index 57a9f54b..749acbc1 100644 --- a/cypress/e2e/util.ts +++ b/cypress/e2e/util.ts @@ -13,12 +13,12 @@ export const typeInEditor = ( cy.get('#editor').click(); cy.get('#editor').within(($editor) => { if (bottom) { - cy.get('textarea').type('{pageDown}', { force: true }); + cy.get('textarea').type('{pageDown}'); } if (newline) { - cy.get('textarea').type('{enter}', { force: true }); + cy.get('textarea').type('{enter}'); } - cy.get('textarea').type(text, { force: true }); + cy.get('textarea').type(text); }); };