From 184c76682fde170be67dbed34e5a2b5683ee1861 Mon Sep 17 00:00:00 2001 From: aniket-engg Date: Thu, 9 Nov 2023 16:58:15 +0530 Subject: [PATCH] hashchecker template e2e --- .../remix-ide-e2e/src/tests/workspace.test.ts | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/apps/remix-ide-e2e/src/tests/workspace.test.ts b/apps/remix-ide-e2e/src/tests/workspace.test.ts index 1da1bba7b6..058e8be8a8 100644 --- a/apps/remix-ide-e2e/src/tests/workspace.test.ts +++ b/apps/remix-ide-e2e/src/tests/workspace.test.ts @@ -382,6 +382,35 @@ module.exports = { }) // No test file is added in upgradeable contract template }, + 'Should create circom zkp hashchecker workspace #group1': function (browser: NightwatchBrowser) { + browser + .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/calculateHash.circom"]') + .click('*[data-id="treeViewLitreeViewItemcircuits/calculateHash.circom"]') + .pause(1000) + .getEditorValue((content) => { + browser.assert.ok(content.indexOf(`template CalculateHash() {`) !== -1, + 'Incorrect content') + }) + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/run_setup.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemscripts/run_verification.ts"]') + .waitForElementVisible('*[data-id="treeViewLitreeViewItemtemplates/groth16_verifier.sol.ejs"]') + .click('*[data-id="treeViewLitreeViewItemtemplates/groth16_verifier.sol.ejs"]') + .getEditorValue((content) => { + browser.assert.ok(content.indexOf(`contract Groth16Verifier {`) !== -1, + 'Incorrect content') + }) + }, // WORKSPACE TEMPLATES E2E END