parent
6399eae728
commit
2167c2716e
@ -0,0 +1,55 @@ |
|||||||
|
'use strict' |
||||||
|
import { NightwatchBrowser } from 'nightwatch' |
||||||
|
import init from '../helpers/init' |
||||||
|
|
||||||
|
module.exports = { |
||||||
|
'@disabled': true, |
||||||
|
before: function (browser: NightwatchBrowser, done: VoidFunction) { |
||||||
|
init(browser, done) |
||||||
|
}, |
||||||
|
|
||||||
|
'Should create semaphore workspace template #group1 #group2': function (browser: NightwatchBrowser) { |
||||||
|
browser |
||||||
|
.clickLaunchIcon('filePanel') |
||||||
|
.click('*[data-id="workspacesMenuDropdown"]') |
||||||
|
.click('*[data-id="workspacecreate"]') |
||||||
|
.waitForElementVisible('*[data-id="modalDialogCustomPromptTextCreate"]') |
||||||
|
.waitForElementVisible('[data-id="fileSystemModalDialogModalFooter-react"] > button') |
||||||
|
.click('select[id="wstemplate"]') |
||||||
|
.click('select[id="wstemplate"] option[value=semaphore]') |
||||||
|
.waitForElementPresent('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') |
||||||
|
.execute(function () { (document.querySelector('[data-id="fileSystemModalDialogModalFooter-react"] .modal-ok') as HTMLElement).click() }) |
||||||
|
.pause(100) |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcircuits"]') |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemcircuits/semaphore.circom"]') |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/run_setup.ts"]') |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates"]') |
||||||
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates/groth16_verifier.sol.ejs"]') |
||||||
|
}, |
||||||
|
'Should compile a simple circuit using editor play button #group1': function (browser: NightwatchBrowser) { |
||||||
|
browser |
||||||
|
.click('[data-id="treeViewLitreeViewItemcircuits/simple.circom"]') |
||||||
|
.waitForElementPresent('[data-path="Semaphore - 1/circuits/simple.circom"]') |
||||||
|
.waitForElementVisible('[data-path="Semaphore - 1/circuits/simple.circom"]') |
||||||
|
.click('[data-id="play-editor"]') |
||||||
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
||||||
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
||||||
|
}, |
||||||
|
'Should compile a simple circuit using compile button in circom plugin #group2': function (browser: NightwatchBrowser) { |
||||||
|
browser |
||||||
|
.click('[data-id="treeViewLitreeViewItemcircuits/simple.circom"]') |
||||||
|
.waitForElementPresent('[data-path="Semaphore - 1/circuits/simple.circom"]') |
||||||
|
.waitForElementVisible('[data-path="Semaphore - 1/circuits/simple.circom"]') |
||||||
|
.clickLaunchIcon('circuit-compiler') |
||||||
|
.frame(0) |
||||||
|
.waitForElementPresent('button[data-id="compile_circuit_btn"]', 60000) |
||||||
|
.waitForElementVisible('button[data-id="compile_circuit_btn"]') |
||||||
|
.click('button[data-id="compile_circuit_btn"]') |
||||||
|
.frameParent() |
||||||
|
.clickLaunchIcon('filePanel') |
||||||
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
||||||
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
||||||
|
.end() |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue