poanetwork / e2e-test-token-wizard Goto Github PK
View Code? Open in Web Editor NEWA tool for end-to-end test the Token wizard. Based Selenium Webdriver.
License: GNU General Public License v3.0
A tool for end-to-end test the Token wizard. Based Selenium Webdriver.
License: GNU General Public License v3.0
For example, here: https://github.com/poanetwork/e2e-test-token-wizard/blob/master/pages/InvestPage.js#L15
Let's define URL of wizard everywhere from startURL
parameter https://github.com/poanetwork/e2e-test-token-wizard/blob/master/config.json#L2
Let's add check for .manage
page of Token Wizard. It looks like:
/manage/[crowdsale_address]
Problem: there are multiple folders are created in the root path.
Solution: create one folder for output files and add an ability to manage path from the config file. In this folder ./results...
folders will be added and ./artifacts
folder.
Also, I am curious what is the difference between screenshots in ./artifacts
folder and in ./results...
folders. Do we need ./artifacts
folder at all?
Are these packages used in utility:
"dependencies": {
"body-parser": "~1.18.2",
...
"cookie-parser": "~1.4.3",
"debug": "~2.6.9",
"express": "~4.15.5",
"jade": "~1.11.0",
"morgan": "~1.9.0",
...
"serve-favicon": "~2.4.5",
...
}
?
If no, let's remove them.
Problem: utility uses one crowdsale.json
config with the configuration of crowdsale for now
Solution: to create multiple configs covered all basic scenarios and choose crowdsale scenario in config.json
Some basic scenarios:
Let's add content of https://github.com/poanetwork/e2e-test-token-wizard/tree/master/artifacts folder to .gitignore
In Readme and source code
Scenario:
{ "account": "0xF16AB2EA0a7F7B28C267cbA3Ed211Ea5c6e27411",
"privateKey": "03c06a9fab22fe0add145e337c5a8251e140f74468d72eab17ec7419ab812cd0",
"networkID":4,
"name": "T1RnWn_0005.json",
"ticker": "test",
"decimals": 3,
"reservedTokens":[
],
"walletAddress":"0xF16AB2EA0a7F7B28C267cbA3Ed211Ea5c6e27411",
"gasprice": 40,
"mincap": 1,
"whitelisting":false,
"tiers":[
{
"name":"###1",
"allowModify": true,
"startDate": "02/16/2018",
"startTime": "03:15pm",
"endDate":"02/16/2018",
"endTime":"03:30pm",
"rate":100,
"supply": 200,
"whitelist":[]
}]
}
Log: error_15_02.log
I've tried to use utility with usage description in README
https://github.com/poanetwork/e2e-test-token-wizard#usage:
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/pages/Page.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/pages/WizardStep3.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/tests/BaseTest.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/pages/TierPage.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/entity/Currency.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/pages/CrowdsalePage.js
/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/pages/InvestPage.js
module.js:540
throw err;
^
Error: Cannot find module './tests/Test2.js'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/Users/viktor/Documents/POANetwork/Test/node_modules/create-poa-crowdsale/index.js:5:13)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)
NoSuchElementError: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="app-content"]/div/div[4]/div/div/div[2]/div[1]/div/div/div[1]/div[1]"}
with all configs are default from the repo
To launch it as a command line tool with arguments. To use this binary, for example, in npm test
script in Token Wizard
Let's create a network provider URL in the config to simplify switching between networks. Or, maybe, it is a better idea to store networkID
in the config and choose provider depending on networkID
. The list of network IDs can be taken from here. Also, we need to get networkID from config for URLs like this:
e2e-test-token-wizard/pages/InvestPage.js
Line 15 in 70ceccc
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.