remix-project mirror
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
remix-project/apps/remixdesktop/test/tests/app/gist.test.ts

27 lines
1.2 KiB

9 months ago
import { NightwatchBrowser } from 'nightwatch'
9 months ago
const gist_id = '02a847917a6a7ecaf4a7e0d4e68715bf'
9 months ago
module.exports = {
before: function (browser: NightwatchBrowser, done: VoidFunction) {
done()
},
'start gist': function (browser: NightwatchBrowser) {
browser
.waitForElementVisible('*[data-id="remixIdeIconPanel"]', 10000)
.waitForElementVisible('*[data-id="landingPageImportFromGist"]')
.click('*[data-id="landingPageImportFromGist"]')
.waitForElementVisible('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]')
.execute(function () {
(document.querySelector('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]') as any).focus()
})
.setValue('*[data-id="gisthandlerModalDialogModalBody-react"] input[data-id="modalDialogCustomPromp"]', gist_id)
.modalFooterOKClick('gisthandler')
9 months ago
.pause(3000)
.windowHandles(function (result) {
console.log(result.value)
browser.switchWindow(result.value[1])
.waitForElementVisible('*[data-id="treeViewDivtreeViewItemREADME.txt"]')
})
.end()
9 months ago
}
}