From 90bc10577e9d005e457dece8ee3f2c30c7e009cb Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Sun, 5 Sep 2021 17:33:34 +0530 Subject: [PATCH] Fix clock --- cypress/integration/history.spec.ts | 8 ++++++-- cypress/snapshots.js | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/cypress/integration/history.spec.ts b/cypress/integration/history.spec.ts index 4b40c309..36295e6b 100644 --- a/cypress/integration/history.spec.ts +++ b/cypress/integration/history.spec.ts @@ -1,10 +1,15 @@ describe('Save History', () => { + before(() => { + cy.clock(); + }); + beforeEach(() => { cy.clearLocalStorage(); cy.visit('/edit'); - cy.contains('History').click(); cy.contains('Actions').click(); + cy.contains('History').click(); }); + it('should save when clicked', () => { cy.get('#historyList').find('li').should('have.length', 0); cy.get('#historyList').contains('No items in History'); @@ -45,7 +50,6 @@ describe('Save History', () => { }); it('should auto save history', () => { - cy.clock(); cy.get('#editor').type(' C --> HistoryTest'); cy.tick(70000); cy.contains('Timeline').click(); diff --git a/cypress/snapshots.js b/cypress/snapshots.js index 8651cd02..9e680044 100644 --- a/cypress/snapshots.js +++ b/cypress/snapshots.js @@ -16,7 +16,7 @@ module.exports = { "1": "{\"code\":\"graph TD\\n A[Party] -->|Get money| B(Go shopping!!)\\n \",\"mermaid\":\"{\\n \\\"theme\\\": \\\"forest\\\",\\n \\\"test\\\": \\\"hello world\\\"\\n}\",\"updateEditor\":false,\"autoSync\":true,\"updateDiagram\":true,\"loader\":{\"type\":\"files\",\"config\":{\"codeURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/code.mmd\",\"configURL\":\"https://gist.githubusercontent.com/sidharthv96/6268a23e673a533dcb198f241fd7012a/raw/4eb03887e6a41397e80bdcdbf94017c498f8f1e2/config.json\"}}}" } }, - "__version": "8.3.0", + "__version": "8.3.1", "Auto sync tests": { "should dim diagram when code is edited": { "1": "{\"code\":\"graph TD\\n A[Christmas] -->|Get money| B(Go shopping)\\n B --> C{Let me think}\\n C -->|One| D[Laptop]\\n C -->|Two| E[iPhone]\\n C -->|Three| F[fa:fa-car Car]\\n C --> Test\",\"mermaid\":\"{\\n \\\"theme\\\": \\\"default\\\"\\n}\",\"updateEditor\":false,\"autoSync\":false,\"updateDiagram\":false}"