Merge pull request #2 from ethereum/setup-remix-ide

Added configurations for remix-ide
pull/7/head
David Disu 5 years ago committed by GitHub
commit 36bc4ab5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .babelrc
  2. 193
      .circleci/config.yml
  3. 4
      .env
  4. 4
      apps/remix-ide/assets/css/font-awesome.min.css
  5. 69
      apps/remix-ide/assets/css/pygment_trac.css
  6. BIN
      apps/remix-ide/assets/fonts/FontAwesome.otf
  7. BIN
      apps/remix-ide/assets/fonts/fontawesome-webfont.eot
  8. 2671
      apps/remix-ide/assets/fonts/fontawesome-webfont.svg
  9. BIN
      apps/remix-ide/assets/fonts/fontawesome-webfont.ttf
  10. BIN
      apps/remix-ide/assets/fonts/fontawesome-webfont.woff
  11. BIN
      apps/remix-ide/assets/fonts/fontawesome-webfont.woff2
  12. BIN
      apps/remix-ide/assets/img/debuggerLogo.webp
  13. BIN
      apps/remix-ide/assets/img/gasStation_50.png
  14. BIN
      apps/remix-ide/assets/img/hexagon-remix-greengrey-texture.png
  15. BIN
      apps/remix-ide/assets/img/homeStickers.png
  16. BIN
      apps/remix-ide/assets/img/moreLogo.webp
  17. BIN
      apps/remix-ide/assets/img/mythxLogo.webp
  18. BIN
      apps/remix-ide/assets/img/pipelineLogo.webp
  19. BIN
      apps/remix-ide/assets/img/sleepingRemiCroped.webp
  20. BIN
      apps/remix-ide/assets/img/solidityLogo.webp
  21. BIN
      apps/remix-ide/assets/img/sourceVerifyLogo.webp
  22. BIN
      apps/remix-ide/assets/img/vyperLogo.webp
  23. BIN
      apps/remix-ide/assets/img/workshopLogo.webp
  24. 271121
      apps/remix-ide/assets/js/0.7.7/app.js
  25. 8
      apps/remix-ide/assets/js/browserfs.min.js
  26. 2
      apps/remix-ide/ci/browser_tests_chrome.sh
  27. 2
      apps/remix-ide/ci/browser_tests_firefox.sh
  28. 2
      apps/remix-ide/ci/browser_tests_run_deploy.sh
  29. 6
      apps/remix-ide/nightwatch.js
  30. 2
      apps/remix-ide/package.json
  31. 4
      apps/remix-ide/src/app/ui/landing-page/landing-page.js
  32. 6
      apps/remix-ide/src/app/ui/multiParamManager.js
  33. 30
      apps/remix-ide/test-browser/commands/clearEditableContent.js
  34. 11
      apps/remix-ide/test-browser/commands/createContract.js
  35. 2
      apps/remix-ide/test-browser/commands/executeScript.js
  36. 27
      apps/remix-ide/test-browser/commands/getInstalledPlugins.js
  37. 2
      apps/remix-ide/test-browser/commands/journalChildIncludes.js
  38. 2
      apps/remix-ide/test-browser/commands/switchBrowserTab.js
  39. 2
      apps/remix-ide/test-browser/commands/testContracts.js
  40. 6
      apps/remix-ide/test-browser/helpers/init.js
  41. 3
      apps/remix-ide/test-browser/tests/generalSettings.test.js
  42. 4
      apps/remix-ide/test-browser/tests/runAndDeploy.js
  43. 2
      apps/remix-ide/test-browser/tests/sauce.js
  44. 84
      nightwatch.js
  45. 6
      nx.json
  46. 23370
      package-lock.json
  47. 201
      package.json
  48. 11
      seleniumConfig.js
  49. 1
      soljson.js
  50. 68
      workspace.json

@ -0,0 +1,6 @@
{
"presets": ["@babel/preset-env"],
"ignore": [
"node_modules"
]
}

@ -0,0 +1,193 @@
# Javascript Node CircleCI 2.0 configuration file
#
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
#
version: 2
jobs:
remix-ide-chrome:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js
background: true
- run: ./apps/remix-ide/ci/browser_tests_chrome.sh
- store_test_results:
path: ./apps/remix-ide/reports/tests
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
remix-ide-firefox:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-project
parallelism: 20
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js
background: true
- run:
name: Download Latest Firefox
command: sudo apt-get purge -y firefox && wget https://sourceforge.net/projects/ubuntuzilla/files/mozilla/apt/pool/main/f/firefox-mozilla-build/firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run:
name: Install Firefox
command: sudo dpkg -i firefox-mozilla-build_73.0.1-0ubuntu1_amd64.deb
- run: ./apps/remix-ide/ci/browser_tests_firefox.sh
- store_test_results:
path: ./apps/remix-ide/reports/tests
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
remix-ide-run-deploy:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Download Selenium
command: ./node_modules/.bin/selenium-standalone install --config=../remix-project/apps/remix-ide/seleniumConfig.js
- run:
name: Start Selenium
command: ./node_modules/.bin/selenium-standalone start --config=../remix-project/apps/remix-ide/seleniumConfig.js
background: true
- run: ./apps/remix-ide/ci/browser_tests_run_deploy.sh
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
deploy-remix-live:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
# documented at https://circleci.com/docs/2.0/circleci-images/
resource_class: xlarge
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "remix_live" ]; then
./ci/deploy_from_travis_remix-live.sh;
fi
- store_artifacts:
path: ./apps/remix-ide/reports/screenshots
deploy-remix-alpha:
docker:
# specify the version you desire here
- image: circleci/node:9.11.2-browsers
# Specify service dependencies here if necessary
# CircleCI maintains a library of pre-built images
resource_class: xlarge
# documented at https://circleci.com/docs/2.0/circleci-images/
# - image: circleci/mongo:3.4.4
environment:
- COMMIT_AUTHOR_EMAIL: "yann@ethereum.org"
- COMMIT_AUTHOR: "Circle CI"
- FILES_TO_PACKAGE: "assets background.js build icon.png index.html manifest.json README.md soljson.js package.json"
working_directory: ~/remix-project
steps:
- checkout
- run: npm install
- run: npm run lint && npm run test && npm run make-mock-compiler
- run:
name: Deploy
command: |
if [ "${CIRCLE_BRANCH}" == "master" ]; then
./ci/deploy_from_travis_remix-alpha.sh;
fi
- store_artifacts:
path: ./apps/reports/screenshots
workflows:
version: 2
build_all:
jobs:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
- deploy-remix-live:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
filters:
branches:
only: remix_live
- deploy-remix-alpha:
requires:
- remix-ide-chrome
- remix-ide-firefox
- remix-ide-run-deploy
filters:
branches:
only: master

@ -0,0 +1,4 @@
NODE_OPTIONS=--max-old-space-size=3072
gist_token = <token>
account_passphrase = <passphrase>
account_password = <password>

File diff suppressed because one or more lines are too long

@ -0,0 +1,69 @@
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
.type-csharp .highlight .k { color: #0000FF }
.type-csharp .highlight .kt { color: #0000FF }
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
.type-csharp .highlight .nc { color: #2B91AF }
.type-csharp .highlight .nn { color: #000000 }
.type-csharp .highlight .s { color: #A31515 }
.type-csharp .highlight .sc { color: #A31515 }

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -7,7 +7,7 @@ setupRemixd () {
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}

@ -7,7 +7,7 @@ setupRemixd () {
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}

@ -7,7 +7,7 @@ setupRemixd () {
cd contracts
echo 'sharing folder: '
echo $PWD
./../node_modules/remixd/bin/remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
remixd -s $PWD --remix-ide http://127.0.0.1:8080 &
cd ..
}

@ -1,12 +1,12 @@
'use strict'
require('@babel/register')()
const crxFile = require('fs').readFileSync('./test-browser/extensions/chrome/metamask.crx')
const crxFile = require('fs').readFileSync('test-browser/extensions/chrome/metamask.crx')
const metamaskExtension = new Buffer.from(crxFile).toString('base64') // eslint-disable-line
module.exports = {
'src_folders': ['test-browser/tests'],
'output_folder': './reports/tests',
'output_folder': 'reports/tests',
'custom_commands_path': ['test-browser/commands'],
'custom_assertions_path': '',
'page_objects_path': '',
@ -31,7 +31,7 @@ module.exports = {
'javascriptEnabled': true,
'acceptSslCerts': true
},
'exclude': ['./test-browser/tests/runAndDeploy.js']
'exclude': ['tests/runAndDeploy.js']
},
'chrome': {

@ -49,7 +49,7 @@
"minixhr": "^3.2.2",
"mkdirp": "^0.5.1",
"nanohtml": "^1.6.3",
"nightwatch": "^0.9.20",
"nightwatch": "^1.3.5",
"notify-error": "^1.2.0",
"npm-link-local": "^1.1.0",
"npm-merge-driver": "^2.3.5",

@ -202,8 +202,8 @@ export class LandingPage extends ViewPlugin {
`
}
// main
const solEnv = createEnvButton('/assets/img/solidityLogo.webp', 'solidityLogo', 'Solidity', startSolidity)
const vyperEnv = createEnvButton('/assets/img/vyperLogo.webp', 'vyperLogo', 'Vyper', startVyper)
const solEnv = createEnvButton('assets/img/solidityLogo.webp', 'solidityLogo', 'Solidity', startSolidity)
const vyperEnv = createEnvButton('assets/img/vyperLogo.webp', 'vyperLogo', 'Vyper', startVyper)
// Featured
const pipelineEnv = createEnvButton('assets/img/pipelineLogo.webp', 'pipelineLogo', 'Pipeline', startPipeline)
const debuggerEnv = createEnvButton('assets/img/debuggerLogo.webp', 'debuggerLogo', 'Debugger', startDebugger)

@ -117,7 +117,7 @@ class MultiParamManager {
title = this.funABI.type === 'receive' ? '(receive)' : '(fallback)'
}
this.basicInputField = yo`<input class="form-control"></input>`
this.basicInputField = yo`<input class="form-control" data-id="multiParamManagerBasicInputField"></input>`
this.basicInputField.setAttribute('placeholder', this.inputs)
this.basicInputField.setAttribute('title', this.inputs)
this.basicInputField.setAttribute('data-id', this.inputs)
@ -126,7 +126,7 @@ class MultiParamManager {
this.clickCallBack(this.funABI.inputs, this.basicInputField.value)
}
const width = this.isDeploy ? '' : 'w-50'
let funcButton = yo`<button onclick=${() => onClick()} class="${css.instanceButton} ${width} btn btn-sm">${title}</button>`
let funcButton = yo`<button onclick=${() => onClick()} class="${css.instanceButton} ${width} btn btn-sm" data-id="multiParamManagerFuncButton">${title}</button>`
this.contractActionsContainerSingle = yo`
<div class="${css.contractActionsContainerSingle} pt-2">
${funcButton}
@ -145,7 +145,7 @@ class MultiParamManager {
}
}
var expandedButton = yo`<button onclick=${() => { multiOnClick() }} class="${css.instanceButton}"></button>`
var expandedButton = yo`<button onclick=${() => { multiOnClick() }} class="${css.instanceButton}" data-id="multiParamManagerExpandedButton"></button>`
this.contractActionsContainerMulti = yo`<div class="${css.contractActionsContainerMulti}" >
<div class="${css.contractActionsContainerMultiInner} text-dark" >

@ -0,0 +1,30 @@
const EventEmitter = require('events')
class clearEditablecontent extends EventEmitter {
command (cssSelector) {
this.api.perform((done) => {
clearContent(this.api, cssSelector, () => {
done()
this.emit('complete')
})
})
return this
}
}
function clearContent (browser, cssSelector, callback) {
browser.execute(function (cssSelector) {
const selection = window.getSelection()
const range = document.createRange()
range.selectNodeContents(document.querySelector(cssSelector))
selection.removeAllRanges()
selection.addRange(range)
}, [cssSelector], function () {
browser.sendKeys(cssSelector, browser.Keys.BACK_SPACE)
.pause(5000)
callback()
})
}
module.exports = clearEditablecontent

@ -13,10 +13,19 @@ class CreateContract extends EventEmitter {
}
function createContract (browser, inputParams, callback) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
if (inputParams) {
browser.clickLaunchIcon('settings').clickLaunchIcon('udapp')
.setValue('div[class^="contractActionsContainerSingle"] input', inputParams, function () {
browser.click('#runTabView button[class^="instanceButton"]').pause(500).perform(function () { callback() })
})
} else {
browser
.clickLaunchIcon('settings')
.clickLaunchIcon('udapp')
.click('#runTabView button[class^="instanceButton"]')
.pause(500)
.perform(function () { callback() })
}
}
module.exports = CreateContract

@ -3,7 +3,7 @@ const EventEmitter = require('events')
class ExecuteScript extends EventEmitter {
command (script) {
this.api
.clearValue('*[data-id="terminalCliInput"]')
.clearEditableContent('*[data-id="terminalCliInput"]')
.click('*[data-id="terminalCli"]')
.sendKeys('*[data-id="terminalCliInput"]', script)
.sendKeys('*[data-id="terminalCliInput"]', this.api.Keys.ENTER)

@ -3,23 +3,26 @@ const EventEmitter = require('events')
class GetInstalledPlugins extends EventEmitter {
command (cb) {
const browser = this.api
const plugins = []
browser.waitForElementPresent('[plugin]:not([plugin=""]')
.perform((done) => {
browser.execute(() => {
const pluginNames = []
const plugins = document.querySelectorAll('[plugin]:not([plugin=""]')
browser.click('*[data-id="remixIdeIconPanel"]')
.waitForElementPresent('[plugin]:not([plugin=""])')
.elements('css selector', '[plugin]:not([plugin=""])', (res) => {
res.value.forEach(function (jsonWebElement) {
const jsonWebElementId = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]]
browser.elementIdAttribute(jsonWebElementId, 'plugin', (jsonElement) => {
const attribute = jsonElement.value
plugins.forEach(plugin => {
pluginNames.push(plugin.getAttribute('plugin'))
plugins.push(attribute)
})
return pluginNames
}, [], (result) => {
done()
cb(result.value)
this.emit('complete')
})
})
.perform((done) => {
done()
cb(plugins)
this.emit('complete')
})
return this
}
}

@ -10,7 +10,7 @@ class JournalChildIncludes extends EventEmitter {
this.api.elements('css selector', '*[data-id="terminalJournal"]', (res) => {
res.value.forEach(function (jsonWebElement) {
const jsonWebElementId = jsonWebElement.ELEMENT
const jsonWebElementId = jsonWebElement.ELEMENT || jsonWebElement[Object.keys(jsonWebElement)[0]]
browser.elementIdText(jsonWebElementId, (jsonElement) => {
const text = jsonElement.value

@ -7,7 +7,7 @@ const EventEmitter = require('events')
class SwitchBrowserTab extends EventEmitter {
command (index) {
this.api.perform((browser, done) => {
browser.window_handles((result) => {
browser.windowHandles((result) => {
browser.switchWindow(result.value[index])
done()
})

@ -15,10 +15,10 @@ class TestContracts extends EventEmitter {
function testContracts (browser, fileName, contractCode, compiledContractNames, callback) {
browser
.clickLaunchIcon('solidity')
.clearValue('#input textarea')
.addFile(fileName, contractCode)
.pause(1000)
.verifyContracts(compiledContractNames)
.perform(() => {
callback()
})

@ -6,14 +6,12 @@ module.exports = function (browser, callback, url, preloadPlugins = true) {
.pause(5000)
.switchBrowserTab(0)
.injectScript('test-browser/helpers/applytestmode.js', function () {
browser.resizeWindow(2560, 1440, () => {
browser.fullscreenWindow(() => {
if (preloadPlugins) {
initModules(browser, () => {
browser.clickLaunchIcon('solidity')
.pause(2000)
.execute(() => {
document.getElementById('autoCompile').click()
})
.click('*[for="autoCompile"]')
.perform(function () {
callback()
})

@ -48,7 +48,6 @@ module.exports = {
.click('*[data-id="settingsTabSaveGistToken"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token saved')
.click('*[data-id="tooltipCloseButton"]')
},
'Should copy github access token to clipboard': function (browser) {
@ -56,7 +55,6 @@ module.exports = {
.click('*[data-id="copyToClipboardCopyIcon"]')
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Copied value to clipboard.')
.click('*[data-id="tooltipCloseButton"]')
},
'Should remove github access token': function (browser) {
@ -65,7 +63,6 @@ module.exports = {
.waitForElementVisible('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 5000)
.assert.containsText('*[data-shared="tooltipPopup"]:nth-last-of-type(1)', 'Access token removed')
.assert.containsText('*[data-id="settingsTabGistAccessToken"]', '')
.click('*[data-id="tooltipCloseButton"]')
},
'Should load dark theme': function (browser) {

@ -25,8 +25,8 @@ module.exports = {
'Should sign message using account key': function (browser) {
browser.waitForElementPresent('*[data-id="settingsRemixRunSignMsg"]')
.click('*[data-id="settingsRemixRunSignMsg"]')
.waitForElementPresent('*[data-id="modalDialogContainer"]')
.click('*[data-id="modalDialogCustomPromptText"]')
.pause(2000)
.waitForElementPresent('*[data-id="modalDialogCustomPromptText"]')
.setValue('*[data-id="modalDialogCustomPromptText"]', 'Remix is cool!')
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgHash"]')
.assert.elementNotPresent('*[data-id="settingsRemixRunSignMsgSignature"]')

@ -2,7 +2,7 @@
// const https = require('https')
module.exports = function sauce (callback) {
return callback()
if (typeof callback === 'function') return callback()
/*
const currentTest = this.client.currentTest
const username = this.client.options.username

@ -0,0 +1,84 @@
'use strict'
require('@babel/register')()
const crxFile = require('fs').readFileSync('apps/remix-ide/test-browser/extensions/chrome/metamask.crx')
const metamaskExtension = new Buffer.from(crxFile).toString('base64') // eslint-disable-line
module.exports = {
'src_folders': ['apps/remix-ide/test-browser/tests'],
'output_folder': 'apps/remix-ide/reports/tests',
'custom_commands_path': ['apps/remix-ide/test-browser/commands'],
'custom_assertions_path': '',
'page_objects_path': '',
'globals_path': '',
'test_settings': {
'default': {
'selenium_port': 4444,
'selenium_host': 'localhost',
'globals': {
'waitForConditionTimeout': 10000,
'asyncHookTimeout': 100000
},
'screenshots': {
'enabled': true,
'path': 'apps/remix-ide/reports/screenshots',
'on_failure': true,
'on_error': true
},
'desiredCapabilities': {
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true
},
'exclude': ['apps/remix-ide/test-browser/tests/runAndDeploy.js']
},
'chrome': {
'desiredCapabilities': {
'browserName': 'chrome',
'javascriptEnabled': true,
'acceptSslCerts': true,
'goog:chromeOptions': {
'args': ['window-size=2560,1440', 'start-fullscreen']
}
}
},
'chrome-runAndDeploy': {
'desiredCapabilities': {
'browserName': 'chrome',
'javascriptEnabled': true,
'acceptSslCerts': true,
'goog:chromeOptions': {
'args': ['window-size=2560,1440', 'start-fullscreen'],
'extensions': [metamaskExtension]
}
}
},
'safari': {
'desiredCapabilities': {
'browserName': 'safari',
'javascriptEnabled': true,
'acceptSslCerts': true
}
},
'ie': {
'desiredCapabilities': {
'browserName': 'internet explorer',
'javascriptEnabled': true,
'acceptSslCerts': true
}
},
'firefox': {
'desiredCapabilities': {
'browserName': 'firefox',
'javascriptEnabled': true,
'acceptSslCerts': true
}
}
}
}

@ -18,5 +18,9 @@
}
}
},
"projects": {}
"projects": {
"remix-ide": {
"tags": []
}
}
}

23370
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -2,12 +2,31 @@
"name": "remix-project",
"version": "0.0.0",
"license": "MIT",
"description": "Ethereum Remix Monorepo",
"keywords": [
"ethereum",
"solidity",
"compiler"
],
"repository": {
"type": "git",
"url": "git+https://github.com/ethereum/remix-project.git"
},
"author": "@yann300",
"bugs": {
"url": "https://github.com/ethereum/remix-project/issues"
},
"homepage": "https://github.com/ethereum/remix-project#readme",
"bin": {
"remix-ide": "./apps/remix-ide/bin/remix-ide"
},
"scripts": {
"nx": "nx",
"start": "nx serve",
"start": "nx start",
"serve": "nx serve",
"build": "nx build",
"test": "nx test",
"lint": "nx workspace-lint && nx lint",
"lint": "nx lint",
"e2e": "nx e2e",
"affected:apps": "nx affected:apps",
"affected:libs": "nx affected:libs",
@ -23,18 +42,186 @@
"update": "nx migrate latest",
"workspace-schematic": "nx workspace-schematic",
"dep-graph": "nx dep-graph",
"help": "nx help"
"help": "nx help",
"setupremix": "npm run linkremixdebug && npm run linkremixlib && npm run linkremixsolidity && npm run linkremixanalyzer && npm run linkremixtests && npm run linkremixsimulator",
"pullremix": "git clone https://github.com/ethereum/remix",
"linkremixlib": "cd node_modules && rm -rf remix-lib && ln -s ../../remix/remix-lib remix-lib && cd ..",
"linkremixsolidity": "cd node_modules && rm -rf remix-solidity && ln -s ../../remix/remix-solidity remix-solidity && cd ..",
"linkremixtests": "cd node_modules && rm -rf remix-tests && ln -s ../../remix/remix-tests remix-tests && cd ..",
"linkremixdebug": "cd node_modules && rm -rf remix-debug && ln -s ../../remix/remix-debug remix-debug && cd ..",
"linkremixanalyzer": "cd node_modules && rm -rf remix-analyzer && ln -s ../../remix/remix-analyzer remix-analyzer && cd ..",
"linkremixsimulator": "cd node_modules && rm -rf remix-simulator && ln -s ../../remix/remix-simulator remix-simulator && cd ..",
"build_debugger": "browserify apps/remix-ide/src/app/debugger/remix-debugger/index.js -o apps/remix-ide/src/app/debugger/remix-debugger/build/app.js",
"browsertest": "sleep 5 && npm run nightwatch_local",
"csslint": "csslint --ignore=order-alphabetical --errors='errors,duplicate-properties,empty-rules' --exclude-list='apps/remix-ide/assets/css/font-awesome.min.css' apps/remix-ide/assets/css/",
"downloadsolc_root": "wget --no-check-certificate https://solc-bin.ethereum.org/bin/soljson-v0.6.6+commit.6c089d02.js -O soljson.js",
"make-mock-compiler": "node 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 nightwatch.js --env chrome ",
"nightwatch_local_libraryDeployment": "nightwatch ./apps/remix-ide/test-browser/tests/libraryDeployment.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_solidityImport": "nightwatch ./apps/remix-ide/test-browser/tests/solidityImport.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_recorder": "nightwatch ./apps/remix-ide/test-browser/tests/recorder.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_transactionExecution": "nightwatch ./apps/remix-ide/test-browser/tests/transactionExecution.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_staticAnalysis": "nightwatch ./apps/remix-ide/test-browser/tests/staticAnalysis.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_signingMessage": "nightwatch ./apps/remix-ide/test-browser/tests/signingMessage.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_specialFunctions": "nightwatch ./apps/remix-ide/test-browser/tests/specialFunctions.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_solidityUnitTests": "nightwatch ./apps/remix-ide/test-browser/tests/solidityUnittests.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_remixd": "nightwatch ./apps/remix-ide/test-browser/tests/remixd.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_terminal": "nightwatch ./apps/remix-ide/test-browser/tests/terminal.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_gist": "nightwatch ./apps/remix-ide/test-browser/tests/gist.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_workspace": "nightwatch ./apps/remix-ide/test-browser/tests/workspace.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_defaultLayout": "nightwatch ./apps/remix-ide/test-browser/tests/defaultLayout.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_pluginManager": "nightwatch ./apps/remix-ide/test-browser/tests/pluginManager.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_publishContract": "nightwatch ./apps/remix-ide/test-browser/tests/publishContract.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_generalSettings": "nightwatch ./apps/remix-ide/test-browser/tests/generalSettings.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_fileExplorer": "nightwatch ./apps/remix-ide/test-browser/tests/fileExplorer.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_debugger": "nightwatch ./apps/remix-ide/test-browser/tests/debugger.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_editor": "nightwatch ./apps/remix-ide/test-browser/tests/editor.test.js --config nightwatch.js --env chrome ",
"nightwatch_local_runAndDeploy": "nightwatch ./apps/remix-ide/test-browser/tests/runAndDeploy.js --config nightwatch.js --env chrome-runAndDeploy ",
"onchange": "onchange apps/remix-ide/build/app.js -- npm-run-all lint",
"prepublish": "mkdirp build; npm-run-all -ls downloadsolc_root build",
"remixd": "remixd -s ./apps/remix-ide/contracts --remix-ide http://127.0.0.1:8080",
"selenium": "selenium-standalone start",
"selenium-install": "selenium-standalone install",
"sourcemap": "exorcist --root ../ apps/remix-ide/build/app.js.map > apps/remix-ide/build/app.js",
"test-browser": "npm-run-all -lpr selenium downloadsolc_root make-mock-compiler serve browsertest",
"watch": "watchify apps/remix-ide/src/index.js -dv -p browserify-reload -o apps/remix-ide/build/app.js --exclude solc",
"reinstall": "rm ./node-modules/ -rf; rm package-lock.json; rm ./build/ -rf; npm install; npm run build",
"ganache-cli": "npx ganache-cli"
},
"standard": {
"ignore": [
"apps/remix-ide/build/",
"apps/remix-ide/src/app/editor/mode-solidity.js",
"apps/remix-ide/soljson.js",
"apps/remix-ide/assets/js/"
],
"parser": "babel-eslint"
},
"browserify": {
"transform": [
[
"babelify",
{
"sourceMapsAbsolute": false,
"sourceMaps": true,
"plugins": [
[
"module:fast-async",
{
"runtimePattern": null,
"compiler": {
"es7": true,
"noRuntime": true,
"promises": true,
"wrapAwait": true
}
}
],
[
"module:babel-plugin-yo-yoify"
],
[
"module:@babel/plugin-transform-object-assign"
]
],
"presets": [
"@babel/preset-env"
]
}
]
]
},
"dependencies": {
"@remixproject/engine": "^0.2.3",
"http-server": "^0.11.1",
"remixd": "0.1.8-alpha.10",
"standard": "^8.5.0"
},
"private": true,
"dependencies": {},
"devDependencies": {
"@nrwl/workspace": "9.2.4",
"@types/node": "~8.9.4",
"dotenv": "6.2.0",
"ts-node": "~7.0.0",
"tslint": "~6.0.0",
"eslint": "6.8.0",
"typescript": "~3.8.3",
"prettier": "1.19.1"
"prettier": "1.19.1",
"@babel/core": "^7.4.5",
"@babel/plugin-transform-object-assign": "^7.2.0",
"@babel/polyfill": "^7.4.4",
"@babel/preset-env": "^7.4.5",
"@babel/preset-es2015": "latest",
"@babel/preset-es2017": "latest",
"@babel/preset-stage-0": "^7.0.0",
"@babel/register": "^7.4.4",
"@fortawesome/fontawesome-free": "^5.8.1",
"@resolver-engine/imports": "^0.3.0",
"ace-mode-move": "0.0.1",
"ace-mode-solidity": "^0.1.0",
"ace-mode-zokrates": "^1.0.0",
"async": "^2.1.2",
"babel-eslint": "^10.0.0",
"babel-plugin-fast-async": "^6.1.2",
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"babel-plugin-yo-yoify": "^2.0.0",
"babelify": "^10.0.0",
"brace": "^0.8.0",
"browserify": "^16.2.3",
"browserify-reload": "^1.0.3",
"component-type": "^1.2.1",
"copy-text-to-clipboard": "^1.0.4",
"csjs-inject": "^1.0.1",
"csslint": "^1.0.2",
"deep-equal": "^1.0.1",
"dotenv": "^8.2.0",
"ethereumjs-util": "^6.2.0",
"ethers": "^4.0.27",
"events": "^3.0.0",
"execr": "^1.0.1",
"exorcist": "^0.4.0",
"fast-async": "^7.0.6",
"fast-levenshtein": "^2.0.6",
"ganache-cli": "^6.8.1",
"gists": "^1.0.1",
"ipfs-mini": "^1.1.5",
"is-electron": "^2.2.0",
"javascript-serialize": "^1.6.1",
"jquery": "^3.3.1",
"js-base64": "^2.1.9",
"js-beautify": "1.6.14",
"minixhr": "^3.2.2",
"mkdirp": "^0.5.1",
"nanohtml": "^1.6.3",
"nightwatch": "^1.3.5",
"notify-error": "^1.2.0",
"npm-link-local": "^1.1.0",
"npm-merge-driver": "^2.3.5",
"npm-run-all": "^4.0.2",
"onchange": "^3.2.1",
"remix-analyzer": "0.5.2",
"remix-debug": "0.4.4",
"remix-lib": "0.4.29",
"remix-simulator": "0.1.9-beta.5",
"remix-solidity": "0.3.30",
"remix-tabs": "1.0.48",
"remix-tests": "0.1.33",
"remixd": "0.1.8-alpha.10",
"request": "^2.83.0",
"rimraf": "^2.6.1",
"selenium-standalone": "^6.17.0",
"semver": "^6.1.2",
"solc": "^0.6.0",
"swarmgw": "^0.3.1",
"tape": "^4.5.1",
"uglify-js": "^2.8.16",
"vm-browserify": "0.0.4",
"watchify": "^3.9.0",
"web3": "1.2.4",
"webworkify": "^1.2.1",
"yo-yo": "^1.2.2",
"yo-yoify": "^3.7.3"
}
}

@ -0,0 +1,11 @@
module.exports = {
version: '3.8.1',
baseURL: 'https://selenium-release.storage.googleapis.com',
drivers: {
chrome: {
version: '2.39',
arch: process.arch,
baseURL: 'https://chromedriver.storage.googleapis.com'
}
}
}

File diff suppressed because one or more lines are too long

@ -1,8 +1,69 @@
{
"version": 1,
"projects": {},
"projects": {
"remix-ide": {
"root": "apps/remix-ide",
"sourceRoot": "apps/remix-ide/src",
"projectType": "application",
"schematics": {},
"architect": {
"build": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "browserify apps/remix-ide/src/index.js -o apps/remix-ide/build/app.js --exclude solc"
}
]
}
},
"start": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npm-run-all -lpr serve watch onchange remixd"
}
]
}
},
"serve": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "npx http-server ./apps/remix-ide"
}
]
}
},
"lint": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "standard | notify-error"
}
]
}
},
"test": {
"builder": "@nrwl/workspace:run-commands",
"options": {
"commands": [
{
"command": "csslint && standard && node test/index.js"
}
]
}
}
}
}
},
"cli": {
"defaultCollection": "@nrwl/workspace"
"defaultCollection": "@nrwl/web"
},
"schematics": {
"@nrwl/workspace": {
@ -59,5 +120,6 @@
"linter": "eslint"
}
}
}
},
"defaultProject": "remix-ide"
}

Loading…
Cancel
Save