diff --git a/apps/remix-ide-e2e/src/commands/removeFile.ts b/apps/remix-ide-e2e/src/commands/removeFile.ts
index 512f7c0c3b..89281eeb41 100644
--- a/apps/remix-ide-e2e/src/commands/removeFile.ts
+++ b/apps/remix-ide-e2e/src/commands/removeFile.ts
@@ -34,13 +34,19 @@ function removeFile (browser: NightwatchBrowser, path: string, done: VoidFunctio
contextMenuClick(document.querySelector('[data-path="' + path + '"]'))
}, [path], function () {
browser
- .waitForElementVisible('#menuitemdelete', 2000)
+ .waitForElementVisible('#menuitemdelete')
.click('#menuitemdelete')
- .pause(500)
- .waitForElementVisible('#modal-footer-ok', 2000)
- .click('#modal-footer-ok')
- .waitForElementNotPresent('[data-path="' + path + '"]')
+ .pause(2000)
.perform(() => {
+ if (path.indexOf('browser') !== -1) {
+ browser.waitForElementVisible('[data-id="browser-modal-footer-ok-react"]')
+ .click('[data-id="browser-modal-footer-ok-react"]')
+ .waitForElementNotPresent('[data-path="' + path + '"]')
+ } else if (path.indexOf('localhost') !== -1) {
+ browser.waitForElementVisible('[data-id="localhost-modal-footer-ok-react"]')
+ .click('[data-id="localhost-modal-footer-ok-react"]')
+ .waitForElementNotPresent('[data-path="' + path + '"]')
+ }
done()
})
})
diff --git a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
index 6d59df6426..b4255ab51e 100644
--- a/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
+++ b/apps/remix-ide-e2e/src/tests/fileExplorer.test.ts
@@ -39,7 +39,7 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/5_Renamed_Contract.sol"]')
.rightClick('[data-path="browser/5_Renamed_Contract.sol"]')
.click('*[id="menuitemdelete"]')
- .waitForElementVisible('*[data-id="modalDialogContainer-react"]')
+ .waitForElementVisible('*[data-id="browserModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItembrowser/5_Renamed_Contract.sol"')
@@ -67,7 +67,7 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/Browser_E2E_Tests"]')
.rightClick('[data-path="browser/Browser_E2E_Tests"]')
.click('*[id="menuitemdelete"]')
- .waitForElementVisible('*[data-id="modalDialogContainer-react"]')
+ .waitForElementVisible('*[data-id="browserModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.waitForElementNotPresent('*[data-id="treeViewLitreeViewItembrowser/Browser_E2E_Tests"]')
@@ -80,11 +80,11 @@ module.exports = {
.pause(10000)
.waitForElementVisible('*[data-id="fileExplorerNewFilepublishToGist"]')
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
- .waitForElementVisible('*[data-id="modalDialogContainer-react"]')
+ .waitForElementVisible('*[data-id="browserModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.pause(2000)
- .waitForElementVisible('*[data-id="modalDialogContainer-react"]')
+ .waitForElementVisible('*[data-id="browserModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.pause(2000)
diff --git a/apps/remix-ide-e2e/src/tests/gist.test.ts b/apps/remix-ide-e2e/src/tests/gist.test.ts
index 9d3e8bb1db..ee9d3d128c 100644
--- a/apps/remix-ide-e2e/src/tests/gist.test.ts
+++ b/apps/remix-ide-e2e/src/tests/gist.test.ts
@@ -34,11 +34,11 @@ module.exports = {
.waitForElementVisible('*[data-id="treeViewLitreeViewItembrowser/Browser_Tests"]')
.addFile('File.sol', { content: '' }, false)
.click('*[data-id="fileExplorerNewFilepublishToGist"]')
- .waitForElementVisible('*[data-id="modalDialogContainer-react"]')
+ .waitForElementVisible('*[data-id="browserModalDialogContainer-react"]')
.pause(2000)
.click('.modal-ok')
.pause(10000)
- .getText('[data-id="modalDialogModalBody-react"]', (result) => {
+ .getText('[data-id="browserModalDialogModalBody-react"]', (result) => {
console.log(result)
const value = typeof result.value === 'string' ? result.value : null
const reg = /gist.github.com\/([^.]+)/
@@ -50,7 +50,7 @@ module.exports = {
} else {
const gistid = id[1]
browser
- .click('[data-id="modal-footer-cancel-react"]')
+ .click('[data-id="browser-modal-footer-ok-react"]')
.executeScript(`remix.loadgist('${gistid}')`)
.perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('browser/gists') } done() })
.waitForElementVisible(`[data-id="treeViewLitreeViewItembrowser/gists/${gistid}"]`)
diff --git a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx b/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
index 63e421d084..e02712a844 100644
--- a/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
+++ b/libs/remix-ui/file-explorer/src/lib/file-explorer.tsx
@@ -903,14 +903,17 @@ export const FileExplorer = (props: FileExplorerProps) => {
-