Merge pull request #5013 from ethereum/fixproviders

Fix providers e2e
pull/5012/head
bunsenstraat 4 months ago committed by GitHub
commit 2d34a3511e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 20
      apps/remix-ide-e2e/src/commands/pinChain.ts
  2. 1
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  3. 1
      apps/remix-ide-e2e/src/types/index.d.ts
  4. 1
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx

@ -0,0 +1,20 @@
import { NightwatchBrowser } from 'nightwatch'
import EventEmitter from 'events'
class pinChain extends EventEmitter {
command (this: NightwatchBrowser, provider: string): NightwatchBrowser {
this.api.useCss().waitForElementVisible('[data-id="settingsSelectEnvOptions"]')
.click('[data-id="settingsSelectEnvOptions"] button')
.waitForElementVisible(`[data-id="dropdown-item-another-chain"]`)
.click(`[data-id="dropdown-item-another-chain"]`)
.waitForElementVisible(`[data-id="${provider}-unpinned"]`)
.click(`[data-id="${provider}-unpinned"]`)
.perform((done) => {
done()
this.emit('complete')
})
return this
}
}
module.exports = pinChain

@ -313,6 +313,7 @@ module.exports = {
'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) {
if (runMasterTests)
browser
.pinChain('vm-custom-fork')
.switchEnvironment('vm-custom-fork')
.waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]')
.execute(() => {

@ -70,6 +70,7 @@ declare module 'nightwatch' {
currentSelectedFileIs(name: string): NightwatchBrowser
switchWorkspace: (workspaceName: string) => NightwatchBrowser
switchEnvironment: (provider: string) => NightwatchBrowser
pinChain: (provider: string) => NightwatchBrowser
connectToExternalHttpProvider: (url: string, identifier: string) => NightwatchBrowser
waitForElementNotContainsText: (id: string, value: string, timeout: number = 10000) => NightwatchBrowser
hideToolTips: (this: NightwatchBrowser) => NightwatchBrowser

@ -78,6 +78,7 @@ export const RemixUIGridCell = (props: RemixUIGridCellProps) => {
{ filterCon.showPin && <button
className={`${pinned ? 'fa-duotone' : 'fa-light'}` + ` fa-map-pin text-info border-0 mb-0 remixui_grid_cell_pin`}
style={{ fontSize: 'large' }}
data-id={`${pinned ? `${props.title}-pinned` : `${props.title}-unpinned`}`}
onClick={async () => {
if (!props.pinStateCallback) setPinned(!pinned)
if (await props.pinStateCallback(!pinned)) setPinned(!pinned)

Loading…
Cancel
Save