Merge pull request #1747 from ethereum/localhost-context-menu

Show registered context menu items for both browser and localhost
pull/1755/head
Liana Husikyan 3 years ago committed by GitHub
commit 8b650eb0d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      apps/remix-ide-e2e/src/tests/remixd.test.ts
  2. 12
      libs/remix-ui/workspace/src/lib/reducers/workspace.ts

@ -152,7 +152,6 @@ function runTests (browser: NightwatchBrowser) {
})
.clickLaunchIcon('filePanel')
.waitForElementVisible('[data-path="folder1"]')
.click('[data-path="folder1"]')
.waitForElementVisible('[data-path="folder1/contract1.sol"]')
.waitForElementVisible('[data-path="folder1/renamed_contract_' + browserName + '.sol"]') // check if renamed file is preset
.waitForElementNotPresent('[data-path="folder1/contract_' + browserName + '.sol"]') // check if renamed (old) file is not present

@ -504,11 +504,11 @@ export const browserReducer = (state = browserInitialState, action: Action) => {
...state,
browser: {
...state.browser,
contextMenu: state.mode === 'browser' ? addContextMenuItem(state, payload) : state.browser.contextMenu
contextMenu: addContextMenuItem(state, payload)
},
localhost: {
...state.localhost,
contextMenu: state.mode === 'localhost' ? addContextMenuItem(state, payload) : state.localhost.contextMenu
contextMenu: addContextMenuItem(state, payload)
}
}
}
@ -520,11 +520,11 @@ export const browserReducer = (state = browserInitialState, action: Action) => {
...state,
browser: {
...state.browser,
contextMenu: state.mode === 'browser' ? removeContextMenuItem(state, payload) : state.browser.contextMenu
contextMenu: removeContextMenuItem(state, payload)
},
localhost: {
...state.localhost,
contextMenu: state.mode === 'localhost' ? removeContextMenuItem(state, payload) : state.localhost.contextMenu
contextMenu: removeContextMenuItem(state, payload)
}
}
}
@ -536,11 +536,11 @@ export const browserReducer = (state = browserInitialState, action: Action) => {
...state,
browser: {
...state.browser,
expandPath: state.mode === 'browser' ? payload : state.browser.expandPath
expandPath: payload
},
localhost: {
...state.localhost,
expandPath: state.mode === 'localhost' ? payload : state.localhost.expandPath
expandPath: payload
}
}
}

Loading…
Cancel
Save