token-wizard
token-wizard copied to clipboard
(Fix) e2e tests for Token Wizard 2.0: Dutch Auction strategy
We need e2e tests for Dutch Auction strategy of Token Wizard 2.0
@dennis00010011b please describe e2e tests for Dutch Auction you have implemented here https://github.com/poanetwork/token-wizard/pull/889
@dennis00010011b also, describe the steps how to start Dutch Auction e2e tests locally from the beginning (from the cloning of repo)
@vbaranov How to start Dutch Auction e2e tests:
git clone https://github.com/poanetwork/token-wizard.git wiz
cd wiz
git checkout 2.0
git submodule update --init --recursive --remote
npm run installWeb3
npm run e2eDutchAuction
How to start Dutch Auction unit tests locally:
git clone https://github.com/poanetwork/token-wizard.git wiz
cd wiz
git checkout 2.0
git submodule update --init --recursive --remote
npm run installWeb3
npm run testContractsDutchAuction
UI tests for DutchAuctionCrowdsale
- User is able to open wizard welcome page
- Welcome page: button NewCrowdsale present
- Welcome page: button ChooseContract present
- Welcome page: user is able to open Step1 by clicking button NewCrowdsale
- Wizard step#1: user is able to click DutchAuction checkbox
- Wizard step#1: user is able to open Step2 by clicking button Continue
- Wizard step#2:Check persistant if account has changed
- Wizard step#2: user able to fill Name field with valid data
- Wizard step#2: user able to fill Ticker field with valid data
- Wizard step#2: user able to fill Decimals field with valid data
- Wizard step#2: user able to fill out 'Total supply' field with valid data
- Wizard step#2: button Continue is displayed and enabled
- Wizard step#2: user is able to open Step3 by clicking button Continue
- Wizard step#3: field Wallet address contains current metamask account address
- Wizard step#3:Tier#1: Whitelist container present if checkbox 'Whitelist enabled' is selected
- Wizard step#3: field minCap disabled if whitelist enabled
- Wizard step#3: User is able to download CSV file with whitelisted addresses
- Wizard step#3: Number of added whitelisted addresses is correct,data is valid
- Wizard step#3: User is able to bulk delete all whitelisted addresses
- Wizard step#3: All whitelisted addresses are removed after deletion
- Wizard step#3: User is able to add several whitelisted addresses one by one
- Wizard step#3: User is able to remove one whitelisted address
- Wizard step#3: User is able to set "Custom Gasprice" checkbox
- Wizard step#3: User is able to fill out the CustomGasprice field with valid value
- Wizard step#3: User is able to set SafeAndCheapGasprice checkbox
- Wizard step#3:Tier#1:User is able to fill out field 'minRate' with valid data
- Wizard step#3:Tier#1: User is able to fill out field 'maxRate' with valid data
- Wizard step#3: Button 'Continue' is disabled if minRate > maxRate
- Wizard step#3: Button 'Continue' is disabled if crowdsaleSupply>totalSupply
- Wizard step#3:Tier#1: User is able to fill out field Supply with valid data
- Wizard step#3: user is able to proceed to Step4 by clicking button Continue
- Wizard step#4: alert present if user reload the page
- Wizard step#4: user is able to accept alert after reloading the page
- Wizard step#4: button SkipTransaction is presented if user reject a transaction
- Wizard step#4: user is able to skip transaction
- Wizard step#4: alert is displayed if user wants to leave the wizard
- Wizard step#4: User is able to stop deployment
Functional tests for DutchAuctionCrowdsale
- Owner can create DutchAuction crowdsale: 2 whitelisted addresses,duration 3 min
- Invest page: Owner's balance has correct value (totalSupply-crowdsaleSupply)
- Whitelisted investor not able to buy before start of crowdsale
- Invest page: Countdown timer is displayed
- Tier starts as scheduled
- Whitelisted investor#1 is not able to buy less than minCap in first transaction
- Whitelisted investor#1 can buy amount equal minCap
- Invest page: Investor's#1 balance is properly changed after purchase
- Whitelisted investor#1 is able to buy less than minCap after first transaction
- Whitelisted investor#1 is able to buy maxCap
- Whitelisted investor's#1 balance limited by maxCap
- Whitelisted investor#2 with zero minCap is able to buy
- Whitelisted investor#2 balance is properly changed
- Crowdsale has finished as schedule
- Whitelisted investor is not able to buy if crowdsale finished
- Not owner is not able to finalize
- Owner is able to finalize (if crowdsale time is over but not all tokens have sold)
- Investor#1 has received correct quantity of tokens after finalization
- Investor#2 has received correct quantity of tokens after finalization
- Owner has received correct quantity of tokens after finalization
- Owner can create DutchAuction crowdsale: minCap,no whitelist
- Invest page: Owner's balance has correct value (totalSupply-supply)
- Investor not able to buy before start of crowdsale
- Invest page: countdown timer is displayed
- Crowdsale starts as scheduled
- Investor is not able to buy less than minCap in first transaction
- Investor is able to buy amount equal minCap
- Invest page: Investors balance is properly changed after purchase
- Whitelisted investor is able to buy less than minCap after first transaction
- Whitelisted investor is able to buy maxCap
- Owner's Eth balance properly changed
- Owner is able to finalize (if all tokens have been sold)
- Investor has received correct quantity of tokens after finalization
- Owner has received correct quantity of tokens after finalization
@vbaranov Please review it
@dennis00010011b
- Investor#1 has received correct quantity of tokens after finalization
- Investor#2 has received correct quantity of tokens after finalization
After finalization in Dutch Auction balances of tokens shouldn't be changed, because there are no reserved tokens for this strategy
-
I don't see the check, that non-whitelisted investors can't buy during crowdsale
-
We should also add checks, that if crowdsale is whitelisted, the owner can change whitelist before the start and during crowdsale
The rest looks good