Change e2e tests commands in package.json

nightwatch-ts
ioedeveloper 5 years ago
parent f87dc9ae32
commit 30fbf3828e
  1. 4
      apps/remix-ide-e2e/src/commands/switchBrowserTab.ts
  2. 6
      apps/remix-ide-e2e/src/commands/verifyContracts.ts
  3. 56
      package.json

@ -1,4 +1,4 @@
import { NightwatchBrowser } from "nightwatch"
import { NightwatchBrowser, NightwatchAPI } from "nightwatch"
import EventEmitter from "events"
/*
@ -7,7 +7,7 @@ import EventEmitter from "events"
class SwitchBrowserTab extends EventEmitter {
command (this: NightwatchBrowser, index: number): NightwatchBrowser {
this.api.perform((browser: NightwatchBrowser, done) => {
this.api.perform((browser: NightwatchAPI, done) => {
browser.windowHandles((result) => {
browser.switchWindow(result.value[index])
done()

@ -1,4 +1,4 @@
import { NightwatchBrowser, NightwatchVerifyContractOpts, NightwatchCallbackResult } from 'nightwatch'
import { NightwatchBrowser, NightwatchCallbackResult } from 'nightwatch'
import EventEmitter from "events"
class VerifyContracts extends EventEmitter {
@ -13,7 +13,7 @@ class VerifyContracts extends EventEmitter {
}
}
function getCompiledContracts (browser: NightwatchBrowser, opts: NightwatchVerifyContractOpts, callback: (result: NightwatchCallbackResult<any>) => void) {
function getCompiledContracts (browser: NightwatchBrowser, opts: { wait: number, version?: string }, callback: (result: NightwatchCallbackResult<any>) => void) {
browser
.clickLaunchIcon('solidity')
.pause(opts.wait)
@ -48,7 +48,7 @@ function getCompiledContracts (browser: NightwatchBrowser, opts: NightwatchVerif
})
}
function verifyContracts (browser: NightwatchBrowser, compiledContractNames: string[], opts: NightwatchVerifyContractOpts, callback: VoidFunction) {
function verifyContracts (browser: NightwatchBrowser, compiledContractNames: string[], opts: { wait: number, version?: string }, callback: VoidFunction) {
getCompiledContracts(browser, opts, (result: NightwatchCallbackResult<any>) => {
if (result.value) {
for (const contract in compiledContractNames) {

@ -53,34 +53,34 @@
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.6.6+commit.6c089d02.js -O ./apps/remix-ide/soljson.js",
"make-mock-compiler": "node apps/remix-ide/ci/makeMockCompiler.js",
"minify": "uglifyjs --in-source-map inline --source-map-inline -c warnings=false",
"nightwatch_parallel": "nightwatch -e chrome,firefox --config apps/remix-ide/nightwatch.js",
"nightwatch_local_firefox": "nightwatch --config apps/remix-ide/nightwatch.js --env firefox",
"nightwatch_local_chrome": "nightwatch --config apps/remix-ide/nightwatch.js --env chrome",
"nightwatch_local_ballot": "nightwatch ./apps/remix-ide/test-browser/tests/ballot.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_usingWorker": "nightwatch ./apps/remix-ide/test-browser/tests/usingWebWorker.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_libraryDeployment": "nightwatch ./apps/remix-ide/test-browser/tests/libraryDeployment.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_solidityImport": "nightwatch ./apps/remix-ide/test-browser/tests/solidityImport.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_recorder": "nightwatch ./apps/remix-ide/test-browser/tests/recorder.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_transactionExecution": "nightwatch ./apps/remix-ide/test-browser/tests/transactionExecution.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_staticAnalysis": "nightwatch ./apps/remix-ide/test-browser/tests/staticAnalysis.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_signingMessage": "nightwatch ./apps/remix-ide/test-browser/tests/signingMessage.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_specialFunctions": "nightwatch ./apps/remix-ide/test-browser/tests/specialFunctions.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_solidityUnitTests": "nightwatch ./apps/remix-ide/test-browser/tests/solidityUnittests.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_remixd": "nightwatch ./apps/remix-ide/test-browser/tests/remixd.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_terminal": "nightwatch ./apps/remix-ide/test-browser/tests/terminal.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_gist": "nightwatch ./apps/remix-ide/test-browser/tests/gist.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_workspace": "nightwatch ./apps/remix-ide/test-browser/tests/workspace.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_defaultLayout": "nightwatch ./apps/remix-ide/test-browser/tests/defaultLayout.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_pluginManager": "nightwatch ./apps/remix-ide/test-browser/tests/pluginManager.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_publishContract": "nightwatch ./apps/remix-ide/test-browser/tests/publishContract.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_generalSettings": "nightwatch ./apps/remix-ide/test-browser/tests/generalSettings.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_fileExplorer": "nightwatch ./apps/remix-ide/test-browser/tests/fileExplorer.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_debugger": "nightwatch ./apps/remix-ide/test-browser/tests/debugger.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_editor": "nightwatch ./apps/remix-ide/test-browser/tests/editor.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_compiler": "nightwatch ./apps/remix-ide/test-browser/tests/compiler_api.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_txListener": "nightwatch ./apps/remix-ide/test-browser/tests/txListener.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_fileManager": "nightwatch ./apps/remix-ide/test-browser/tests/fileManager_api.test.js --config apps/remix-ide/nightwatch.js --env chrome ",
"nightwatch_local_runAndDeploy": "nightwatch ./apps/remix-ide/test-browser/tests/runAndDeploy.js --config apps/remix-ide/nightwatch.js --env chrome-runAndDeploy ",
"nightwatch_parallel": "nx e2e remix-ide-e2e -env=chrome,firefox",
"nightwatch_local_firefox": "nx e2e remix-ide-e2e --env=firefox",
"nightwatch_local_chrome": "nx e2e remix-ide-e2e --env=chrome",
"nightwatch_local_ballot": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/ballot.test.js --env=chrome",
"nightwatch_local_usingWorker": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/usingWebWorker.test.js --env=chrome",
"nightwatch_local_libraryDeployment": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/libraryDeployment.test.js --env=chrome",
"nightwatch_local_solidityImport": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/solidityImport.test.js --env=chrome",
"nightwatch_local_recorder": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/recorder.test.js --env=chrome",
"nightwatch_local_transactionExecution": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/transactionExecution.test.js --env=chrome",
"nightwatch_local_staticAnalysis": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/staticAnalysis.test.js --env=chrome",
"nightwatch_local_signingMessage": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/signingMessage.test.js --env=chrome",
"nightwatch_local_specialFunctions": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/specialFunctions.test.js --env=chrome",
"nightwatch_local_solidityUnitTests": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/solidityUnittests.test.js --env=chrome",
"nightwatch_local_remixd": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/remixd.test.js --env=chrome",
"nightwatch_local_terminal": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/terminal.test.js --env=chrome",
"nightwatch_local_gist": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/gist.test.js --env=chrome",
"nightwatch_local_workspace": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/workspace.test.js --env=chrome",
"nightwatch_local_defaultLayout": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/defaultLayout.test.js --env=chrome",
"nightwatch_local_pluginManager": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/pluginManager.test.js --env=chrome",
"nightwatch_local_publishContract": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/publishContract.test.js --env=chrome",
"nightwatch_local_generalSettings": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/generalSettings.test.js --env=chrome",
"nightwatch_local_fileExplorer": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/fileExplorer.test.js --env=chrome",
"nightwatch_local_debugger": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/debugger.test.js --env=chrome",
"nightwatch_local_editor": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/editor.test.js --env=chrome",
"nightwatch_local_compiler": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/compiler_api.test.js --env=chrome",
"nightwatch_local_txListener": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/txListener.test.js --env=chrome",
"nightwatch_local_fileManager": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/fileManager_api.test.js --env=chrome",
"nightwatch_local_runAndDeploy": "nx e2e remix-ide-e2e --filePath=dist/apps/remix-ide-e2e/src/tests/runAndDeploy.js --env=chrome-runAndDeploy",
"onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint",
"remixd": "remixd -s ./apps/remix-ide/contracts --remix-ide http://127.0.0.1:8080",
"selenium": "selenium-standalone start",

Loading…
Cancel
Save