From 01bc8b4db318b8c8b97517d486591171ed7e8a0a Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 8 Nov 2021 18:55:51 +0530 Subject: [PATCH] e2e to check test files creation on new workspace --- apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts index 3fb1a2bac6..e5a4136eb5 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -159,7 +159,7 @@ module.exports = { .click('*[data-id="testTabGenerateTestFolder"]') }, - 'Changing current path when workspace changed': function (browser: NightwatchBrowser) { + 'Changing current path when workspace changed and checking test files creation': function (browser: NightwatchBrowser) { browser .waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .clickLaunchIcon('settings') @@ -177,6 +177,14 @@ module.exports = { .waitForElementVisible('*[data-id="fileSystem-modal-footer-ok-react"]') .execute(function () { (document.querySelector('[data-id="fileSystem-modal-footer-ok-react"]') as HTMLElement).click() }) .waitForElementPresent('*[data-id="workspacesSelect"] option[value="workspace_new"]') + .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_tests.sol"]') + .waitForElementVisible('li[data-id="treeViewLitreeViewItem.deps/remix-tests/remix_accounts.sol"]') + .openFile('.deps/remix-tests/remix_tests.sol') + // remix_test.sol should be opened in editor + .getEditorValue((content) => browser.assert.ok(content.indexOf('library Assert {') !== -1)) + .openFile('.deps/remix-tests/remix_accounts.sol') + // remix_accounts.sol should be opened in editor + .getEditorValue((content) => browser.assert.ok(content.indexOf('library TestsAccounts {') !== -1)) // end of creating .clickLaunchIcon('solidityUnitTesting') .pause(2000)