|
|
|
@ -8,7 +8,7 @@ module.exports = { |
|
|
|
|
init(browser, done) |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Should create semaphore workspace template #group1 #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
'Should create semaphore workspace template #group1 #group2 #group3': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.click('*[data-id="workspacesMenuDropdown"]') |
|
|
|
@ -36,6 +36,23 @@ module.exports = { |
|
|
|
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
|
|
|
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
|
|
|
|
}, |
|
|
|
|
'Should compute a witness for a simple circuit #group1': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('circuit-compiler') |
|
|
|
|
.frame(0) |
|
|
|
|
.waitForElementVisible('[data-id="witness_toggler"]') |
|
|
|
|
.click('[data-id="witness_toggler"]') |
|
|
|
|
.waitForElementVisible('[data-id="compute_witness_btn"]') |
|
|
|
|
.waitForElementVisible('[data-id="circuit_input_a"]') |
|
|
|
|
.waitForElementVisible('[data-id="circuit_input_b"]') |
|
|
|
|
.setValue('[data-id="circuit_input_a"]', '1') |
|
|
|
|
.setValue('[data-id="circuit_input_b"]', '2') |
|
|
|
|
.click('[data-id="compute_witness_btn"]') |
|
|
|
|
.frameParent() |
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wtn"]') |
|
|
|
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wtn"]') |
|
|
|
|
}, |
|
|
|
|
'Should compile a simple circuit using compile button in circom plugin #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('[data-id="treeViewLitreeViewItemcircuits/simple.circom"]') |
|
|
|
@ -43,13 +60,37 @@ module.exports = { |
|
|
|
|
.waitForElementVisible('[data-path="Semaphore - 1/circuits/simple.circom"]') |
|
|
|
|
.clickLaunchIcon('circuit-compiler') |
|
|
|
|
.frame(0) |
|
|
|
|
.waitForElementPresent('button[data-id="compile_circuit_btn"]', 60000) |
|
|
|
|
.waitForElementPresent('button[data-id="compile_circuit_btn"]') |
|
|
|
|
.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() |
|
|
|
|
}, |
|
|
|
|
'Should generate R1CS for a simple circuit #group2': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.clickLaunchIcon('circuit-compiler') |
|
|
|
|
.frame(0) |
|
|
|
|
.waitForElementPresent('button[data-id="generate_r1cs_btn"]') |
|
|
|
|
.waitForElementVisible('button[data-id="generate_r1cs_btn"]') |
|
|
|
|
.click('button[data-id="generate_r1cs_btn"]') |
|
|
|
|
.frameParent() |
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.r1cs"]') |
|
|
|
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.r1cs"]') |
|
|
|
|
}, |
|
|
|
|
'Should compile a simple circuit using CTRL + S from the editor #group3': 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"]') |
|
|
|
|
.perform(function () { |
|
|
|
|
const actions = this.actions({async: true}) |
|
|
|
|
|
|
|
|
|
return actions.keyDown(this.Keys.CONTROL).sendKeys('s') |
|
|
|
|
}) |
|
|
|
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
|
|
|
|
.waitForElementVisible('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|