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

21 lines
990 B

9 months ago
import { NightwatchBrowser } from 'nightwatch'
const gist_id = 'a4af87f9ae096a01c7819e75b32d1b72'
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')
//.pause()
}
}