test: Ignore monaco internal error.

This commit is contained in:
Sidharth Vinod
2023-09-26 12:11:48 +05:30
parent 8cb7bffc28
commit bb526e1534
2 changed files with 7 additions and 4 deletions
+4 -1
View File
@@ -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();
});
+3 -3
View File
@@ -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);
});
};