diff --git a/apps/remix-ide-e2e/src/commands/addFile.ts b/apps/remix-ide-e2e/src/commands/addFile.ts index 2f1dc0c73a..12b11b6520 100644 --- a/apps/remix-ide-e2e/src/commands/addFile.ts +++ b/apps/remix-ide-e2e/src/commands/addFile.ts @@ -30,7 +30,7 @@ function addFile (browser: NightwatchBrowser, name: string, content: NightwatchC .sendKeys('*[data-id$="/blank"] .remixui_items', browser.Keys.ENTER) // .pause(2000) .waitForElementVisible(`li[data-id="treeViewLitreeViewItem${name}"]`, 60000) - .setEditorValue(content.content).pause(5000) + .setEditorValue(content.content).pause(10000) // .pause(1000) .perform(function () { done() diff --git a/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts index c6aa51474c..1e3772e477 100644 --- a/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityImport.spec.ts @@ -17,7 +17,7 @@ module.exports = { 'Test Success Import': function (browser: NightwatchBrowser) { browser.addFile('Untitled1.sol', sources[1]['Untitled1.sol']) - .addFile('Untitled2.sol', sources[1]['Untitled2.sol']) + .addFile('Untitled2.sol', sources[1]['Untitled2.sol']).pause(4000) .openFile('Untitled1.sol') .verifyContracts(['test6', 'test4', 'test5']) .pause(1000) diff --git a/apps/remix-ide/src/app/editor/editor.js b/apps/remix-ide/src/app/editor/editor.js index a6ea53ca9b..81067ba073 100644 --- a/apps/remix-ide/src/app/editor/editor.js +++ b/apps/remix-ide/src/app/editor/editor.js @@ -147,11 +147,12 @@ class Editor extends Plugin { if (this.saveTimeout) { window.clearTimeout(this.saveTimeout) } - this.triggerEvent('contentChanged', []) + this.saveTimeout = window.setTimeout(() => { + this.triggerEvent('contentChanged', []) this.triggerEvent('requiringToSaveCurrentfile', []) - }, 5000) + }, 500) } _switchSession (path) {