diff --git a/cypress/e2e/editor.cy.ts b/cypress/e2e/editor.cy.ts index 913793e..d490392 100644 --- a/cypress/e2e/editor.cy.ts +++ b/cypress/e2e/editor.cy.ts @@ -10,6 +10,12 @@ describe('editor', () => { it('can render simple cube', () => { cy.visit('/', {}); + // Wait for initial rendering to finish + cy.get('button') + .contains('Render') + .find('span.MuiButton-startIcon') + .should('not.exist'); + cy.get('textarea').clear(); cy.get('textarea').type('cube([100, 20, 20]);'); cy.get('button').contains('Render').click(); @@ -88,6 +94,12 @@ describe('editor', () => { cy.visit('/', {}); + // Wait for the rendering to finish + cy.get('button') + .contains('Render') + .find('span.MuiButton-startIcon') + .should('not.exist'); + cy.get('button[aria-label="menu"]').click(); cy.get('li[role="menuitem"]').contains('Import from URL').click(); @@ -104,8 +116,8 @@ describe('editor', () => { .find('span.MuiButton-startIcon') .should('not.exist'); - // And wait for another 500ms to make sure the rendering of the canvas is finished too. - cy.wait(1000); + // And wait for another 3 seconds to make sure the rendering of the canvas is finished too. + cy.wait(3000); cy.compareSnapshot(`editor-import-${sanitizeUrl(url)}`, 0.1); }); diff --git a/cypress/snapshots/base/editor.cy.ts/editor-import-https---fossies-org-linux-privat-openscad-2021-01-src-tar-gz-openscad-2021-01-examples-Advanced-offset-scad-m-t.png b/cypress/snapshots/base/editor.cy.ts/editor-import-https---fossies-org-linux-privat-openscad-2021-01-src-tar-gz-openscad-2021-01-examples-Advanced-offset-scad-m-t.png index 09e495b..7342ead 100644 Binary files a/cypress/snapshots/base/editor.cy.ts/editor-import-https---fossies-org-linux-privat-openscad-2021-01-src-tar-gz-openscad-2021-01-examples-Advanced-offset-scad-m-t.png and b/cypress/snapshots/base/editor.cy.ts/editor-import-https---fossies-org-linux-privat-openscad-2021-01-src-tar-gz-openscad-2021-01-examples-Advanced-offset-scad-m-t.png differ diff --git a/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-12856.png b/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-12856.png index 2afa651..9155c3b 100644 Binary files a/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-12856.png and b/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-12856.png differ diff --git a/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-6196548.png b/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-6196548.png index d4075f5..f81875c 100644 Binary files a/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-6196548.png and b/cypress/snapshots/base/editor.cy.ts/editor-import-thingiverse-com-thing-6196548.png differ diff --git a/cypress/snapshots/base/editor.cy.ts/editor-text.png b/cypress/snapshots/base/editor.cy.ts/editor-text.png new file mode 100644 index 0000000..1ea8b76 Binary files /dev/null and b/cypress/snapshots/base/editor.cy.ts/editor-text.png differ diff --git a/cypress/snapshots/base/editor.cy.ts/editor.png b/cypress/snapshots/base/editor.cy.ts/editor.png index a4fe112..7a7b63b 100644 Binary files a/cypress/snapshots/base/editor.cy.ts/editor.png and b/cypress/snapshots/base/editor.cy.ts/editor.png differ