pull/4550/head
yann300 9 months ago
parent b3be9a61dc
commit d9c484806c
  1. 17
      apps/remix-ide-e2e/src/tests/gist.test.ts

@ -37,9 +37,9 @@ module.exports = {
.addFile('File.sol', { content: '' }) .addFile('File.sol', { content: '' })
.executeScriptInTerminal(`remix.loadgist('${gistid}')`) .executeScriptInTerminal(`remix.loadgist('${gistid}')`)
// .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() }) // .perform((done) => { if (runtimeBrowser === 'chrome') { browser.openFile('gists') } done() })
.waitForElementVisible(`[data-id="treeViewLitreeViewItemgist-${gistid}"]`) .waitForElementVisible(`[data-id="treeViewLitreeViewItemREADME.txt"]`)
.openFile(`gist-${gistid}/README.txt`) .openFile(`README.txt`)
// Remix publish to gist // Remix publish to gist
/* .click('*[data-id="fileExplorerNewFilepublishToGist"]') /* .click('*[data-id="fileExplorerNewFilepublishToGist"]')
.pause(2000) .pause(2000)
@ -142,9 +142,9 @@ module.exports = {
.setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', testData.validGistId) .setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', testData.validGistId)
.modalFooterOKClick('gisthandler') .modalFooterOKClick('gisthandler')
.pause(10000) .pause(10000)
.openFile(`gist-${testData.validGistId}/README.txt`) .openFile(`README.txt`)
.waitForElementVisible(`div[data-path='default_workspace/gist-${testData.validGistId}/README.txt']`) .waitForElementVisible(`div[data-path='default_workspace/README.txt']`)
.assert.containsText(`div[data-path='default_workspace/gist-${testData.validGistId}/README.txt'] > span`, 'README.txt') .assert.containsText(`div[data-path='default_workspace/README.txt'] > span`, 'README.txt')
}, },
'Load Gist from URL and verify truncated files are loaded #group3': function (browser: NightwatchBrowser) { 'Load Gist from URL and verify truncated files are loaded #group3': function (browser: NightwatchBrowser) {
@ -153,13 +153,12 @@ module.exports = {
.url('http://127.0.0.1:8080/#gist=' + gistId) // loading the gist .url('http://127.0.0.1:8080/#gist=' + gistId) // loading the gist
.refreshPage() .refreshPage()
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 15000) .waitForElementVisible('*[data-id="remixIdeIconPanel"]', 15000)
.waitForElementVisible(`#fileExplorerView li[data-path='gist-${gistId}/README.txt']`, 30000) .waitForElementVisible(`#fileExplorerView li[data-path='README.txt']`, 30000)
.openFile(`gist-${gistId}/scripts/deploy_with_ethers.ts`) .openFile(`scripts/deploy_with_ethers.ts`)
.getEditorValue((content) => { .getEditorValue((content) => {
browser.assert.ok(content !== '') browser.assert.ok(content !== '')
}) })
.rightClickCustom(`li[data-path='gist-${gistId}'] div`) // saving the gist .click('*[data-id="fileExplorerNewFileupdateGist"]')
.click('[data-id="contextMenuItempublishFolderToGist"]')
.modalFooterOKClick('fileSystem') .modalFooterOKClick('fileSystem')
.waitForElementVisible('*[data-shared="tooltipPopup"]', 5000) .waitForElementVisible('*[data-shared="tooltipPopup"]', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]', 'Saving gist (' + gistId + ') ...') .assert.containsText('*[data-shared="tooltipPopup"]', 'Saving gist (' + gistId + ') ...')

Loading…
Cancel
Save