Skip to content

Commit 78af0c2

Browse files
yann300ci-bot
authored andcommitted
fix tests
1 parent dd85e49 commit 78af0c2

File tree

6 files changed

+19
-39
lines changed

6 files changed

+19
-39
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ function createContract (browser: NightwatchBrowser, inputParams: string, callba
1717
if (inputParams) {
1818
browser.setValue('.udapp_contractActionsContainerSingle > input', inputParams, function () {
1919
browser
20+
.pause(1000) // wait to get the button enabled
2021
.waitForElementVisible('.udapp_contractActionsContainerSingle > div')
2122
.click('.udapp_contractActionsContainerSingle > div').pause(500).perform(function () { callback() })
2223
})

apps/remix-ide-e2e/src/tests/ballot.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,7 @@ module.exports = {
120120
.connectToExternalHttpProvider('http://localhost:8545', 'Custom')
121121
.clickLaunchIcon('solidity')
122122
.clickLaunchIcon('udapp')
123-
.clearValue('input[placeholder="bytes32[] proposalNames"]')
124-
.setValue('input[placeholder="bytes32[] proposalNames"]', '["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]')
125-
.click('*[data-id="Deploy - transact (not payable)"]')
123+
.createContract('["0x48656c6c6f20576f726c64210000000000000000000000000000000000000000"]')
126124
.clickInstance(0)
127125
.click('*[data-id="terminalClearConsole"]')
128126
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' })

apps/remix-ide-e2e/src/tests/ballot_0_4_14.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,7 @@ module.exports = {
9494
.connectToExternalHttpProvider('http://localhost:8545', 'Custom')
9595
.clickLaunchIcon('solidity')
9696
.clickLaunchIcon('udapp')
97-
.clearValue('input[placeholder="uint8 _numProposals"]')
98-
.setValue('input[placeholder="uint8 _numProposals"]', '2')
99-
.click('*[data-id="Deploy - transact (not payable)"]')
97+
.createContract('2')
10098
.clickInstance(0)
10199
.click('*[data-id="terminalClearConsole"]')
102100
.clickFunction('delegate - transact (not payable)', { types: 'address to', values: '0xCA35b7d915458EF540aDe6068dFe2F44E8fa733c' })

apps/remix-ide-e2e/src/tests/dgit_local.test.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -132,15 +132,19 @@ module.exports = {
132132
.click('*[data-id="commitButton"]')
133133
},
134134
'push the commit #group1': function (browser: NightwatchBrowser) {
135+
const tag = browser.options.desiredCapabilities?.browserName === 'firefox' ? 'ahead' : ''
135136
browser
137+
.waitForElementVisible('*[data-id="commands-panel"]', 60000)
136138
.click('*[data-id="commands-panel"]')
137-
.waitForElementVisible('*[data-id="sourcecontrol-push"]')
139+
.waitForElementVisible('*[data-id="sourcecontrol-push"]', 60000)
138140
.click('*[data-id="sourcecontrol-push"]')
139141
.pause(2000)
142+
.waitForElementVisible('*[data-id="commits-panel"]', 60000)
140143
.click('*[data-id="commits-panel"]')
141144
.waitForElementPresent({
142-
selector: '//*[@data-id="commit-summary-testcommit2-"]',
143-
locateStrategy: 'xpath'
145+
selector: `//*[@data-id="commit-summary-testcommit2-${tag}"]`,
146+
locateStrategy: 'xpath',
147+
timeout: 60000
144148
}).pause(2000)
145149
},
146150
'check the log for testcommit2 #group1': async function (browser: NightwatchBrowser) {

apps/remix-ide-e2e/src/tests/sol2uml.test.ts

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module.exports = {
2222
.rightClick('*[data-id="treeViewLitreeViewItemsecondContract.sol"]')
2323
.click('*[id="menuitemgeneratecustomaction"')
2424
.waitForElementVisible('*[id="sol-uml-gen"]')
25-
.waitForElementVisible('*[data-id="treeViewLitreeViewItemsecondContract_flattened.sol"]')
25+
.waitForElementVisible('*[data-id="treeViewLitreeViewItemsecondContract_flattened.sol"]', 60000)
2626
},
2727
'Zoom into uml diagram #group1': function (browser: NightwatchBrowser) {
2828
browser
@@ -177,38 +177,17 @@ contract Ballot {
177177
{
178178
'secondContract.sol': {
179179
content: `
180-
// SPDX-License-Identifier: GPL-3.0
180+
// SPDX-License-Identifier: MIT
181+
pragma solidity ^0.8.20;
181182
182-
pragma solidity ^0.5.9;
183+
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
184+
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol";
183185
184-
import "@0x/contracts-erc20/contracts/src/ERC20Token.sol";
185-
186-
/**
187-
* @title SampleERC20
188-
* @dev Create a sample ERC20 standard token
189-
*/
190-
contract SampleERC20 is ERC20Token {
191-
192-
string public name;
193-
string public symbol;
194-
uint256 public decimals;
195-
196-
constructor (
197-
string memory _name,
198-
string memory _symbol,
199-
uint256 _decimals,
200-
uint256 _totalSupply
201-
)
202-
public
203-
{
204-
name = _name;
205-
symbol = _symbol;
206-
decimals = _decimals;
207-
_totalSupply = _totalSupply;
208-
balances[msg.sender] = _totalSupply;
209-
}
186+
contract MyToken is ERC20, ERC20Permit {
187+
constructor() ERC20("MyToken", "MTK") ERC20Permit("MyToken") {}
210188
}
211189
190+
212191
`}
213192
}
214193
]

apps/remix-ide-e2e/src/tests/vyper_api.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ declare global {
1010
module.exports = {
1111
'@disabled': true,
1212
before: function (browser: NightwatchBrowser, done: VoidFunction) {
13-
init(browser, done, 'http://localhost:8080')
13+
init(browser, done)
1414
},
1515

1616
'Should connect to vyper plugin #group1': function (browser: NightwatchBrowser) {

0 commit comments

Comments
 (0)