Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Fix) e2e tests for Token Wizard 2.0: Dutch Auction strategy #830

Open
vbaranov opened this issue Apr 26, 2018 · 7 comments
Open

(Fix) e2e tests for Token Wizard 2.0: Dutch Auction strategy #830

vbaranov opened this issue Apr 26, 2018 · 7 comments

Comments

@vbaranov
Copy link
Collaborator

We need e2e tests for Dutch Auction strategy of Token Wizard 2.0

@vbaranov
Copy link
Collaborator Author

@dennis00010011b please describe e2e tests for Dutch Auction you have implemented here #889

@vbaranov vbaranov added the to do label May 18, 2018
@vbaranov
Copy link
Collaborator Author

@dennis00010011b also, describe the steps how to start Dutch Auction e2e tests locally from the beginning (from the cloning of repo)

@dennis00010011b
Copy link

@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

@dennis00010011b
Copy link

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

@vbaranov vbaranov added this to the 2.0 milestone May 23, 2018
@dennis00010011b
Copy link

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

@dennis00010011b
Copy link

@vbaranov Please review it

@vbaranov
Copy link
Collaborator Author

vbaranov commented Jun 1, 2018

@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

  1. I don't see the check, that non-whitelisted investors can't buy during crowdsale

  2. 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants