From 4c5a926c49ec1db1c387d8b9977aa276707bbaf3 Mon Sep 17 00:00:00 2001 From: Aniket-Engg Date: Mon, 8 Nov 2021 18:50:04 +0530 Subject: [PATCH] e2e to check test files creation on SUT activation --- .../remix-ide-e2e/src/tests/solidityUnittests.spec.ts | 11 ++++++++++- 1 file changed, 10 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 bc0c3f8e82..3fb1a2bac6 100644 --- a/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts +++ b/apps/remix-ide-e2e/src/tests/solidityUnittests.spec.ts @@ -13,7 +13,7 @@ module.exports = { return sources }, - 'Should launch solidity unit test plugin': function (browser: NightwatchBrowser) { + 'Should launch solidity unit test plugin and create test files in FE': function (browser: NightwatchBrowser) { browser.waitForElementPresent('*[data-id="verticalIconsKindfilePanel"]') .clickLaunchIcon('filePanel') .addFile('simple_storage.sol', sources[0]['simple_storage.sol']) @@ -23,6 +23,15 @@ module.exports = { .click('*[data-id="verticalIconsKindsolidityUnitTesting"]') .waitForElementPresent('*[data-id="sidePanelSwapitTitle"]') .assert.containsText('*[data-id="sidePanelSwapitTitle"]', 'SOLIDITY UNIT TESTING') + .clickLaunchIcon('filePanel') + .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)) }, 'Should generate test file': function (browser: NightwatchBrowser) {