From f1cf0d3ca0d64ffb5e0b9f573736beff0b59f72b Mon Sep 17 00:00:00 2001 From: lianahus Date: Fri, 17 Mar 2023 15:21:24 +0100 Subject: [PATCH] improvement in e2e --- apps/remix-ide-e2e/src/commands/addFile.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/commands/addFile.ts b/apps/remix-ide-e2e/src/commands/addFile.ts index 7525b9be4f..192dbff665 100644 --- a/apps/remix-ide-e2e/src/commands/addFile.ts +++ b/apps/remix-ide-e2e/src/commands/addFile.ts @@ -54,7 +54,10 @@ function addFile(browser: NightwatchBrowser, name: string, content: NightwatchCo suppressNotFoundErrors: true, timeout: 60000 }) - .waitForElementContainsText('*[data-id="activeTabTitle"]', name) + .waitForElementVisible({ + selector: `//*[@data-id='activeTabTitle' and contains(., "${name}")]`, + locateStrategy: 'xpath' + }) .setEditorValue(content.content) .getEditorValue((result) => { if(result != content.content) {