update readme
This commit is contained in:
parent
56995bd472
commit
3076bf15d7
160
README.md
160
README.md
|
@ -5,89 +5,109 @@ Test suite #1 , starts with command ```npm run -script test1```
|
|||
|
||||
#### UI tests
|
||||
```
|
||||
|
||||
- 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 open Step2 by clicking button Continue
|
||||
- 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 out Name field with valid data
|
||||
- Wizard step#2: user able to fill out Ticker field with valid data
|
||||
- Wizard step#2: user is not able to open Step2 if Decimals field empty
|
||||
- Wizard step#2: user able to fill Decimals field with valid data
|
||||
- Wizard step#2: user is able to add reserved tokens
|
||||
- Wizard step#2: user is able to download CSV file with reserved addresses
|
||||
- Wizard step#2: number of added reserved tokens is correct
|
||||
- Wizard step#2: button ClearAll is displayed
|
||||
- Wizard step#2: alert is displayed after clicking ClearAll
|
||||
- Wizard step#2: user is able to bulk delete of reserved tokens
|
||||
- Wizard step#2: user is able to add reserved tokens one by one
|
||||
- Wizard step#2: field Decimals is disabled if reserved tokens are added
|
||||
- Wizard step#2: user is able to remove one of reserved tokens
|
||||
- Wizard step#2: button ClearAll present
|
||||
- Wizard step#2: Alert present after clicking ClearAll, alert contains button No
|
||||
- Wizard step#2: User able to click button No and warning disappear
|
||||
- Wizard step#2: Alert present after clicking ClearAll, alert contains button Yse
|
||||
- Wizard step#2: user is able bulk delete of reserved tokens
|
||||
- Wizard step#2: user is able to add one reserved tokens address after deletion
|
||||
- Wizard step#2: button Continue present
|
||||
- Wizard step#2: user is able to open Step3 by clicking button Continue
|
||||
- Wizard step#2: button Continue is displayed
|
||||
- Wizard step#2: user is able to open Step3 with clicking button Continue
|
||||
|
||||
- Wizard step#3: field Wallet address contains the metamask account address
|
||||
- Wizard step#3: User is able to set "Safe and cheap gasprice" checkbox
|
||||
- Wizard step#3: User is able to set "Normal Gasprice" checkbox
|
||||
- Wizard step#3: User is able to set "Fast Gasprice" checkbox
|
||||
- Wizard step#3: User is able to set "Custom Gasprice" checkbox
|
||||
- Wizard step#3: User is able to fill "Custom Gasprice" with valid value
|
||||
- Wizard step#3: User is able to set checkbox "Whitelist disabled"
|
||||
- Wizard step#3: User is able to set checkbox "Whitelist enabled"
|
||||
- Wizard step#3: User is able to download CVS file with whitelisted addresses
|
||||
- Wizard step#3: User is able to add several whitelisted addresses
|
||||
- Wizard step#3: User is able to remove one whitelisted address
|
||||
- Wizard step#3: Whitelist container present if checkbox WhitelistEnabled is selected
|
||||
- Wizard step#3: User is able to download CSV file with whitelisted addresses
|
||||
- Wizard step#3: Number of added whitelisted addresses is correct
|
||||
- Wizard step#3: User is able to bulk delete all whitelisted addresses
|
||||
|
||||
|
||||
- Wizard step#3: All whitelisted addresses 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: User is able to fill out field Rate with valid data
|
||||
- Wizard step#3: User is able to fill out field Supply with valid data
|
||||
- Wizard step#3: User is able to add tier
|
||||
- Wizard step#3: user is able to proceed to Step4 by clicking button Continue
|
||||
|
||||
- Wizard step#4: alert is displayed 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 a transaction
|
||||
- Wizard step#4: alert is presented if user wants to leave the wizard
|
||||
- Wizard step#4: User is able to stop deployment
|
||||
```
|
||||
|
||||
#### Functional tests
|
||||
```
|
||||
1. Owner can create crowdsale(scenario testSuite1.json),1 tier, not modifiable, no whitelist,1 reserved
|
||||
2. Disabled to modify the end time if crowdsale is not modifiable
|
||||
3. Investor can NOT buy less than mincap in first transaction
|
||||
4. Investor can buy amount equal mincap
|
||||
5. Investor can buy less than mincap after first transaction
|
||||
6. Disabled to buy after crowdsale time expired
|
||||
7. Owner able to distribute if crowdsale time expired but not all tokens were sold
|
||||
8. Reserved address has received correct quantity of tokens after distribution
|
||||
9. Owner able to finalize ( if crowdsale time expired but not all tokens were sold)
|
||||
10.Investor has received correct quantity of tokens after finalization
|
||||
11.Owner can create crowdsale(scenario testSuite2.json): 1 tier,1 whitelist address,2 reserved addresses, modifiable
|
||||
12.Whitelisted investor NOT able to buy before start of crowdsale
|
||||
13.Disabled to modify the name of tier
|
||||
14.Tier's name matches given value
|
||||
15.Disabled to modify the wallet address
|
||||
16.Tier's wallet address matches given value
|
||||
17.Owner is able to add whitelisted address before start of crowdsale
|
||||
18.Owner is able to modify the rate before start of crowdsale
|
||||
19.Owner is able to modify the total supply before start of crowdsale
|
||||
20.Owner is able to modify the start time before start of crowdsale
|
||||
21.Owner is able to modify the end time before start of crowdsale
|
||||
22.Warning present if end time earlier than start time
|
||||
23.Not owner is NOT able to modify the start time of tier
|
||||
24.Disabled to modify the start time if crowdsale has begun
|
||||
25.Disabled to modify the total supply if crowdsale has begun
|
||||
26.Disabled to modify the rate if crowdsale has begun
|
||||
27.Owner is able to modify the end time after start of crowdsale
|
||||
28.Owner is able to add whitelisted address if crowdsale has begun
|
||||
29.Whitelisted investor is NOT able to buy less than min in first transaction
|
||||
30.Whitelisted investor can buy amount equal min
|
||||
31.Whitelisted investor is able to buy less than min after first transaction
|
||||
32.Whitelisted investor is NOT able to buy more than assigned max
|
||||
33.Whitelisted investor is able to buy assigned max
|
||||
34.Whitelisted investor is NOT able to buy more than total supply in tier
|
||||
35.Owner is NOT able to distribute before all tokens are sold and crowdsale is not finished
|
||||
36.Owner is NOT able to finalize before all tokens are sold and crowdsale is not finished
|
||||
37.Whitelisted investor able to buy total supply
|
||||
38.Whitelisted investor is NOT able to buy if all tokens were sold
|
||||
39.Owner able to distribute after all tokens were sold but crowdsale is not finished
|
||||
40.Reserved address has received correct QUANTITY of tokens after distribution
|
||||
41.Reserved address has received correct PERCENT of tokens after distribution
|
||||
42.Not Owner is NOT able to finalize (after all tokens were sold)
|
||||
43.Owner able to finalize (after all tokens were sold)
|
||||
44.Disabled to buy after finalization of crowdsale
|
||||
45.Investor #1 has received correct amount of tokens after finalization
|
||||
46.Investor #2 has received correct amount of tokens after finalization
|
||||
- Owner can create crowdsale(scenario testSuite1.json),1 tier, not modifiable, no whitelist,1 reserved
|
||||
- Disabled to modify the end time if crowdsale is not modifiable
|
||||
- Investor can NOT buy less than mincap in first transaction
|
||||
- Investor can buy amount equal mincap
|
||||
- Invest page: Investor's balance is changed accordingly after purchase
|
||||
- Investor is not able to buy amount which significally more than total supply
|
||||
- Investor is able to buy less than mincap after first transaction
|
||||
- Crowdsale is finished in time
|
||||
- Disabled to buy after crowdsale time expired
|
||||
- Owner able to distribute if crowdsale time expired but not all tokens were sold
|
||||
- Reserved address has received correct quantity of tokens after distribution
|
||||
- Owner is able to finalize ( if crowdsale time expired but not all tokens were sold)
|
||||
- Investor has received correct quantity of tokens after finalization
|
||||
|
||||
|
||||
- Owner can create crowdsale(scenario testSuite2.json): 1 tier,1 whitelist address,2 reserved addresses, modifiable
|
||||
- Whitelisted investor NOT able to buy before start of crowdsale
|
||||
- Disabled to modify the name of tier
|
||||
- Tier's name matches given value
|
||||
- Disabled to modify the wallet address
|
||||
- Tier's wallet address matches given value
|
||||
- Owner is able to add whitelisted address before start of crowdsale
|
||||
- Owner is able to modify the rate before start of crowdsale
|
||||
- Manage page: Rate changed accordingly after modifying
|
||||
- Manage page: owner is able to modify the total supply before start of crowdsale
|
||||
- Manage page: total supply changed accordingly after changing
|
||||
- Manage page: owner is able to modify the total supply before start of crowdsale
|
||||
- Manage page: Owner is able to modify the start time before start of crowdsale
|
||||
- Manage page: end time changed after modifying
|
||||
- Manage page: warning is displayed if end time earlier than start time
|
||||
- Warning present if not owner open manage page
|
||||
- Manage page: disabled to modify the start time if crowdsale has begun
|
||||
- Manage page: disabled to modify the total supply if crowdsale has begun
|
||||
- Manage page: disabled to modify the rate if crowdsale has begun
|
||||
- Manage page: owner is able to modify the end time after start of crowdsale
|
||||
- Manage page: end time changed accordingly after modifying
|
||||
- Manage page: owner is able to add whitelisted address if crowdsale has begun
|
||||
- Whitelisted investor is not able to buy less than min in first transaction
|
||||
- Whitelisted investor can buy amount equal mincap
|
||||
- Whitelisted investor is able to buy less than mincap after first transaction
|
||||
- Whitelisted investor is not able to buy more than assigned max
|
||||
- Whitelisted investor is able to buy assigned max
|
||||
- Whitelisted investor is not able to buy more than total supply in tier
|
||||
- Owner is not able to distribute before all tokens are sold and crowdsale is not finished
|
||||
- Owner is NOT able to distribute before all tokens are sold and crowdsale is not finished
|
||||
- Owner is NOT able to finalize before all tokens are sold and crowdsale is not finished
|
||||
- Whitelisted investor is able to buy total supply
|
||||
- Whitelisted investor is not able to buy if all tokens were sold
|
||||
- Owner able to distribute after all tokens were sold but crowdsale is not finished
|
||||
- Reserved address has received correct quantity of tokens after distribution
|
||||
- Reserved address has received correct percentage of tokens after distribution
|
||||
- Not Owner is not able to finalize (after all tokens were sold)
|
||||
- Owner able to finalize (after all tokens were sold)
|
||||
- Disabled to buy after finalization of crowdsale
|
||||
- Investor #1 has received correct amount of tokens after finalization
|
||||
- Investor #2 has received correct amount of tokens after finalization
|
||||
```
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
0xf9180fF7650f808EB08C1EA1C9D0f85436d9a39D,percentage,100
|
||||
0xd03ea8624c8c5987235048901fb614fdca89b117,tokens,50
|
||||
0x95ced938f7991cd0dfcb48f0a06a40fa1af46ebc,tokens,3.1
|
||||
0xBC4023Baef7B812c23f21bc0b108A188243b07Cb,tokens,45.12
|
||||
0x2589bd7D8A58Ac9A4aC01d68A7c63315ef184c63,tokens,234.123
|
||||
0xF3eA35DB8F0058b4e0aD45F883172E92fdCb4B82,tokens,1245.1234
|
||||
0xb3b4F4b5568BB6dF78e4d96Ad30A5538C913D495,tokens,99999.12345
|
||||
0x16926399BAF474Cd314E6425ace67A88EA5BeA11,tokens,999999.123456
|
||||
0xE98055678d8e8724E5106b059e88557a99561007,tokens,9999999.1234567
|
||||
0x06554522da78D90015a12C5caaf96be2999ea3F9,tokens,99999999.12345678
|
||||
0x1894F11ddf864CA1de4eB339512a79e199cbf194,tokens,999999999.123456789
|
||||
0xeec3B3A65E3157b19605911615218B33772d5da2,tokens,9999999999.0123456789
|
||||
0xec8Af49612F4EdfcD069B8cfe95552740c6849e0,tokens,99999999999.01234567899
|
||||
0x9613130348aC610732A391063CD70b5a8c186EfC,tokens,999999999999.012345678998
|
||||
0x7Bc397b1F42bB521cEadE2509f8deAF477C7BEd6,tokens,9999999999999.0123456789987
|
||||
0x8632cc8620f7aA794aC1a3b88e0D07E4BF133638,tokens,99999999999999.01234567899876
|
||||
0xAAcd9926862A2ECC1F0D547aF9D9d6FcBD3928f6,tokens,999999999999999.012345678998765
|
||||
0xa3e8A60f9dC18385e6215c1F2b04437Ca02F634c,tokens,9999999999999999.0123456789987654
|
||||
0xAbDEeE7cdE25064b42E4A27B00cf53f01587520b,tokens,99999999999999999.01234567899876543
|
||||
0x75B4a78b86523ef93CcE5cfC217cd3D99fc9ab18,tokens,999999999999999999.012345678998765432
|
||||
0x2C683fE4dac1f28c51Aa710Ed74196CdFcb04E20,tokens,9999999999999999999.0123456789987654321
|
||||
0xE743AaF851663e84D3Ec364863866,tokens,45
|
||||
0xE743AaF851663e84D3Ec3648638662a6c41cEe2A,teté, 5.0505
|
||||
0x5d2Bf1496242D32785d1A386410b7F157e17F42d,tokens,-50
|
||||
0x1d765eB5AD7020BA8e006978930CeAd68b38012a,percentage,-3
|
||||
0x94451A0A09f3aD57f3Af201dB183Ce89f5797e1F
|
||||
|
||||
|
Can't render this file because it has a wrong number of fields in line 26.
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"startURL" : "http://localhost:3000/",
|
||||
"startURL" : "https://deploy-preview-800--housing-agent-freight-81421.netlify.com/",
|
||||
"outputPath":"./results",
|
||||
"installMetaMask":true
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ const adj="";
|
|||
const buttonDistribute=By.xpath("//*[contains(text(),'Distribute tokens')]");
|
||||
const buttonFinalize=By.xpath("//*[contains(text(),'Finalize Crowdsale')]");
|
||||
const buttonYesFinalize=By.className("swal2-confirm swal2-styled");
|
||||
const buttonSave=By.className("no-arrow button button_fill");
|
||||
const buttonSave=By.className("no_arrow button button_fill");
|
||||
|
||||
const warningEndTimeTier1=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[3]/div/div[2]/div[2]/div[2]/p[2]");
|
||||
const warningEndTimeTier2=By.xpath("//*[@id=\"root\"]/div/"+adj+"section/div[4]/div/div[1]/div[2]/div[2]/p[2]");
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const Logger= require('../entity/Logger.js');
|
||||
const logger=Logger.logger;
|
||||
const tempOutputPath=Logger.tempOutputPath;
|
||||
|
||||
|
||||
const utils=require('../utils/Utils.js');
|
||||
const Utils=utils.Utils;
|
||||
const page=require('./Page.js');
|
||||
const Page=page.Page;
|
||||
const by = require('selenium-webdriver/lib/by');
|
||||
|
@ -13,6 +13,7 @@ const itemsRemove=By.className("item-remove");
|
|||
const buttonClearAll=By.className("fa fa-trash");
|
||||
const buttonYesAlert=By.className("swal2-confirm swal2-styled");
|
||||
const buttonNoAlert=By.className("swal2-cancel swal2-styled");
|
||||
const buttonOK=By.className("swal2-confirm swal2-styled");
|
||||
//const buttonClearAll = By.className("clear-all-tokens");
|
||||
class ReservedTokensPage extends Page {
|
||||
|
||||
|
@ -91,14 +92,15 @@ class ReservedTokensPage extends Page {
|
|||
|
||||
async clickButtonClearAll(){
|
||||
logger.info(this.name+" click ButtonClearAll :");
|
||||
try {
|
||||
await super.clickWithWait(buttonClearAll);
|
||||
return true;
|
||||
}
|
||||
catch(err) {
|
||||
logger.info("Can not click ButtonClearAll ");
|
||||
return false;
|
||||
}
|
||||
try {
|
||||
await this.driver.executeScript("document.getElementsByClassName('fa fa-trash')[0].click();");
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
logger.info(err);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
@ -210,6 +212,30 @@ class ReservedTokensPage extends Page {
|
|||
else return false;
|
||||
}
|
||||
|
||||
async uploadReservedCSVFile(){
|
||||
|
||||
try {
|
||||
const locator=By.xpath('//input[@type="file"]');
|
||||
let element = await this.driver.findElement(locator);
|
||||
let path = await Utils.getPathToFileInPWD("bulkReservedAddresses.csv");
|
||||
logger.info(this.name+": uploadReservedAddressesCSVFile: from path: "+path);
|
||||
await element.sendKeys(path);
|
||||
return true;
|
||||
}
|
||||
catch (err){
|
||||
logger.info(err);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async clickButtonOk(){
|
||||
logger.info("Confirm popup");
|
||||
await super.clickWithWait(buttonOK);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
module.exports.ReservedTokensPage=ReservedTokensPage;
|
|
@ -10,9 +10,8 @@ const webdriver = require('selenium-webdriver'),
|
|||
by = require('selenium-webdriver/lib/by');
|
||||
const By=by.By;
|
||||
const utils=require('../utils/Utils.js');
|
||||
const wizardStep3=require("./WizardStep3.js");
|
||||
const Utils=utils.Utils;
|
||||
|
||||
const wizardStep3=require("./WizardStep3.js");
|
||||
var COUNT_TIERS;
|
||||
const itemsRemove=By.className("item-remove");
|
||||
const buttonAdd=By.className("button button_fill button_fill_plus");
|
||||
|
@ -348,11 +347,10 @@ class TierPage extends page.Page {
|
|||
|
||||
async clickButtonClearAll() {
|
||||
|
||||
//logger.info("fucken button")
|
||||
logger.info(this.name+": clickButtonClearAll:");
|
||||
try {
|
||||
logger.info(this.name+": clickButtonClearAll:");
|
||||
const buttonClearAll=By.className("fa fa-trash");
|
||||
await this.driver.executeScript("document.getElementsByClassName('fa fa-trash')[0].click();");
|
||||
|
||||
await this.driver.executeScript("document.getElementsByClassName('fa fa-trash')[0].click();");
|
||||
return true;
|
||||
}
|
||||
catch (err) {
|
||||
|
@ -442,16 +440,13 @@ class TierPage extends page.Page {
|
|||
else {logger.info("not present");return false;}
|
||||
}
|
||||
|
||||
async uploadCSV(){
|
||||
async uploadWhitelistCSVFile(){
|
||||
|
||||
try {
|
||||
let pwd=process.env.PWD;
|
||||
let path = await Utils.getPathToFileInPWD("bulkWhitelist.csv");
|
||||
logger.info(this.name+": uploadWhitelistCSVFile: from path: "+path);
|
||||
const locator=By.xpath('//input[@type="file"]');
|
||||
|
||||
|
||||
let element = await this.driver.findElement(locator);
|
||||
let path=pwd+"/MyWhitelist.csv";
|
||||
logger.info(this.name+": uploadCSV: from path: "+path);
|
||||
await element.sendKeys(path);
|
||||
|
||||
return true;
|
||||
|
|
|
@ -150,5 +150,6 @@ async clickButtonContinue(){
|
|||
return await super.isElementDisabled(fieldDecimals);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
module.exports.WizardStep2=WizardStep2;
|
|
@ -23,27 +23,8 @@
|
|||
"address" :"0xA6C8045C3989fD15d2b506084517E20a0A801637",
|
||||
"dimension": "tokens",
|
||||
"value": 12345
|
||||
},
|
||||
{
|
||||
"address" :"0x783CA4B3d53Bf76368BF8a3aFEc6fABd90F1fE51",
|
||||
"dimension": "percentage",
|
||||
"value": 32.6
|
||||
},
|
||||
{
|
||||
"address" :"0x408238CE2fA008535790F38f6B8f89Cd9958aF81",
|
||||
"dimension": "tokens",
|
||||
"value": 5432
|
||||
},
|
||||
{
|
||||
"address" :"0x0e036E74F31aDDb9e0ADcB80dEA9Ed1E187DFe50",
|
||||
"dimension": "percentage",
|
||||
"value": 100
|
||||
},
|
||||
{
|
||||
"address" :"0x9E963042D581D262AdE4E31541360e7FDAeE70C6",
|
||||
"dimension": "tokens",
|
||||
"value": 4312
|
||||
}
|
||||
|
||||
],
|
||||
"walletAddress":"0x56B2e3C3cFf7f3921Dc2e0F8B8e20d1eEc29216b",
|
||||
"gasprice": 1,
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{
|
||||
"address" :"0xecDFec71AbCD5a612eAf9169B19E907eAA2717d9",
|
||||
"dimension": "tokens",
|
||||
"value": 1000
|
||||
"value": 1000.01234567890123456789
|
||||
}
|
||||
],
|
||||
"walletAddress":"0x56B2e3C3cFf7f3921Dc2e0F8B8e20d1eEc29216b",
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
{
|
||||
"address" :"0xecDFec71AbCD5a612eAf9169B19E907eAA2717d9",
|
||||
"dimension": "percentage",
|
||||
"value": 250
|
||||
"value": 250.9
|
||||
},
|
||||
{
|
||||
"address" : "0x56B2e3C3cFf7f3921Dc2e0F8B8e20d1eEc29216b",
|
||||
"dimension": "tokens",
|
||||
"value":100000000
|
||||
"value":100.987654321123456789
|
||||
}
|
||||
|
||||
],
|
||||
|
|
|
@ -99,7 +99,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
crowdsaleForE2Etests2=await Utils.getCrowdsaleInstance(scenarioWhYMdYRt1Tr1);
|
||||
|
||||
|
||||
logger.info("Version 2.1.4");
|
||||
logger.info("Version 2.1.5");
|
||||
driver = await Utils.startBrowserWithMetamask();
|
||||
|
||||
|
||||
|
@ -140,8 +140,8 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
test.after(async function() {
|
||||
// Utils.killProcess(ganache);
|
||||
await Utils.sendEmail(tempOutputPath+'manage1.png');
|
||||
await Utils.sendEmail(tempOutputPath+'manage2.png');
|
||||
//await Utils.sendEmail(tempOutputPath+'manage1.png');
|
||||
//await Utils.sendEmail(tempOutputPath+'manage2.png');
|
||||
await Utils.sendEmail(tempOutputFile);
|
||||
let outputPath=Utils.getOutputPath();
|
||||
outputPath=outputPath+"/result"+Utils.getDate();
|
||||
|
@ -172,17 +172,17 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
let result = await welcomePage.isPresentButtonChooseContract();
|
||||
return await assert.equal(result, true, "Test FAILED. button ChooseContract not present ");
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Welcome page: user is able to activate Step1 by clicking button NewCrowdsale ',
|
||||
test.it('Welcome page: user is able to open Step1 by clicking button NewCrowdsale ',
|
||||
async function () {
|
||||
await welcomePage.clickButtonNewCrowdsale();
|
||||
let result = await wizardStep1.isPresentButtonContinue();
|
||||
return await assert.equal(result, true, "Test FAILED. User is not able to activate Step1 by clicking button NewCrowdsale");
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#1: user is able to activate Step2 by clicking button Continue ',
|
||||
test.it('Wizard step#1: user is able to open Step2 by clicking button Continue ',
|
||||
async function () {
|
||||
let count=10;
|
||||
do {
|
||||
|
@ -196,9 +196,17 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
}
|
||||
while (count-->0);
|
||||
let result=await wizardStep2.isPresentFieldName();
|
||||
return await assert.equal(result, true, "Test FAILED. User is not able to activate Step2 by clicking button Continue");
|
||||
return await assert.equal(result, true, "Test FAILED. User is not able to open Step2 by clicking button Continue");
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user able to fill out Name field with valid data',
|
||||
async function () {
|
||||
await wizardStep2.fillName("name");
|
||||
let result = await wizardStep2.isPresentWarningName();
|
||||
return await assert.equal(result, false, "Test FAILED. Wizard step#2: user able to fill Name field with valid data ");
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user able to fill out field Ticker with valid data',
|
||||
async function () {
|
||||
|
@ -206,35 +214,64 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
let result = await wizardStep2.isPresentWarningTicker();
|
||||
return await assert.equal(result, false, "Test FAILED. Wizard step#2: user is not able to fill out field Ticker with valid data ");
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user able to fill Name field with valid data',
|
||||
async function () {
|
||||
await wizardStep2.fillName("name");
|
||||
let result = await wizardStep2.isPresentWarningName();
|
||||
return await assert.equal(result, false, "Test FAILED. Wizard step#2: user able to fill Name field with valid data ");
|
||||
|
||||
});
|
||||
|
||||
test.it.skip("Wizard step#2: user is not able to proceed if Decimals field empty ",
|
||||
test.it("Wizard step#2: user is not able to open Step2 if Decimals field empty ",
|
||||
async function () {
|
||||
await wizardStep2.fillDecimals("");
|
||||
await wizardStep2.clickButtonContinue();
|
||||
let result = await wizardStep2.getPageTitle();
|
||||
result=(result==wizardStep2.title);
|
||||
result=(result===wizardStep2.title);
|
||||
if (!result) await wizardStep3.goBack();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#2: user is able to proceed if Decimals field empty ");
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user able to fill out field Decimals with valid data',
|
||||
test.it('Wizard step#2: user able to fill out Decimals field with valid data',
|
||||
async function () {
|
||||
await wizardStep2.fillDecimals("1");
|
||||
await wizardStep2.fillDecimals("18");
|
||||
let result=await wizardStep2.isPresentWarningDecimals();
|
||||
return await assert.equal(result, false, "Test FAILED. Wizard step#2: user is not able to fill Decimals field with valid data ");
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able to add reserved tokens ',
|
||||
test.it('Wizard step#2: User is able to download CSV file with reserved addresses',
|
||||
async function () {
|
||||
|
||||
let result = await reservedTokensPage.uploadReservedCSVFile();
|
||||
await reservedTokensPage.clickButtonOk();
|
||||
return await assert.equal(result, true, 'Test FAILED. Wizard step#3: User is NOT able to download CVS file with whitelisted addresses');
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: number of added reserved tokens is correct ',
|
||||
async function () {
|
||||
let correctNumberReservedTokens=20;
|
||||
let result = await reservedTokensPage.amountAddedReservedTokens();
|
||||
return await assert.equal(result,correctNumberReservedTokens, "Test FAILED. Wizard step#2: number of added reserved tokens is correct");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: button ClearAll is displayed ',
|
||||
async function () {
|
||||
|
||||
let result = await reservedTokensPage.isPresentButtonClearAll();
|
||||
return await assert.equal(result, true, "Test FAILED.ClearAll button is NOT present");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: alert present after clicking ClearAll',
|
||||
async function () {
|
||||
await reservedTokensPage.clickButtonClearAll();
|
||||
let result = await reservedTokensPage.isPresentButtonNoAlert();
|
||||
return await assert.equal(result, true, "Test FAILED.Alert does NOT present after select ClearAll or button No does NOT present");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able to bulk delete of reserved tokens ',
|
||||
async function () {
|
||||
await reservedTokensPage.clickButtonYesAlert();
|
||||
await driver.sleep(2000);
|
||||
let result = await reservedTokensPage.amountAddedReservedTokens();
|
||||
return await assert.equal(result, 0, "Wizard step#2: user is NOT able bulk delete of reserved tokens");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able to add reserved tokens one by one ',
|
||||
async function () {
|
||||
|
||||
for (let i=0;i<crowdsaleForUItests.reservedTokens.length;i++)
|
||||
|
@ -244,16 +281,14 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
}
|
||||
let result = await reservedTokensPage.amountAddedReservedTokens();
|
||||
return await assert.equal(result, crowdsaleForUItests.reservedTokens.length, "Test FAILED. Wizard step#2: user is NOT able to add reserved tokens");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: field Decimals disabled if reserved tokens added ',
|
||||
test.it('Wizard step#2: field Decimals is disabled if reserved tokens are added ',
|
||||
async function () {
|
||||
|
||||
let result = await wizardStep2.isDisabledDecimals();
|
||||
return await assert.equal(result, true, "Wizard step#2: field Decimals enabled if reserved tokens added ");
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able to remove one of reserved tokens ',
|
||||
async function () {
|
||||
|
@ -262,41 +297,18 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
await reservedTokensPage.removeReservedTokens(1);
|
||||
let amountAfter = await reservedTokensPage.amountAddedReservedTokens();
|
||||
return await assert.equal(amountBefore, amountAfter+1, "Test FAILED. Wizard step#2: user is NOT able to add reserved tokens");
|
||||
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: ClearAll button present ',
|
||||
async function () {
|
||||
|
||||
let result = await reservedTokensPage.isPresentButtonClearAll();
|
||||
return await assert.equal(result, true, "Test FAILED.ClearAll button is NOT present");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: Alert present after clicking ClearAll and button No present',
|
||||
async function () {
|
||||
await reservedTokensPage.clickButtonClearAll();
|
||||
let result = await reservedTokensPage.isPresentButtonNoAlert();
|
||||
return await assert.equal(result, true, "Test FAILED.Alert does NOT present after select ClearAll or button No does NOT present");
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able bulk delete of reserved tokens ',
|
||||
async function () {
|
||||
await reservedTokensPage.clickButtonYesAlert();
|
||||
await driver.sleep(2000);
|
||||
let result = await reservedTokensPage.amountAddedReservedTokens();
|
||||
return await assert.equal(result, 0, "Wizard step#2: user is NOT able bulk delete of reserved tokens");
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: button Continue present ',
|
||||
|
||||
|
||||
test.it('Wizard step#2: button Continue is displayed ',
|
||||
async function () {
|
||||
let result = await wizardStep2.isPresentButtonContinue();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#2: button Continue not present ");
|
||||
|
||||
});
|
||||
|
||||
test.it('Wizard step#2: user is able to activate Step3 by clicking button Continue ',
|
||||
test.it('Wizard step#2: user is able to open Step3 with clicking button Continue ',
|
||||
async function () {
|
||||
await wizardStep2.clickButtonContinue();
|
||||
await driver.sleep(2000);
|
||||
|
@ -312,7 +324,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
let result = await wizardStep3.getFieldWalletAddress();
|
||||
console.log(result);
|
||||
console.log(Owner.account);
|
||||
result=(result==Owner.account);
|
||||
result=(result===Owner.account);
|
||||
return await assert.equal(result, true, "Test FAILED. Wallet address does not match the metamask account address ");
|
||||
});
|
||||
|
||||
|
@ -328,14 +340,14 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
test.it('Wizard step#3: User is able to download CSV file with whitelisted addresses',
|
||||
async function () {
|
||||
|
||||
let result = await tierPage.uploadCSV();
|
||||
let result = await tierPage.uploadWhitelistCSVFile();
|
||||
await wizardStep3.clickButtonOk();
|
||||
return await assert.equal(result, true, 'Test FAILED. Wizard step#3: User is NOT able to download CVS file with whitelisted addresses');
|
||||
});
|
||||
|
||||
test.it('Wizard step#3: Number of added whitelisted addresses is correct',
|
||||
async function () {
|
||||
let shouldBe=5;
|
||||
let shouldBe=6;
|
||||
let inReality=await tierPage.amountAddedWhitelist();
|
||||
return await assert.equal(shouldBe, inReality, "Test FAILED. Wizard step#3: Number of added whitelisted addresses is NOT correct");
|
||||
|
||||
|
@ -345,8 +357,6 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
async function () {
|
||||
let result = await tierPage.clickButtonClearAll();
|
||||
await driver.sleep(2000);
|
||||
|
||||
//await driver.sleep(5000);
|
||||
await tierPage.clickButtonYesAlert();
|
||||
return await assert.equal(result,true, "Test FAILED. Wizard step#3: User is NOT able to bulk delete all whitelisted addresses");
|
||||
});
|
||||
|
@ -357,7 +367,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result,0, "Test FAILED. Wizard step#3: User is NOT able to bulk delete all whitelisted addresses");
|
||||
});
|
||||
|
||||
test.it('Wizard step#3: User is able to add several whitelisted addresses',
|
||||
test.it('Wizard step#3: User is able to add several whitelisted addresses one by one ',
|
||||
async function () {
|
||||
let result = await tierPage.fillWhitelist();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: User is able to add several whitelisted addresses");
|
||||
|
@ -380,7 +390,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3: User is able to fill "Custom Gasprice" with valid value',
|
||||
test.it (' Wizard step#3: User is able to fill out the CustomGasprice field with valid value' ,
|
||||
async function () {
|
||||
let customValue=100;
|
||||
let result = await wizardStep3.fillGasPriceCustom(customValue);
|
||||
|
@ -388,37 +398,16 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3: User is able to set "Safe and cheap gasprice" checkbox ',
|
||||
test.it(' - Wizard step#3: User is able to set SafeAndCheapGasprice checkbox ',
|
||||
async function () {
|
||||
let result = await wizardStep3.clickCheckboxGasPriceSafe();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: 'Safe and cheap' Gas price checkbox does not set by default");
|
||||
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3: User is able to fill out field "Rate" with valid data',
|
||||
async function () {
|
||||
tierPage.tier.rate = 1234;
|
||||
let result = await tierPage.fillRate();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: User is NOT able to fill out field 'Rate' with valid data");
|
||||
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3: User is able to fill out field "Supply" with valid data',
|
||||
async function () {
|
||||
tierPage.tier.supply = 4342.1;
|
||||
let result = await tierPage.fillSupply();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: User is able to fill out field 'Supply' with valid data");
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3: User is able to add tier',
|
||||
async function () {
|
||||
let result = await wizardStep3.clickButtonAddTier();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: Wizard step#3: User is able to add tier");
|
||||
});
|
||||
|
||||
test.it ('Wizard step#3:Tier#2: User is able to fill out field "Rate" with valid data',
|
||||
async function () {
|
||||
tierPage.number=1;
|
||||
tierPage.number=1;
|
||||
tierPage.tier.rate = 5678;
|
||||
let result = await tierPage.fillRate();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: User is NOT able to fill out field 'Rate' with valid data");
|
||||
|
@ -432,6 +421,13 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
});
|
||||
|
||||
|
||||
test.it('Wizard step#3: User is able to add tier',
|
||||
async function () {
|
||||
let result = await wizardStep3.clickButtonAddTier();
|
||||
return await assert.equal(result, true, "Test FAILED. Wizard step#3: Wizard step#3: User is able to add tier");
|
||||
});
|
||||
|
||||
|
||||
test.it('Wizard step#3: user is able to proceed to Step4 by clicking button Continue ',
|
||||
async function () {
|
||||
await wizardStep3.clickButtonContinue();
|
||||
|
@ -440,7 +436,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. User is not able to activate Step2 by clicking button Continue");
|
||||
});
|
||||
/////////////// STEP4 //////////////
|
||||
test.it('Wizard step#4: alert present if user refresh the page ',
|
||||
test.it('Wizard step#4: alert present if user reload the page ',
|
||||
async function () {
|
||||
await wizardStep4.refresh();
|
||||
await driver.sleep(2000);
|
||||
|
@ -448,7 +444,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. Alert does not present if user refresh the page");
|
||||
});
|
||||
|
||||
test.it('Wizard step#4: user is able to accept alert ',
|
||||
test.it('Wizard step#4: user is able to accept alert after reloading the page ',
|
||||
async function () {
|
||||
|
||||
let result = await wizardStep4.acceptAlert() ;
|
||||
|
@ -457,7 +453,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. Modal does not present after user has accepted alert");
|
||||
});
|
||||
|
||||
test.it('Wizard step#4: button "Skip transaction" present if user reject the transaction ',
|
||||
test.it('Wizard step#4: button SkipTransaction is presented if user reject a transaction ',
|
||||
async function () {
|
||||
await metaMask.rejectTransaction();
|
||||
await metaMask.rejectTransaction();
|
||||
|
@ -474,18 +470,19 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. user is not able to skip transaction");
|
||||
});
|
||||
|
||||
test.it('Wizard step#4: Alert present if user wants to leave the site ',
|
||||
test.it('Wizard step#4: alert is presented if user wants to leave the wizard ',
|
||||
async function () {
|
||||
|
||||
let result = await welcomePage.openWithAlertConfirmation();
|
||||
return await assert.equal(result, false, "Test FAILED. Alert does not present if user wants to leave the site");
|
||||
});
|
||||
});
|
||||
|
||||
test.it('Wizard step#4: User is able to stop deployment ',
|
||||
async function () {
|
||||
await driver.sleep(5000);
|
||||
let result = await wizardStep4.clickButtonCancelDeployment();
|
||||
result = result && await wizardStep4.clickButtonYes();
|
||||
await metaMask.doTransaction(5);
|
||||
return await assert.equal(result, true, "Test FAILED. Button 'Cancel' does not present");
|
||||
});
|
||||
|
||||
|
@ -544,7 +541,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, 'Test FAILED. Investor can not buy amount = min');
|
||||
});
|
||||
|
||||
test.it('Invest page: displayed correct balance after purchase',
|
||||
test.it('Invest page: Investors balance is changed accordingly after purchase ',
|
||||
async function () {
|
||||
let investor = Investor1;
|
||||
let contribution = crowdsaleForE2Etests1.minCap;
|
||||
|
@ -554,7 +551,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. Investor can buy but balance did not changed");
|
||||
});
|
||||
|
||||
test.it('Investor not able to buy amount significally more than total supply',
|
||||
test.it('Investor is not able to buy amount which significally more than total supply',
|
||||
async function() {
|
||||
|
||||
let investor = Investor1;
|
||||
|
@ -564,7 +561,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, false, "Test FAILED. Investor is able to buy amount significally more than total supply");
|
||||
});
|
||||
|
||||
test.it('Investor can buy less than mincap after first transaction',
|
||||
test.it('Investor is able to buy less than mincap after first transaction',
|
||||
async function() {
|
||||
let investor = Investor1;
|
||||
await investor.openInvestPage(crowdsaleForE2Etests1);
|
||||
|
@ -573,7 +570,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED. Investor can not buy less than mincap after first transaction");
|
||||
});
|
||||
|
||||
test.it('Crowdsale finishes in time',
|
||||
test.it('Crowdsale is finished in time',
|
||||
async function() {
|
||||
let investor = Investor1;
|
||||
await investor.openInvestPage(crowdsaleForE2Etests1);
|
||||
|
@ -617,7 +614,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(balance, newBalance,"Test FAILED.'Investor has received "+newBalance+" tokens instead "+ balance );
|
||||
});
|
||||
|
||||
test.it.skip('Owner able to finalize (if crowdsale time expired but not all tokens were sold)',
|
||||
test.it.skip('Owner is able to finalize (if crowdsale time expired but not all tokens were sold)',
|
||||
async function() {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -723,7 +720,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
});
|
||||
|
||||
|
||||
test.it.skip('Owner is able to modify the rate before start of crowdsale',
|
||||
test.it.skip('Manage page: Owner is able to modify the rate before start of crowdsale',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -734,7 +731,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Manage page: rate changed after modifying',
|
||||
test.it('Manage page:rate changed accordingly after modifying',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -745,7 +742,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Owner is able to modify the total supply before start of crowdsale',
|
||||
test.it('Manage page: owner is able to modify the total supply before start of crowdsale',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -755,7 +752,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result,true,'Test FAILED.Owner can NOT modify the total supply before start of crowdsale ');
|
||||
});
|
||||
|
||||
test.it('Manage page: total supply changed suitably after changing',
|
||||
test.it('Manage page: total supply changed accordingly after changing',
|
||||
async function () {
|
||||
let owner = Owner;
|
||||
await owner.openManagePage(crowdsaleForE2Etests2);
|
||||
|
@ -764,7 +761,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(balance, supplyTier1, 'Test FAILED. New value of supply does not match given value ');
|
||||
});
|
||||
|
||||
test.it('Owner is able to modify the start time before start of crowdsale ',
|
||||
test.it('Manage page: owner is able to modify the start time before start of crowdsale ',
|
||||
async function () {
|
||||
let adjust = 90000;
|
||||
let newTime = Utils.getTimeWithAdjust(adjust, "utc");
|
||||
|
@ -796,7 +793,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, 'Test FAILED. End time doest match the given value');
|
||||
});
|
||||
|
||||
test.it('Warning present if end time earlier than start time',
|
||||
test.it('Manage page: warning is displayed if end time earlier than start time',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -818,7 +815,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, false, 'Test FAILED.Warning "NOT OWNER" doesnt present');
|
||||
});
|
||||
|
||||
test.it('Disabled to modify the start time if crowdsale has begun',
|
||||
test.it('Manage page: disabled to modify the start time if crowdsale has begun',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -833,7 +830,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Disabled to modify the total supply if crowdsale has begun',
|
||||
test.it('Manage page: disabled to modify the total supply if crowdsale has begun',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -844,7 +841,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result,false,'Test FAILED.Owner able to modify the total supply after start of crowdsale ');
|
||||
});
|
||||
|
||||
test.it('Disabled to modify the rate if crowdsale has begun',
|
||||
test.it('Manage page: disabled to modify the rate if crowdsale has begun',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -854,7 +851,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result,false,'Test FAILED.Owner able to modify the rate after start of crowdsale ');
|
||||
});
|
||||
|
||||
test.it('Owner is able to modify the end time after start of crowdsale',
|
||||
test.it('Manage page: owner is able to modify the end time after start of crowdsale',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -866,7 +863,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Manage page: end time changed after modifying ',
|
||||
test.it('Manage page: end time changed accordingly after modifying ',
|
||||
async function () {
|
||||
|
||||
let owner = Owner;
|
||||
|
@ -878,7 +875,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
});
|
||||
|
||||
|
||||
test.it('Owner is able to add whitelisted address if crowdsale has begun',
|
||||
test.it('Manage page: owner is able to add whitelisted address if crowdsale has begun',
|
||||
async function () {
|
||||
let owner = Owner;
|
||||
let investor=ReservedAddress;
|
||||
|
@ -900,7 +897,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor can buy amount equal min',
|
||||
test.it('Whitelisted investor can buy amount equal mincap',
|
||||
async function() {
|
||||
|
||||
let investor=Investor1;
|
||||
|
@ -910,7 +907,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result,true,'Test FAILED. Investor can not buy amount = min');
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor is able to buy less than min after first transaction',
|
||||
test.it('Whitelisted investor is able to buy less than mincap after first transaction',
|
||||
async function() {
|
||||
let investor=Investor1;
|
||||
await investor.openInvestPage(crowdsaleForE2Etests2);
|
||||
|
@ -920,7 +917,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor is NOT able to buy more than assigned max',
|
||||
test.it('Whitelisted investor is not able to buy more than assigned max',
|
||||
async function() {
|
||||
|
||||
let investor=Investor1;
|
||||
|
@ -944,7 +941,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor is NOT able to buy more than total supply in tier',
|
||||
test.it('Whitelisted investor is not able to buy more than total supply in tier',
|
||||
async function() {
|
||||
|
||||
let investor=Investor2;
|
||||
|
@ -955,7 +952,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Owner is NOT able to distribute before all tokens are sold and crowdsale is not finished ',
|
||||
test.it('Owner is not able to distribute before all tokens are sold and crowdsale is not finished ',
|
||||
async function() {
|
||||
|
||||
let owner=Owner;
|
||||
|
@ -965,7 +962,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Owner is NOT able to finalize before all tokens are sold and crowdsale is not finished ',
|
||||
test.it('Owner is not able to finalize before all tokens are sold and crowdsale is not finished ',
|
||||
async function() {
|
||||
|
||||
let owner=Owner;
|
||||
|
@ -974,7 +971,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor able to buy total supply ',
|
||||
test.it('Whitelisted investor is able to buy total supply ',
|
||||
async function() {
|
||||
|
||||
let investor=Investor2;
|
||||
|
@ -985,7 +982,7 @@ test.describe('POA token-wizard. Test suite #1', async function() {
|
|||
return await assert.equal(result, true, "Test FAILED.Investor can not buy total supply");
|
||||
});
|
||||
|
||||
test.it('Whitelisted investor is NOT able to buy if all tokens were sold',
|
||||
test.it('Whitelisted investor is not able to buy if all tokens were sold',
|
||||
async function () {
|
||||
|
||||
let investor=ReservedAddress;
|
||||
|
|
|
@ -311,7 +311,10 @@ return q;
|
|||
|
||||
}
|
||||
|
||||
|
||||
static async getPathToFileInPWD(fileName)
|
||||
{
|
||||
return process.env.PWD+"/" +fileName;
|
||||
}
|
||||
|
||||
}
|
||||
module.exports={
|
||||
|
|
Loading…
Reference in New Issue