Skip to content

Commit f13d4c1

Browse files
ci-bothsy822
authored andcommitted
remove 'customize list' menu and update e2e tests
1 parent 0c4b7e3 commit f13d4c1

File tree

9 files changed

+33
-140
lines changed

9 files changed

+33
-140
lines changed

apps/remix-ide-e2e/src/commands/pinGrid.ts

Lines changed: 0 additions & 29 deletions
This file was deleted.

apps/remix-ide-e2e/src/commands/switchEnvironment.ts

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class switchEnvironment extends EventEmitter {
1818
if (shouldWait) {
1919
browser
2020
.waitForElementVisible(`[data-id="selected-provider-${providerName}"]`, 15000)
21+
.pause(1000)
2122
.perform(() => done())
2223
} else {
2324
done()
@@ -126,23 +127,12 @@ class switchEnvironment extends EventEmitter {
126127

127128
attemptSelect(this.api, provider, returnWhenInitialized, () => {
128129
waitForSelectedOrModal(this.api, provider, 10000, (ok) => {
129-
if (ok) return done()
130-
131-
this.api.isPresent({
132-
selector: `*[data-id="${provider}ModalDialogContainer-react"]`,
133-
suppressNotFoundErrors: true,
134-
timeout: 0
135-
}, (hasModal) => {
136-
if (!hasModal.value) {
137-
ensureDropdownClosed(this.api)
138-
}
139-
this.api
140-
.pinGrid(provider, true)
141-
.click('[data-id="settingsSelectEnvOptions"] button')
142-
attemptSelect(this.api, provider, returnWhenInitialized, () => {
143-
waitForSelectedOrModal(this.api, provider, 10000, () => done())
144-
})
145-
})
130+
if (ok) {
131+
return done()
132+
} else {
133+
this.api.assert.fail(`Environment "${provider}" could not be selected or found in the dropdown.`)
134+
done()
135+
}
146136
})
147137
})
148138
})

apps/remix-ide-e2e/src/tests/grid.test.ts

Lines changed: 0 additions & 56 deletions
This file was deleted.

apps/remix-ide-e2e/src/tests/plugin_api.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,6 @@ module.exports = {
183183
.frameParent()
184184
.useCss()
185185
.clickLaunchIcon('udapp')
186-
.pinGrid('vm-berlin', true)
187186
.clickLaunchIcon('localPlugin')
188187
.useXpath()
189188
.frame(0)

apps/remix-ide-e2e/src/tests/terminal.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,6 @@ module.exports = {
340340
'Should connect to the sepolia fork and run web3.eth.getCode in the terminal #group9': function (browser: NightwatchBrowser) {
341341
if (runMasterTests)
342342
browser
343-
.pinGrid('vm-custom-fork', true)
344343
.switchEnvironment('vm-custom-fork')
345344
.waitForElementVisible('[data-id="vm-custom-fork-modal-footer-ok-react"]')
346345
.execute(() => {

apps/remix-ide-e2e/src/tests/vm_state.test.ts

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,43 +140,45 @@ const tests = {
140140
})
141141
.clickLaunchIcon('filePanel')
142142
},
143-
'Should show fork states provider in environment explorer & make txs using forked state #group1': function (browser: NightwatchBrowser) {
143+
'Should show fork states provider in environment dropdown & make txs using forked state #group1': function (browser: NightwatchBrowser) {
144144
browser
145145
.clickLaunchIcon('udapp')
146146
.waitForElementVisible('[data-id="settingsSelectEnvOptions"]')
147147
.click('[data-id="settingsSelectEnvOptions"] button')
148-
.waitForElementVisible(`[data-id="dropdown-item-another-chain"]`)
149-
.click(`[data-id="dropdown-item-another-chain"]`)
150-
.waitForElementVisible('[data-id="remixUIGSDeploy to an In-browser Forked State."]')
151-
.waitForElementPresent('[data-id="remixUIGSforkedState_1"]')
152-
.waitForElementPresent('[data-id="vm-fs-forkedState_1-pinned"]')
153-
.waitForElementContainsText('[data-id="vm-fs-forkedState_1desc"]', 'Latest Block: 2')
154-
.waitForElementNotPresent('[data-id="remixUIGSforkedState_2"]')
148+
.useXpath()
149+
.moveToElement("//span[contains(@class,'dropdown-item') and normalize-space()='Remix VM']", 5, 5)
150+
.useCss()
151+
.waitForElementVisible(`[data-id="dropdown-item-vm-fs-forkedState_1"]`)
152+
.click('[data-id="settingsSelectEnvOptions"] button')
155153
.switchEnvironment('vm-prague')
156154
.openFile('contracts/1_Storage.sol')
157-
.verifyContracts(['Storage'])
155+
.clickLaunchIcon('solidity')
156+
.click('*[data-id="compilerContainerCompileBtn"]')
157+
.pause(2000)
158158
.clickLaunchIcon('udapp')
159+
.selectContract('Storage')
159160
.click('*[data-id="Deploy - transact (not payable)"]')
160-
.waitForElementVisible('*[data-id="unpinnedInstance0xf8e81D47203A594245E36C48e151709F0C19fBe8"]')
161+
.pause(5000)
161162
.click('*[data-id="fork-state-icon"]')
162163
.waitForElementVisible('*[data-id="udappNotifyModalDialogModalTitle-react"]')
164+
.pause(2000)
163165
.click('input[data-id="modalDialogForkState"]')
164166
.setValue('input[data-id="modalDialogForkState"]', 'forkedState_2')
165167
.modalFooterOKClick('udappNotify')
166168
.waitForElementVisible('*[data-shared="tooltipPopup"]', 10000)
167169
.waitForElementContainsText('*[data-shared="tooltipPopup"]', `New environment 'forkedState_2' created with forked state.`)
168-
// check if 'forkedState_2' is selected as current environment
169-
.waitForElementPresent('*[data-id="selected-provider-vm-fs-forkedState_2"]')
170-
// check if 'forkedState_2' is present in environment explorer
171-
.waitForElementPresent('[data-id="remixUIGSforkedState_2"]')
172-
// check if 'forkedState_2' is pinned in environment explorer
173-
.waitForElementPresent('[data-id="vm-fs-forkedState_2-pinned"]')
174-
// 'forkedState_2' should have 3 blocks
175-
.waitForElementContainsText('[data-id="vm-fs-forkedState_2desc"]', 'Latest Block: 3')
170+
.assert.elementPresent('*[data-id="selected-provider-vm-fs-forkedState_2"]')
171+
172+
.click('[data-id="settingsSelectEnvOptions"] button')
173+
.useXpath()
174+
.moveToElement("//span[contains(@class,'dropdown-item') and normalize-space()='Remix VM']", 5, 5)
175+
.useCss()
176+
.waitForElementVisible(`[data-id="dropdown-item-vm-fs-forkedState_2"]`)
177+
.click('[data-id="settingsSelectEnvOptions"] button')
178+
176179
.click('*[data-id="Deploy - transact (not payable)"]')
177180
.clickInstance(0)
178181
.clickFunction('store - transact (not payable)', { types: 'uint256 num', values: '"555"' })
179-
// block number should be 5 after 2 txs
180182
.testFunction('last',
181183
{
182184
status: '0x1 Transaction mined and execution succeed',
@@ -188,7 +190,9 @@ const tests = {
188190
browser
189191
.switchEnvironment('vm-prague')
190192
.openFile('contracts/1_Storage.sol')
191-
.verifyContracts(['Storage'])
193+
.clickLaunchIcon('solidity')
194+
.click('*[data-id="compilerContainerCompileBtn"]')
195+
.pause(2000)
192196
.clickLaunchIcon('udapp')
193197
.click('*[data-id="Deploy - transact (not payable)"]')
194198
.pause(10000)

apps/remix-ide-e2e/src/types/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ declare module 'nightwatch' {
7070
currentSelectedFileIs(name: string): NightwatchBrowser
7171
switchWorkspace: (workspaceName: string) => NightwatchBrowser
7272
switchEnvironment: (provider: string, returnWhenInitialized?: boolean) => NightwatchBrowser
73-
pinGrid: (provider: string, status: boolean) => NightwatchBrowser
7473
connectToExternalHttpProvider: (url: string, identifier: string) => NightwatchBrowser
7574
waitForElementNotContainsText: (id: string, value: string, timeout: number = 10000) => NightwatchBrowser
7675
hideToolTips: (this: NightwatchBrowser) => NightwatchBrowser

apps/remix-ide/src/blockchain/blockchain.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ export class Blockchain extends Plugin {
144144
// used to pin and select newly created forked state provider
145145
this.on('udapp', 'forkStateProviderAdded', (providerName) => {
146146
const name = `vm-fs-${providerName}`
147-
this.emit('shouldAddProvidertoUdapp', name, this.getProviderObjByName(name))
148-
this.pinnedProviders.push(name)
149-
this.call('config', 'setAppParameter', 'settings/pinned-providers', JSON.stringify(this.pinnedProviders))
150147
_paq.push(['trackEvent', 'blockchain', 'providerPinned', name])
151148
this.emit('providersChanged')
152149
this.changeExecutionContext({ context: name }, null, null, null)
@@ -731,13 +728,13 @@ export class Blockchain extends Plugin {
731728
}
732729

733730
addProvider(provider: Provider) {
734-
if (this.pinnedProviders.includes(provider.name)) this.emit('shouldAddProvidertoUdapp', provider.name, provider)
731+
this.emit('shouldAddProvidertoUdapp', provider.name, provider)
735732
this.executionContext.addProvider(provider)
736733
this.emit('providersChanged')
737734
}
738735

739736
removeProvider(name) {
740-
if (this.pinnedProviders.includes(name)) this.emit('shouldRemoveProviderFromUdapp', name, this.getProviderObjByName(name))
737+
this.emit('shouldRemoveProviderFromUdapp', name, this.getProviderObjByName(name))
741738
this.executionContext.removeProvider(name)
742739
this.emit('providersChanged')
743740
}

libs/remix-ui/run-tab/src/lib/components/environment.tsx

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -246,16 +246,6 @@ export function EnvironmentUI(props: EnvironmentProps) {
246246
))}
247247
</SubmenuPortal>
248248
)}
249-
250-
<Dropdown.Divider className="border-secondary" />
251-
252-
<Dropdown.Item
253-
key={10000}
254-
onClick={() => { props.setExecutionContext({ context: 'item-another-chain' }) }}
255-
data-id="dropdown-item-another-chain"
256-
>
257-
<span className="">Customize this list...</span>
258-
</Dropdown.Item>
259249
</Dropdown.Menu>
260250
</Dropdown>
261251
</div>

0 commit comments

Comments
 (0)