pin chain command

pull/5370/head
Your Name 4 months ago
parent ccbcb9d084
commit ff9e9c6cc4
  1. 4
      .circleci/config.yml
  2. 20
      apps/remix-ide-e2e/src/commands/pinChain.ts
  3. 3
      apps/remix-ide-e2e/src/tests/terminal.test.ts
  4. 1
      apps/remix-ide-e2e/src/types/index.d.ts
  5. 1
      libs/remix-ui/grid-view/src/lib/remix-ui-grid-cell.tsx

@ -3,7 +3,7 @@ version: 2.1
parameters:
run_flaky_tests:
type: boolean
default: false
default: true
orbs:
browser-tools: circleci/browser-tools@1.4.4
win: circleci/windows@5.0
@ -355,7 +355,7 @@ jobs:
type: string
jobsize:
type: string
parallelism: 10
parallelism: 1
steps:
- checkout
- attach_workspace:

@ -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

@ -310,9 +310,10 @@ module.exports = {
.click('*[data-id="terminalClearConsole"]')
},
'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) {
'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #flaky #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