Skip to content

Commit 805c6b2

Browse files
authored
Merge branch 'master' into rmMatomoCode
2 parents 2b0093c + 8d8c554 commit 805c6b2

File tree

249 files changed

+12011
-10071
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

249 files changed

+12011
-10071
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ parameters:
55
type: boolean
66
default: false
77
orbs:
8-
browser-tools: circleci/[email protected].1
8+
browser-tools: circleci/[email protected].3
99
jobs:
1010
build:
1111
docker:

.eslintrc.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@
4747
"eslint-disable-next-line no-empty": "off",
4848
"no-empty": "off",
4949
"jsx-a11y/anchor-is-valid": "off",
50-
"@typescript-eslint/no-inferrable-types": "off"
50+
"@typescript-eslint/no-inferrable-types": "off",
51+
"indent": ["error", 2]
5152
}
5253
},
5354
{
@@ -58,7 +59,9 @@
5859
"extends": [
5960
"plugin:@nrwl/nx/javascript"
6061
],
61-
"rules": {}
62+
"rules": {
63+
"indent": ["error", 2]
64+
}
6265
}
6366
],
6467
"globals": {

.husky/pre-commit

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
yarn lint-staged

.lintstagedrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.{tsx,ts,js,jsx,mjs,cjs}": ["prettier --write","eslint --fix"]
3+
}

.prettierignore

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
**/.yarn/*
2+
3+
# Ignore node_modules
4+
./node_modules
5+
6+
# Ignore e2e files
7+
./apps/remix-ide-e2e/*
8+
9+
# Ignore build artefacts
10+
./dist
11+
12+
# Ignore all json files
13+
**/*.json

.prettierrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"tabWidth": 2,
3+
"useTabs": false,
4+
"semi": false,
5+
"singleQuote": true,
6+
"quoteProps": "consistent",
7+
"jsxSingleQuote": false,
8+
"bracketSpacing": false,
9+
"trailingComma": "none",
10+
"jsxBracketSameLine": false,
11+
"arrowParens": "always",
12+
"singleAttributePerLine": false,
13+
"ignorePath": ".prettierignore"
14+
}

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,13 @@ yarn global add nx
6363
```bash
6464
git clone https://github.com/ethereum/remix-project.git
6565
```
66-
* Build `remix-project`:
67-
```bash
68-
cd remix-project
69-
yarn install
70-
yarn run build:libs // Build remix libs
71-
nx build
72-
nx serve
73-
```
66+
* Build and Run `remix-project`:
67+
68+
1. Move to project directory: `cd remix-project`
69+
2. Install dependencies: `yarn install` or simply run `yarn`
70+
3. Build Remix libraries: `yarn run build:libs`
71+
4. Build Remix project: `yarn build`
72+
5. Build and run project server: `yarn serve`. Optionally, run `yarn serve:hot` to enable hot module reload for frontend updates.
7473

7574
Open `http://127.0.0.1:8080` in your browser to load Remix IDE locally.
7675

@@ -151,7 +150,7 @@ To run the Selenium tests via Nightwatch:
151150

152151
- Install Selenium for the first time: `yarn run selenium-install`
153152
- Run a selenium server: `yarn run selenium`
154-
- Build & Serve Remix: `nx serve`
153+
- Build & Serve Remix: `yarn serve`
155154
- Run all the end-to-end tests:
156155

157156
for Firefox: `yarn run nightwatch_local_firefox`, or

apps/remix-ide-e2e/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
"npm": "^6.14.15"
77
},
88
"dependencies": {
9-
"@openzeppelin/contracts": "^4.8.3",
10-
"@openzeppelin/contracts-upgradeable": "^4.8.3",
9+
"@openzeppelin/contracts": "^4.9.2",
10+
"@openzeppelin/contracts-upgradeable": "^4.9.2",
1111
"@openzeppelin/upgrades-core": "^1.22.0",
1212
"@openzeppelin/wizard": "^0.1.1",
1313
"@remix-project/remixd": "../../dist/libs/remixd",
1414
"deep-equal": "^1.0.1",
1515
"ganache-cli": "^6.8.1",
16-
"selenium-standalone": "^8.2.3",
16+
"selenium-standalone": "^9.0.3",
1717
"tree-kill": "^1.2.2"
1818
},
1919
"devDependencies": {

apps/remix-ide-e2e/src/commands/clickFunction.ts

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,37 @@
1-
import { NightwatchBrowser, NightwatchClickFunctionExpectedInput } from 'nightwatch'
1+
import {
2+
NightwatchBrowser,
3+
NightwatchClickFunctionExpectedInput
4+
} from 'nightwatch'
25
import EventEmitter from 'events'
36

47
class ClickFunction extends EventEmitter {
5-
command (this: NightwatchBrowser, fnFullName: string, expectedInput?: NightwatchClickFunctionExpectedInput): NightwatchBrowser {
6-
this.api.waitForElementPresent('.instance button[data-title="' + fnFullName + '"]')
8+
command(
9+
this: NightwatchBrowser,
10+
fnFullName: string,
11+
expectedInput?: NightwatchClickFunctionExpectedInput
12+
): NightwatchBrowser {
13+
this.api
14+
.waitForElementPresent('.instance *[data-title="' + fnFullName + '"]')
715
.perform(function (client, done) {
8-
client.execute(function () {
9-
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
10-
}, [], function () {
11-
if (expectedInput) {
12-
client.setValue('#runTabView input[data-title="' + expectedInput.types + '"]', expectedInput.values, _ => _)
16+
client.execute(
17+
function () {
18+
document.querySelector('#runTabView').scrollTop =
19+
document.querySelector('#runTabView').scrollHeight
20+
},
21+
[],
22+
function () {
23+
if (expectedInput) {
24+
client.setValue(
25+
'#runTabView input[data-title="' + expectedInput.types + '"]',
26+
expectedInput.values,
27+
(_) => _
28+
)
29+
}
30+
done()
1331
}
14-
done()
15-
})
32+
)
1633
})
17-
.scrollAndClick('.instance button[data-title="' + fnFullName + '"]')
34+
.scrollAndClick('.instance *[data-title="' + fnFullName + '"]')
1835
.pause(2000)
1936
.perform(() => {
2037
this.emit('complete')

apps/remix-ide-e2e/src/commands/testConstantFunction.ts

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,80 @@
1-
import { NightwatchBrowser, NightwatchTestConstantFunctionExpectedInput } from 'nightwatch'
1+
import {
2+
NightwatchBrowser,
3+
NightwatchTestConstantFunctionExpectedInput
4+
} from 'nightwatch'
25
import EventEmitter from 'events'
36

47
class TestConstantFunction extends EventEmitter {
5-
command (this: NightwatchBrowser, address: string, fnFullName: string, expectedInput: NightwatchTestConstantFunctionExpectedInput | null, expectedOutput: string): NightwatchBrowser {
8+
command(
9+
this: NightwatchBrowser,
10+
address: string,
11+
fnFullName: string,
12+
expectedInput: NightwatchTestConstantFunctionExpectedInput | null,
13+
expectedOutput: string
14+
): NightwatchBrowser {
615
console.log('TestConstantFunction ' + address + ' fnFullName')
716
this.api.perform((done) => {
8-
testConstantFunction(this.api, address, fnFullName, expectedInput, expectedOutput, () => {
9-
done()
10-
this.emit('complete')
11-
})
17+
testConstantFunction(
18+
this.api,
19+
address,
20+
fnFullName,
21+
expectedInput,
22+
expectedOutput,
23+
() => {
24+
done()
25+
this.emit('complete')
26+
}
27+
)
1228
})
1329
return this
1430
}
1531
}
1632

17-
function testConstantFunction (browser: NightwatchBrowser, address: string, fnFullName: string, expectedInput: NightwatchTestConstantFunctionExpectedInput, expectedOutput: string, cb: VoidFunction) {
18-
browser.waitForElementPresent('.instance button[data-title="' + fnFullName + '"]').perform(function (client, done) {
19-
client.execute(function () {
20-
document.querySelector('#runTabView').scrollTop = document.querySelector('#runTabView').scrollHeight
21-
}, [], function () {
22-
if (expectedInput) {
23-
client.waitForElementPresent('#runTabView input[data-title="' + expectedInput.types + '"]')
24-
.setValue('#runTabView input[data-title="' + expectedInput.types + '"]', expectedInput.values)
25-
}
26-
done()
33+
function testConstantFunction(
34+
browser: NightwatchBrowser,
35+
address: string,
36+
fnFullName: string,
37+
expectedInput: NightwatchTestConstantFunctionExpectedInput,
38+
expectedOutput: string,
39+
cb: VoidFunction
40+
) {
41+
browser
42+
.waitForElementPresent('.instance *[data-title="' + fnFullName + '"]')
43+
.perform(function (client, done) {
44+
client.execute(
45+
function () {
46+
document.querySelector('#runTabView').scrollTop =
47+
document.querySelector('#runTabView').scrollHeight
48+
},
49+
[],
50+
function () {
51+
if (expectedInput) {
52+
client
53+
.waitForElementPresent(
54+
'#runTabView input[data-title="' + expectedInput.types + '"]'
55+
)
56+
.setValue(
57+
'#runTabView input[data-title="' + expectedInput.types + '"]',
58+
expectedInput.values
59+
)
60+
}
61+
done()
62+
}
63+
)
2764
})
28-
})
29-
.click(`#instance${address} button[data-title="${fnFullName}"]`)
65+
.click(`#instance${address} *[data-title="${fnFullName}"]`)
3066
.pause(1000)
31-
.waitForElementPresent('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')
32-
.scrollInto('#instance' + address + ' .udapp_contractActionsContainer .udapp_value')
33-
.assert.containsText('#instance' + address + ' .udapp_contractActionsContainer', expectedOutput).perform(() => {
67+
.waitForElementPresent(
68+
'#instance' + address + ' .udapp_contractActionsContainer .udapp_value'
69+
)
70+
.scrollInto(
71+
'#instance' + address + ' .udapp_contractActionsContainer .udapp_value'
72+
)
73+
.assert.containsText(
74+
'#instance' + address + ' .udapp_contractActionsContainer',
75+
expectedOutput
76+
)
77+
.perform(() => {
3478
cb()
3579
})
3680
}

0 commit comments

Comments
 (0)