From 4c86d95f21f79422d24eae3cd82785fd670ff305 Mon Sep 17 00:00:00 2001 From: Sidharth Vinod Date: Fri, 2 Sep 2022 21:04:42 +0530 Subject: [PATCH] Remove debounce --- cypress/e2e/actions.spec.ts | 3 +-- cypress/e2e/diagramUpdate.spec.ts | 2 -- cypress/e2e/history.spec.ts | 4 ++-- cypress/e2e/loadSite.spec.ts | 1 - cypress/e2e/util.ts | 2 -- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/cypress/e2e/actions.spec.ts b/cypress/e2e/actions.spec.ts index 4de9d9b2..2bda6517 100644 --- a/cypress/e2e/actions.spec.ts +++ b/cypress/e2e/actions.spec.ts @@ -1,9 +1,8 @@ -import { disableDebounce, verifyFileSize } from './util'; +import { verifyFileSize } from './util'; describe('Check actions', () => { beforeEach(() => { cy.clearLocalStorage(); cy.visit('/edit'); - disableDebounce(); }); it('should update markdown code', () => { diff --git a/cypress/e2e/diagramUpdate.spec.ts b/cypress/e2e/diagramUpdate.spec.ts index 3f7b495c..177e9a19 100644 --- a/cypress/e2e/diagramUpdate.spec.ts +++ b/cypress/e2e/diagramUpdate.spec.ts @@ -4,7 +4,6 @@ describe('Auto sync tests', () => { beforeEach(() => { cy.clearLocalStorage(); cy.visit('/'); - disableDebounce(); }); it('should dim diagram when code is edited', () => { @@ -72,7 +71,6 @@ describe.only('Pan and Zoom', () => { beforeEach(() => { cy.clearLocalStorage(); cy.visit('/'); - disableDebounce(); }); it('should toggle pan and zoom', () => { cy.get('#svg-pan-zoom-reset-pan-zoom').should('not.exist'); diff --git a/cypress/e2e/history.spec.ts b/cypress/e2e/history.spec.ts index 493ced6e..86dfa85a 100644 --- a/cypress/e2e/history.spec.ts +++ b/cypress/e2e/history.spec.ts @@ -1,11 +1,11 @@ -import { getEditor, disableDebounce, verifyFileSnapshot } from './util'; +import { getEditor, verifyFileSnapshot } from './util'; describe('Save History', () => { beforeEach(() => { cy.clock(new Date(2022, 0, 1).getTime()); cy.clearLocalStorage(); cy.visit('/edit'); - disableDebounce(); + cy.contains('Actions').click(); cy.contains('History').click(); }); diff --git a/cypress/e2e/loadSite.spec.ts b/cypress/e2e/loadSite.spec.ts index 50497339..8550581a 100644 --- a/cypress/e2e/loadSite.spec.ts +++ b/cypress/e2e/loadSite.spec.ts @@ -5,7 +5,6 @@ describe('Site Loads', () => { beforeEach(() => { cy.clearLocalStorage(); cy.visit('/'); - disableDebounce(); }); it('Check Home page load', () => { cy.url().should('include', '/edit'); diff --git a/cypress/e2e/util.ts b/cypress/e2e/util.ts index 46416037..cf0303ba 100644 --- a/cypress/e2e/util.ts +++ b/cypress/e2e/util.ts @@ -8,8 +8,6 @@ export const getEditor = ({ bottom = true, newline = false } = {}) => .type(`${bottom ? '{pageDown}' : cmd}`) .type(`${newline ? '{enter}' : cmd}`); -export const disableDebounce = () => cy.setLocalStorage('noDebounce', 'true'); - const downloadsFolder = Cypress.config('downloadsFolder'); export const verifyFileSize = (