|
|
|
@ -149,6 +149,105 @@ module.exports = { |
|
|
|
|
.frameParent() |
|
|
|
|
.clickLaunchIcon('filePanel') |
|
|
|
|
.waitForElementPresent('[data-id="treeViewLitreeViewItemcircuits/.bin/simple.wasm"]') |
|
|
|
|
}, |
|
|
|
|
'Should create a new workspace using hash checker template #group5 #group6': 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=hashchecker]') |
|
|
|
|
.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/calculate_hash.circom"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/groth16"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/groth16/groth16_trusted_setup.ts"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/groth16/groth16_zkproof.ts"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/plonk"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/plonk/plonk_trusted_setup.ts"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/plonk/plonk_zkproof.ts"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates/groth16_verifier.sol.ejs"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates/plonk_verifier.sol.ejs"]') |
|
|
|
|
}, |
|
|
|
|
'Should run groth16 trusted setup script for hash checker #group5': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('[data-id="treeViewLitreeViewItemscripts/groth16/groth16_trusted_setup.ts"]') |
|
|
|
|
.waitForElementPresent('[data-path="Hash Checker - 1/scripts/groth16/groth16_trusted_setup.ts"]') |
|
|
|
|
.waitForElementVisible('[data-path="Hash Checker - 1/scripts/groth16/groth16_trusted_setup.ts"]') |
|
|
|
|
.waitForElementPresent('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.waitForElementVisible('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.click('[data-id="play-editor"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.journalLastChildIncludes('Generating R1CS for circuits/calculate_hash.circom') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('Everything went okay') |
|
|
|
|
.journalLastChildIncludes('newZkey') |
|
|
|
|
.pause(25000) |
|
|
|
|
.journalLastChildIncludes('setup done.') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/keys/groth16/verification_key.json"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/keys/groth16/zkey_final.txt"]') |
|
|
|
|
}, |
|
|
|
|
'Should run groth16 zkproof script for hash checker #group5': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('[data-id="treeViewLitreeViewItemscripts/groth16/groth16_zkproof.ts"]') |
|
|
|
|
.waitForElementPresent('[data-path="Hash Checker - 1/scripts/groth16/groth16_zkproof.ts"]') |
|
|
|
|
.waitForElementVisible('[data-path="Hash Checker - 1/scripts/groth16/groth16_zkproof.ts"]') |
|
|
|
|
.waitForElementPresent('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.waitForElementVisible('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.click('[data-id="play-editor"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.journalLastChildIncludes('Compiling circuits/calculate_hash.circom') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('Everything went okay') |
|
|
|
|
.journalLastChildIncludes('WITNESS CHECKING STARTED') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('WITNESS CHECKING FINISHED SUCCESSFULLY') |
|
|
|
|
.pause(2000) |
|
|
|
|
.journalLastChildIncludes('zk proof validity') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/build/groth16/zk_verifier.sol"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/build/groth16/input.json"]') |
|
|
|
|
}, |
|
|
|
|
'Should run plonk trusted setup script for hash checker #group6': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('[data-id="treeViewLitreeViewItemscripts/plonk/plonk_trusted_setup.ts"]') |
|
|
|
|
.waitForElementPresent('[data-path="Hash Checker - 1/scripts/plonk/plonk_trusted_setup.ts"]') |
|
|
|
|
.waitForElementVisible('[data-path="Hash Checker - 1/scripts/plonk/plonk_trusted_setup.ts"]') |
|
|
|
|
.waitForElementPresent('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.waitForElementVisible('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.click('[data-id="play-editor"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.journalLastChildIncludes('Generating R1CS for circuits/calculate_hash.circom') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('Everything went okay') |
|
|
|
|
.journalLastChildIncludes('plonk setup') |
|
|
|
|
.pause(10000) |
|
|
|
|
.journalLastChildIncludes('setup done') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/keys/plonk/verification_key.json"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/keys/plonk/zkey_final.txt"]') |
|
|
|
|
}, |
|
|
|
|
'Should run plonk zkproof script for hash checker #group6': function (browser: NightwatchBrowser) { |
|
|
|
|
browser |
|
|
|
|
.click('[data-id="treeViewLitreeViewItemscripts/plonk/plonk_zkproof.ts"]') |
|
|
|
|
.waitForElementPresent('[data-path="Hash Checker - 1/scripts/plonk/plonk_zkproof.ts"]') |
|
|
|
|
.waitForElementVisible('[data-path="Hash Checker - 1/scripts/plonk/plonk_zkproof.ts"]') |
|
|
|
|
.waitForElementPresent('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.waitForElementVisible('[data-id="verticalIconsKindcircuit-compiler"]') |
|
|
|
|
.click('[data-id="play-editor"]') |
|
|
|
|
.pause(2000) |
|
|
|
|
.journalLastChildIncludes('Compiling circuits/calculate_hash.circom') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('Everything went okay') |
|
|
|
|
.pause(5000) |
|
|
|
|
.journalLastChildIncludes('zk proof validity') |
|
|
|
|
.journalLastChildIncludes('proof done.') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/build/plonk/zk_verifier.sol"]') |
|
|
|
|
.waitForElementVisible('*[data-id="treeViewLitreeViewItemzk/build/plonk/input.json"]') |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|