Merge branch 'feature/wallet-tests' of https://github.com/nymtech/nym into feature/wallet-tests
This commit is contained in:
@@ -44,7 +44,7 @@ export const ClientAddressDisplay: FC<ClientAddressProps & { address?: string }>
|
||||
)}
|
||||
|
||||
<AddressTooltip address={address} visible={!showEntireAddress}>
|
||||
<Typography variant="body2" component="span" sx={{ mr: 1, color: 'text.primary', fontWeight: 400 }}>
|
||||
<Typography data-testid="wallet-address" variant="body2" component="span" sx={{ mr: 1, color: 'text.primary', fontWeight: 400 }}>
|
||||
{showEntireAddress ? address || '' : splice(6, address)}
|
||||
</Typography>
|
||||
</AddressTooltip>
|
||||
|
||||
@@ -2,6 +2,7 @@ import React from 'react';
|
||||
import { Button, Stack, TextField, Typography } from '@mui/material';
|
||||
import { Check, ContentCopySharp } from '@mui/icons-material';
|
||||
import { Warning } from './Warning';
|
||||
import { MnemonicModal } from './Accounts/modals/MnemonicModal';
|
||||
|
||||
export const Mnemonic = ({
|
||||
mnemonic,
|
||||
@@ -14,18 +15,19 @@ export const Mnemonic = ({
|
||||
}) => (
|
||||
<Stack spacing={2} alignItems="center">
|
||||
<Warning>
|
||||
<Typography sx={{ textAlign: 'center' }}>
|
||||
<Typography sx={{ textAlign: 'center' }} data-testid="below24word">
|
||||
Below is your 24 word mnemonic, make sure to store it in a safe place for accessing your wallet in the future
|
||||
</Typography>
|
||||
</Warning>
|
||||
<TextField
|
||||
label="Mnemonic"
|
||||
id="mnemonicPhrase"
|
||||
type="input"
|
||||
value={mnemonic}
|
||||
multiline
|
||||
autoFocus={false}
|
||||
fullWidth
|
||||
inputProps={{
|
||||
inputProps={{
|
||||
style: {
|
||||
height: '160px',
|
||||
},
|
||||
@@ -39,6 +41,7 @@ export const Mnemonic = ({
|
||||
/>
|
||||
|
||||
<Button
|
||||
data-testid="copyMnemonic"
|
||||
color="inherit"
|
||||
disableElevation
|
||||
size="large"
|
||||
|
||||
@@ -103,6 +103,7 @@ export const Nav = () => {
|
||||
<ListItem
|
||||
disableGutters
|
||||
key={label}
|
||||
data-testid={label}
|
||||
onClick={onClick}
|
||||
sx={{
|
||||
cursor: 'pointer',
|
||||
|
||||
@@ -16,7 +16,7 @@ const NetworkItem: React.FC<{ title: string; isSelected: boolean; onSelect: () =
|
||||
isSelected,
|
||||
onSelect,
|
||||
}) => (
|
||||
<ListItem button onClick={onSelect}>
|
||||
<ListItem button onClick={onSelect} data-testid={title}>
|
||||
<ListItemIcon>{isSelected && <CheckSharp color="success" />}</ListItemIcon>
|
||||
<ListItemText>{title}</ListItemText>
|
||||
</ListItem>
|
||||
@@ -38,6 +38,7 @@ export const NetworkSelector = () => {
|
||||
return (
|
||||
<>
|
||||
<Button
|
||||
data-testid="networkEnv"
|
||||
variant="text"
|
||||
color="inherit"
|
||||
sx={{ color: 'text.primary', fontSize: 14 }}
|
||||
|
||||
@@ -22,6 +22,7 @@ export const MnemonicInput: React.FC<{
|
||||
autoFocus
|
||||
fullWidth
|
||||
inputProps={{
|
||||
"data-testid": "inputMnemonic",
|
||||
style: {
|
||||
height: '160px',
|
||||
},
|
||||
@@ -34,6 +35,7 @@ export const MnemonicInput: React.FC<{
|
||||
}}
|
||||
/>
|
||||
<FormControlLabel
|
||||
data-testid="Reveal Mnemonic"
|
||||
control={<Checkbox checked={Boolean(showPassword)} onChange={() => setShowPassword((show) => !show)} />}
|
||||
label="Reveal my mnemonic"
|
||||
/>
|
||||
@@ -73,6 +75,9 @@ export const PasswordInput: React.FC<{
|
||||
),
|
||||
}}
|
||||
InputLabelProps={{ shrink: true }}
|
||||
inputProps={{
|
||||
"data-testid": label,
|
||||
}}
|
||||
/>
|
||||
</Box>
|
||||
{error && <Error message={error} />}
|
||||
|
||||
@@ -27,7 +27,7 @@ export const BalanceCard = () => {
|
||||
)}
|
||||
{!userBalance.error && (
|
||||
<Typography
|
||||
data-testid="refresh-success"
|
||||
data-testid="nym-balance"
|
||||
sx={{
|
||||
color: 'text.primary',
|
||||
textTransform: 'uppercase',
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
reports
|
||||
allure-results
|
||||
node_modules
|
||||
.vscode
|
||||
.idea
|
||||
@@ -1,86 +1,114 @@
|
||||
import Balance from '../test/pageobjects/balanceScreen'
|
||||
import Auth from '../test/pageobjects/authScreens'
|
||||
const userData = require("../common/user-data.json");
|
||||
const deleteScript = require("../scripts/deletesavedwallet")
|
||||
const savedWalletScript = require("../scripts/savedwalletexists")
|
||||
|
||||
import Balance from '../test/pageobjects/balanceScreen';
|
||||
import Auth from '../test/pageobjects/authScreens';
|
||||
const userData = require('../common/user-data.json');
|
||||
const deleteScript = require('../scripts/deletesavedwallet');
|
||||
const savedWalletScript = require('../scripts/deletesavedwallet.ts');
|
||||
|
||||
class Helpers {
|
||||
|
||||
// clear wallet data, login, and navigate to QA network
|
||||
// clear wallet data, login, and navigate to QA network
|
||||
freshMnemonicLoginQaNetwork = async () => {
|
||||
await deleteScript
|
||||
await savedWalletScript
|
||||
await Auth.loginWithMnemonic(userData.mnemonic)
|
||||
await Balance.selectQa()
|
||||
}
|
||||
await deleteScript;
|
||||
await savedWalletScript;
|
||||
// await Auth.loginWithMnemonic(userData.mnemonic)
|
||||
await this.loginMnemonic();
|
||||
await Balance.selectQa();
|
||||
};
|
||||
|
||||
// login with a mnemonic
|
||||
loginMnemonic = async () => {
|
||||
await Auth.loginWithMnemonic(userData.mnemonic)
|
||||
}
|
||||
var decodedmnemonic = this.decodeBase(userData.mnemonic);
|
||||
await Auth.loginWithMnemonic(decodedmnemonic);
|
||||
};
|
||||
|
||||
//helper to decode mnemonic so plain 24 character passphrase isn't in sight albeit it is presented when ruunning the scripts
|
||||
// TO-DO figure out what's going on with the decoding bit
|
||||
decodeBase = async (input) => {
|
||||
var m = Buffer.from(input, "base64").toString();
|
||||
return m;
|
||||
}
|
||||
// click the mnemonic words by index position
|
||||
|
||||
navigateAndClick = async (element) => {
|
||||
await element.waitForClickable({ timeout: 6000 })
|
||||
await element.click();
|
||||
}
|
||||
// TO-DO find the best approach
|
||||
mnemonicWordTileIndex = async () => {
|
||||
let mnemonic = await browser.execute(() => {
|
||||
// @ts-ignore: Object is possibly 'null'.
|
||||
return document.getElementById('mnemonicPhrase').innerHTML;
|
||||
});
|
||||
|
||||
elementVisible = async (element) => {
|
||||
await element.waitForDisplayed({ timeout: 6000 })
|
||||
}
|
||||
let arrayMnemonic = mnemonic.split(' ');
|
||||
|
||||
elementClickable = async (element) => {
|
||||
await element.toBeClickable({ timeout: 8000 })
|
||||
}
|
||||
await this.navigateAndClick(Auth.copyMnemonic);
|
||||
await this.navigateAndClick(Auth.iSavedMnemonic);
|
||||
// verify the mnemonic words in the correct order
|
||||
let mnemonicWordTiles = await Auth.mnemonicWordTile;
|
||||
let wordTileIndex = await Auth.wordIndex;
|
||||
|
||||
addValueToTextField = async (element, value) => {
|
||||
await element.addValue(value)
|
||||
}
|
||||
const wordsArray: any[] = [];
|
||||
|
||||
verifyStrictText = async (element, expectedText) => {
|
||||
let error = await element.getText()
|
||||
expect(error).toStrictEqual(expectedText)
|
||||
|
||||
}
|
||||
|
||||
verifyPartialText = async (element, expectedText) => {
|
||||
let error = await element.getText()
|
||||
expect(error).toContain(expectedText)
|
||||
}
|
||||
|
||||
currentBalance = async (value) => {
|
||||
return parseFloat(value.split(/\s+/)[0].toString()).toFixed(5)
|
||||
}
|
||||
|
||||
|
||||
calculateFees = async (beforeBalance, transactionFee, amount, isSend) => {
|
||||
let fee
|
||||
|
||||
if (isSend) {
|
||||
//send transaction
|
||||
fee = transactionFee.split(/\s+/)[0]
|
||||
} else {
|
||||
//delegate transaction
|
||||
fee = transactionFee.split(/\s+/)[3]
|
||||
for (const word of mnemonicWordTiles) {
|
||||
const wordText = await word.getText();
|
||||
const index = arrayMnemonic.indexOf(wordText);
|
||||
wordsArray.push({ word, index });
|
||||
}
|
||||
for (const index of wordTileIndex) {
|
||||
const indexValue = await index.getText();
|
||||
const match = wordsArray.find((word) => +word.index === +indexValue - 1);
|
||||
if (match) {
|
||||
await match.word.click();
|
||||
}
|
||||
}
|
||||
|
||||
const currentBalance = beforeBalance.split(/\s+/)[0]
|
||||
console.log("currenttttt 2 ............. = " + currentBalance)
|
||||
const castCurrentBalance = parseFloat(currentBalance).toFixed(5)
|
||||
console.log("castttt ............. " + castCurrentBalance)
|
||||
const transCost = +parseFloat(amount) + +parseFloat(fee).toFixed(5)
|
||||
console.log("trans ............." + transCost)
|
||||
const nextButton = await Auth.nextToStep3;
|
||||
//something needs checking over here
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
expect(isNextDisabled).toBe(null);
|
||||
await this.navigateAndClick(Auth.nextToStep3);
|
||||
};
|
||||
|
||||
let sum = +castCurrentBalance - transCost
|
||||
return sum.toFixed(5)
|
||||
// decode user data file
|
||||
decodeBase = (input) => {
|
||||
const m = Buffer.from(input, 'base64').toString();
|
||||
return m;
|
||||
};
|
||||
|
||||
// common actions
|
||||
navigateAndClick = async (element) => {
|
||||
await element.waitForClickable({ timeout: 6000 });
|
||||
await element.click();
|
||||
};
|
||||
|
||||
elementVisible = async (element) => {
|
||||
await element.waitForDisplayed({ timeout: 6000 });
|
||||
};
|
||||
|
||||
elementGetText = async (element) => {
|
||||
await element.getText(element);
|
||||
};
|
||||
|
||||
elementClickable = async (element) => {
|
||||
await element.toBeClickable({ timeout: 8000 });
|
||||
};
|
||||
|
||||
addValueToTextField = async (element, value) => {
|
||||
await element.addValue(value);
|
||||
};
|
||||
|
||||
verifyStrictText = async (element, expectedText) => {
|
||||
let error = await element.getText();
|
||||
expect(error).toStrictEqual(expectedText);
|
||||
};
|
||||
|
||||
verifyPartialText = async (element, expectedText) => {
|
||||
let error = await element.getText();
|
||||
expect(error).toContain(expectedText);
|
||||
};
|
||||
|
||||
getAccountAddress = async () => {
|
||||
// fix this in the future to make it generic
|
||||
|
||||
let address = await browser.execute(() => {
|
||||
return document.querySelectorAll("[data-testid='wallet-address']")[0].innerHTML;
|
||||
});
|
||||
return address;
|
||||
}
|
||||
|
||||
//removed those nasty methods as we can now get the correct txs fee from estimation
|
||||
//add cleaner approach
|
||||
|
||||
}
|
||||
|
||||
module.exports = new Helpers();
|
||||
export default new Helpers();
|
||||
|
||||
@@ -1,43 +1,41 @@
|
||||
module.exports = {
|
||||
//welcome, sign in, create account
|
||||
homePageErrorMnemonic: 'Error parsing bip39 mnemonic',
|
||||
signInWithoutMnemonic: 'A mnemonic must be provided',
|
||||
signInRandomString: 'mnemonic has a word count that is not a multiple of 6:',
|
||||
signInIncorrectMnemonic: 'mnemonic contains an unknown word',
|
||||
incorrectMnemonicPasswordCreation: 'The mnemonic provided is not valid. Please check the mnemonic',
|
||||
invalidPasswordOnSignIn: 'failed to decrypt the given data with the provided password',
|
||||
signInWithoutPassword: 'A password must be provided',
|
||||
failedToFindWalletFile: 'The wallet file is not found',
|
||||
|
||||
//welcome, sign in, create account
|
||||
homePageErrorMnemonic: "Error parsing bip39 mnemonic",
|
||||
signInWithoutMnemonic: "A mnemonic must be provided",
|
||||
signInRandomString: "mnemonic has a word count that is not a multiple of 6:",
|
||||
signInIncorrectMnemonic: "mnemonic contains an unknown word",
|
||||
incorrectMnemonicPasswordCreation: "The mnemonic provided is not valid. Please check the mnemonic",
|
||||
invalidPasswordOnSignIn: "failed to decrypt the given data with the provided password",
|
||||
signInWithoutPassword: "A password must be provided",
|
||||
failedToFindWalletFile: "The wallet file is not found",
|
||||
|
||||
//headers
|
||||
mnemonicSignIn: "Enter a mnemonic to sign in",
|
||||
passwordSignIn: "Enter a password to sign in",
|
||||
|
||||
//homePage
|
||||
qaNetwork: "QA",
|
||||
sandboxNetwork: "Testnet Sandbox",
|
||||
mainnetNetwork: "Nym Mainnet",
|
||||
noNym: "0 NYM",
|
||||
|
||||
//send
|
||||
invalidRecipientAddress: "123",
|
||||
recipientAddress: "n17tj0a0w6v7r2dc54rnkzfza6s8hxs87rj273a5",
|
||||
amountToSend: "1",
|
||||
negativeAmount: "-1",
|
||||
inferiorAmount: "0.0000001",
|
||||
confirmedAmount: "1 NYM",
|
||||
sendDetails: "Send details",
|
||||
|
||||
|
||||
// bond
|
||||
host: "1.1.1.1",
|
||||
version: "1.2.1",
|
||||
|
||||
// user incorrect data
|
||||
incorrectMnemonic: "giraffe note order sun cradle bottom crime humble able antique rural donkey guess parent potato tongue truly way disagree exile zebra someone else heat",
|
||||
randomString:"thisrandomstring",
|
||||
password:"iAmThePassword1!",
|
||||
incorrectPassword:"123notvalid",
|
||||
};
|
||||
|
||||
//headers
|
||||
mnemonicSignIn: 'Enter a mnemonic to sign in',
|
||||
passwordSignIn: 'Enter a password to sign in',
|
||||
|
||||
//homePage
|
||||
qaNetwork: 'QA',
|
||||
sandboxNetwork: 'Testnet Sandbox',
|
||||
mainnetNetwork: 'Nym Mainnet',
|
||||
noNym: '0 NYM',
|
||||
|
||||
//send
|
||||
invalidRecipientAddress: '123',
|
||||
recipientAddress: 'n17tj0a0w6v7r2dc54rnkzfza6s8hxs87rj273a5',
|
||||
amountToSend: '1',
|
||||
negativeAmount: '-1',
|
||||
inferiorAmount: '0.0000001',
|
||||
confirmedAmount: '1 NYM',
|
||||
sendDetails: 'Send details',
|
||||
|
||||
// bond
|
||||
host: '1.1.1.1',
|
||||
version: '1.2.1',
|
||||
|
||||
// user incorrect data
|
||||
incorrectMnemonic:
|
||||
'bottom crime humble able antique rural donkey guess parent potato tongue truly way disagree exile zebra someone else heat giraffe note order sun cradle',
|
||||
randomString: 'thisrandomstring',
|
||||
password: 'updownUPDOWN~#$2',
|
||||
incorrectPassword: '123notvalid',
|
||||
};
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
{
|
||||
"mnemonic": "giraffe note order sun cradle bottom crime humble able antique rural donkey guess parent potato tongue truly way disagree exile zebra someone else typical",
|
||||
"qa_address": "n1qqct7gs79yrjncpkumljxeqjsnwvn42j2g3fw4",
|
||||
"receiver_address": "n167rupnmpput2alw62sz43eelks03zek4fwvjk0",
|
||||
"amount_to_send": "1",
|
||||
"identity_key_to_delegate_mix_node": "HqW2HStFHtAZ3PxRaiSCh7xJK6B7swoR1gSmJzH2iV9g",
|
||||
"identity_key_to_delegate_gateway": "",
|
||||
"delegate_amount": "10"
|
||||
}
|
||||
|
||||
"mnemonic": ""
|
||||
}
|
||||
|
||||
+6870
-6870
File diff suppressed because it is too large
Load Diff
@@ -1,22 +1,29 @@
|
||||
{
|
||||
"name": "webdriverio-tests",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@wdio/cli": "^7.25.4",
|
||||
"@wdio/local-runner": "^7.16.16",
|
||||
"@wdio/mocha-framework": "^7.16.15",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"prettier": "2.5.1",
|
||||
"typescript": "^4.6.2",
|
||||
"@nymproject/nym-validator-client": "0.18.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "wdio run test/wdio.conf.ts",
|
||||
"test-login": "wdio run test/wdio.conf.ts --suite login"
|
||||
}
|
||||
"name": "webdriverio-tests",
|
||||
"version": "0.1.0",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"@wdio/cli": "^7.25.4",
|
||||
"@wdio/local-runner": "^7.16.16",
|
||||
"@wdio/mocha-framework": "^7.16.15",
|
||||
"@types/mocha": "^9.1.1",
|
||||
"prettier": "2.5.1",
|
||||
"typescript": "^4.6.2",
|
||||
"@nymproject/nym-validator-client": "0.18.0",
|
||||
"@wdio/allure-reporter": "^7.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "wdio run test/wdio.conf.ts",
|
||||
"test-login": "wdio run test/wdio.conf.ts --suite login",
|
||||
"test-signup": "wdio run test/wdio.conf.ts --suite signup",
|
||||
"test-general": "wdio run test/wdio.conf.ts --suite general",
|
||||
"test-balance": "wdio run test/wdio.conf.ts --suite balance",
|
||||
"test-helper": "wdio run test/wdio.conf.ts --suite helper",
|
||||
"test-delegation": "wdio run test/wdio.conf.ts --suite delegation",
|
||||
"run:prettier": "prettier --write ."
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
const { exec } = require("child_process")
|
||||
const { exec } = require('child_process');
|
||||
const os = require('os');
|
||||
|
||||
const deleteSavedFile = exec("rm '/home/benedetta/.local/share/nym-wallet/saved-wallet.json'", (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.error(`${err.message}`)
|
||||
return
|
||||
} else
|
||||
console.log("File deleted")
|
||||
})
|
||||
let homedir = os.homedir();
|
||||
|
||||
const doesFileExist = exec(`test -f ${homedir}/.local/share/nym-wallet/saved-wallet.json`, (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.error(`${err.message}`);
|
||||
return;
|
||||
} else console.log('File deleted');
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
|
||||
#kill existing process
|
||||
kill -9 $(ps aux | egrep "WebKitWeb|tauri-dri" | awk '{print $2}')
|
||||
kill -9 "$(pgrep aux | grep -E "WebKitWeb|tauri-dri" | awk '{print $2}')"
|
||||
exit 0;
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
const { exec } = require("child_process")
|
||||
|
||||
// const doesFileExist = exec("test -f /home/benedetta/.local/share/nym-wallet/saved-wallet.json" && "echo '$FILE exists.'" || "echo 'file doesn't exist'")
|
||||
// scriptExist ? expect(getErrorWarning).toStrictEqual(textConstants.invalidPasswordOnSignIn) : expect(getErrorWarning).toStrictEqual(textConstants.failedToFindWalletFile)
|
||||
|
||||
|
||||
const doesFileExist = exec("test -f /home/benedetta/.local/share/nym-wallet/saved-wallet.json", (err, stdout, stderr) => {
|
||||
if (err) {
|
||||
console.error(`${err.message}`)
|
||||
return
|
||||
} else
|
||||
console.log("File: " + stdout)
|
||||
})
|
||||
|
||||
@@ -1,21 +1,38 @@
|
||||
class Nav {
|
||||
get lightMode(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='LightModeOutlinedIcon']");
|
||||
}
|
||||
get darkMode(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='ModeNightOutlinedIcon']");
|
||||
}
|
||||
get terminalTitle(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='terminal-header']");
|
||||
}
|
||||
get terminalIcon(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='TerminalIcon']");
|
||||
}
|
||||
|
||||
get lightMode(): Promise<WebdriverIO.Element> { return $("[data-testid='LightModeOutlinedIcon']") }
|
||||
get darkMode(): Promise<WebdriverIO.Element> { return $("[data-testid='ModeNightOutlinedIcon']") }
|
||||
get terminalTitle(): Promise<WebdriverIO.Element> { return $("[data-testid='terminal-header']") }
|
||||
get terminalIcon(): Promise<WebdriverIO.Element> { return $("[data-testid='TerminalIcon']") }
|
||||
|
||||
|
||||
get balance(): Promise<WebdriverIO.Element> { return $("[data-testid='Balance']") }
|
||||
get send(): Promise<WebdriverIO.Element> { return $("[data-testid='Send']") }
|
||||
get receive(): Promise<WebdriverIO.Element> { return $("[data-testid='Receive']") }
|
||||
get bond(): Promise<WebdriverIO.Element> { return $("[data-testid='Bond']") }
|
||||
get unbond(): Promise<WebdriverIO.Element> { return $("[data-testid='Unbond']") }
|
||||
get delegation(): Promise<WebdriverIO.Element> { return $("[data-testid='Delegation']") }
|
||||
|
||||
|
||||
|
||||
get closeIcon(): Promise<WebdriverIO.Element> { return $("[data-testid='CloseIcon']") }
|
||||
get balance(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Balance']");
|
||||
}
|
||||
get send(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Send']");
|
||||
}
|
||||
get receive(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Receive']");
|
||||
}
|
||||
get bond(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Bond']");
|
||||
}
|
||||
get unbond(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Unbond']");
|
||||
}
|
||||
get delegation(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Delegation']");
|
||||
}
|
||||
|
||||
get closeIcon(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='CloseIcon']");
|
||||
}
|
||||
}
|
||||
export default new Nav()
|
||||
export default new Nav();
|
||||
|
||||
@@ -1,74 +1,162 @@
|
||||
import Balance from '../pageobjects/balanceScreen'
|
||||
import Balance from '../pageobjects/balanceScreen';
|
||||
import Helper from '../../common/helper';
|
||||
const deleteScript = require('../../scripts/deletesavedwallet');
|
||||
|
||||
class Auth {
|
||||
//Welcome landing page
|
||||
get signInButton(): Promise<WebdriverIO.Element> { return $("[data-testid='signIn']") }
|
||||
get createAccount(): Promise<WebdriverIO.Element> { return $("[data-testid='createAccount']") }
|
||||
get signInButton(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='signIn']");
|
||||
}
|
||||
get createAccount(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='createAccount']");
|
||||
}
|
||||
|
||||
// Existing account sign in option page
|
||||
get signInMnemonic(): Promise<WebdriverIO.Element> { return $("[data-testid='signInWithMnemonic']") }
|
||||
get signInPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='signInWithPassword']") }
|
||||
get backToWelcomePage(): Promise<WebdriverIO.Element> { return $("[data-testid='backToWelcomePage']") }
|
||||
get forgotPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='forgotPassword']") }
|
||||
get signInMnemonic(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='signInWithMnemonic']");
|
||||
}
|
||||
get signInPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='signInWithPassword']");
|
||||
}
|
||||
get backToWelcomePage(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToWelcomePage']");
|
||||
}
|
||||
get forgotPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='forgotPassword']");
|
||||
}
|
||||
|
||||
// Sign in with mnemonic page
|
||||
get mnemonicLoginScreenHeader(): Promise<WebdriverIO.Element> { return $("[data-testid='Enter a mnemonic to sign in']") } //check
|
||||
get mnemonicInput(): Promise<WebdriverIO.Element> { return $("[data-testid='mnemonicInput']") } //check
|
||||
get signIn(): Promise<WebdriverIO.Element> { return $("[data-testid='signInWithMnemonicButton']") }
|
||||
get backToSignInOptions(): Promise<WebdriverIO.Element> { return $("[data-testid='backToSignInOptions']") }
|
||||
get createPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='goToCreatePassword']") }
|
||||
// Sign in with mnemonic page
|
||||
get mnemonicLoginScreenHeader(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Enter a mnemonic to sign in']");
|
||||
}
|
||||
get mnemonicInput(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='inputMnemonic']");
|
||||
}
|
||||
get signIn(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='signInWithMnemonicButton']");
|
||||
}
|
||||
get backToSignInOptions(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToSignInOptions']");
|
||||
}
|
||||
get revealMnemonic(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Reveal Mnemonic']");
|
||||
}
|
||||
get createPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='goToCreatePassword']");
|
||||
}
|
||||
|
||||
// Create password step 1/2
|
||||
get backToMnemonicSignIn(): Promise<WebdriverIO.Element> { return $("[data-testid='backToMnemonicSignIn']") }
|
||||
get nextToPasswordCreation(): Promise<WebdriverIO.Element> { return $("[data-testid='nextToPasswordCreation']") }
|
||||
get backToMnemonicSignIn(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToMnemonicSignIn']");
|
||||
}
|
||||
get nextToPasswordCreation(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='nextToPasswordCreation']");
|
||||
}
|
||||
|
||||
// Create password step 2/2
|
||||
get password(): Promise<WebdriverIO.Element> { return $("[data-testid='Password']") }
|
||||
get confirmPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='Confirm password']") }
|
||||
get createPasswordButton(): Promise<WebdriverIO.Element> { return $("[data-testid='createPasswordButton']") }
|
||||
get backToStep1PasswordCreation(): Promise<WebdriverIO.Element> { return $("[data-testid='backToStep1PasswordCreation']") }
|
||||
get password(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Password']");
|
||||
}
|
||||
get confirmPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Confirm password']");
|
||||
}
|
||||
get createPasswordButton(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='createPasswordButton']");
|
||||
}
|
||||
get backToStep1PasswordCreation(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToStep1PasswordCreation']");
|
||||
}
|
||||
|
||||
// Create account step 1/3
|
||||
get copyMnemonic(): Promise<WebdriverIO.Element> { return $("[data-testid='copyMnemonic']") } //check
|
||||
get iSavedMnemonic(): Promise<WebdriverIO.Element> { return $("[data-testid='iSavedMnemonic']") } //check
|
||||
get mnemonicPhrase(): Promise<WebdriverIO.Element> { return $("[data-testid='mnemonicPhrase']") }
|
||||
get backToWelcomePageFromCreate(): Promise<WebdriverIO.Element> { return $("[data-testid='backToWelcome']") }
|
||||
get copyMnemonic(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='copyMnemonic']");
|
||||
}
|
||||
get iSavedMnemonic(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='iSavedMnemonic']");
|
||||
}
|
||||
get mnemonicPhrase(): Promise<WebdriverIO.Element> {
|
||||
return $('mnemonicPhrase');
|
||||
}
|
||||
|
||||
get backToWelcomePageFromCreate(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToWelcome']");
|
||||
}
|
||||
|
||||
// Create account step 2/3
|
||||
get wordIndex(): Promise<WebdriverIO.Element> { return $("[data-testid='wordIndex']") }
|
||||
get mnemonicWordTile(): Promise<WebdriverIO.Element> { return $("[data-testid='mnemonicWordTile']") }
|
||||
get nextToStep3(): Promise<WebdriverIO.Element> { return $("[data-testid='nextToStep3']") }
|
||||
get backToStep1(): Promise<WebdriverIO.Element> { return $("[data-testid='backToStep1']") }
|
||||
get wordIndex(): Promise<WebdriverIO.ElementArray> {
|
||||
return $$("[data-testid='wordIndex']");
|
||||
}
|
||||
get mnemonicWordTile(): Promise<WebdriverIO.ElementArray> {
|
||||
return $$("[data-testid='mnemonicWordTile']");
|
||||
}
|
||||
|
||||
get nextToStep3(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='nextToStep3']");
|
||||
}
|
||||
get backToStep1(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='backToStep1']");
|
||||
}
|
||||
|
||||
// Create account step 3/3
|
||||
get nextStorePassword(): Promise<WebdriverIO.Element> { return $("[data-testid='nextStorePassword']") }
|
||||
get skipPasswordAndSignInWithMnemonic(): Promise<WebdriverIO.Element> { return $("[data-testid='skipPasswordAndSignInWithMnemonic']") }
|
||||
get nextStorePassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='nextStorePassword']");
|
||||
}
|
||||
get skipPasswordAndSignInWithMnemonic(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='skipPasswordAndSignInWithMnemonic']");
|
||||
}
|
||||
|
||||
// Enter password to sign in
|
||||
get passwordLoginScreenHeader(): Promise<WebdriverIO.Element> { return $("[data-testid='Enter a password to sign in']") }
|
||||
get enterPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='Enter password']") }
|
||||
get signInPasswordButton(): Promise<WebdriverIO.Element> { return $("[data-testid='signInPasswordButton']") }
|
||||
get backToSignInOptionsFromPassword(): Promise<WebdriverIO.Element> { return $("[data-testid='skipAndSignInWithMnemonic']") }
|
||||
get forgotPasswordButton(): Promise<WebdriverIO.Element> { return $("[data-testid='forgotPasswordButton']") }
|
||||
get passwordLoginScreenHeader(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Enter a password to sign in']");
|
||||
}
|
||||
get enterPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Enter password']");
|
||||
}
|
||||
get signInPasswordButton(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='signInPasswordButton']");
|
||||
}
|
||||
get backToSignInOptionsFromPassword(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='skipAndSignInWithMnemonic']");
|
||||
}
|
||||
get forgotPasswordButton(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='forgotPasswordButton']");
|
||||
}
|
||||
|
||||
// Errors
|
||||
get error(): Promise<WebdriverIO.Element> { return $("[data-testid='error']") } //check
|
||||
//TO-DO get this bit below working
|
||||
get error(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='error']");
|
||||
} //check
|
||||
//TO-DO get this bit below working
|
||||
|
||||
getErrorMessage = async () => {
|
||||
await (await this.error).waitForDisplayed({ timeout: 1500 })
|
||||
await (await this.error).getText()
|
||||
}
|
||||
await (await this.error).waitForDisplayed({ timeout: 1500 });
|
||||
await (await this.error).getText();
|
||||
};
|
||||
|
||||
//login to the application
|
||||
loginWithMnemonic = async (mnemonic) => {
|
||||
await (await this.signInButton).click()
|
||||
await (await this.signInMnemonic).click()
|
||||
await (await this.mnemonicInput).waitForDisplayed()
|
||||
await (await this.signInButton).click();
|
||||
await (await this.signInMnemonic).click();
|
||||
await (await this.mnemonicInput).waitForDisplayed();
|
||||
await (await this.revealMnemonic).click();
|
||||
await (await this.mnemonicInput).addValue(mnemonic);
|
||||
await (await this.signIn).click();
|
||||
await (await Balance.nymBalance).waitForDisplayed({ timeout: 4000 });
|
||||
};
|
||||
|
||||
newMnemonicCreation = async () => {
|
||||
deleteScript;
|
||||
|
||||
await Helper.navigateAndClick(this.createAccount);
|
||||
|
||||
await Helper.mnemonicWordTileIndex();
|
||||
|
||||
const nextButton = await this.nextToStep3;
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
|
||||
expect(isNextDisabled).toBe(null);
|
||||
await Helper.navigateAndClick(this.nextToStep3);
|
||||
};
|
||||
}
|
||||
|
||||
export default new Auth()
|
||||
export default new Auth();
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
class Balance {
|
||||
get balance(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='Balance']");
|
||||
}
|
||||
get checkBalance(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='check-balance']");
|
||||
}
|
||||
get nymBalance(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='nym-balance']");
|
||||
}
|
||||
|
||||
get balance(): Promise<WebdriverIO.Element> { return $("[data-testid='Balance']") }
|
||||
get checkBalance(): Promise<WebdriverIO.Element> { return $("[data-testid='check-balance']") }
|
||||
get nymBalance(): Promise<WebdriverIO.Element> { return $("[data-testid='nym-balance']") }
|
||||
get copyAccountId(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='ContentCopyIcon']");
|
||||
}
|
||||
|
||||
get copyAccountId(): Promise<WebdriverIO.Element> { return $("[data-testid='copyIcon']") }
|
||||
get walletAddress(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='wallet-address']");
|
||||
}
|
||||
|
||||
get accountNumber(): Promise<WebdriverIO.Element> { return $("[data-testid='accountNumber']") }
|
||||
get networkDropdown(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='ArrowDropDownIcon']");
|
||||
}
|
||||
get networkEnv(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='networkEnv']");
|
||||
}
|
||||
get networkSelectQa(): Promise<WebdriverIO.Element> {
|
||||
return $("[data-testid='QA']");
|
||||
}
|
||||
|
||||
get networkDropdown(): Promise<WebdriverIO.Element> { return $("[data-testid='ArrowDropDownIcon']") }
|
||||
get networkEnv(): Promise<WebdriverIO.Element> { return $("[data-testid='networkEnv']") }
|
||||
get networkSelectQa(): Promise<WebdriverIO.Element> { return $("[data-testid='QA']") }
|
||||
|
||||
selectQa = async () => {
|
||||
await (await this.networkDropdown).waitForDisplayed({ timeout: 4000 })
|
||||
await (await this.networkDropdown).click()
|
||||
await (await this.networkSelectQa).waitForClickable({ timeout: 4000 })
|
||||
await (await this.networkSelectQa).click()
|
||||
await (await this.networkEnv).waitForClickable({ timeout: 2000 })
|
||||
}
|
||||
selectQa = async () => {
|
||||
await (await this.networkDropdown).waitForDisplayed({ timeout: 4000 });
|
||||
await (await this.networkDropdown).click();
|
||||
await (await this.networkSelectQa).waitForClickable({ timeout: 4000 });
|
||||
await (await this.networkSelectQa).click();
|
||||
await (await this.networkEnv).waitForClickable({ timeout: 2000 });
|
||||
};
|
||||
}
|
||||
export default new Balance()
|
||||
export default new Balance();
|
||||
|
||||
@@ -1,17 +1,23 @@
|
||||
class Bond {
|
||||
// Bonding
|
||||
|
||||
// Bonding
|
||||
|
||||
get bondTitle() { return $("[data-testid='Bond']") }
|
||||
get mixnodeRadio() { return $("[data-testid='mix-node']") }
|
||||
get gatewayRadio() { return $("[data-testid='gate-way']") }
|
||||
get fundsAlert() { return $("[data-testid='fundsAlert']") }
|
||||
|
||||
|
||||
// Unbonding
|
||||
|
||||
get unbondTitle() { return $("[data-testid='Unbond']") }
|
||||
get bondTitle() {
|
||||
return $("[data-testid='Bond']");
|
||||
}
|
||||
get mixnodeRadio() {
|
||||
return $("[data-testid='mix-node']");
|
||||
}
|
||||
get gatewayRadio() {
|
||||
return $("[data-testid='gate-way']");
|
||||
}
|
||||
get fundsAlert() {
|
||||
return $("[data-testid='fundsAlert']");
|
||||
}
|
||||
|
||||
// Unbonding
|
||||
|
||||
get unbondTitle() {
|
||||
return $("[data-testid='Unbond']");
|
||||
}
|
||||
}
|
||||
export default new Bond()
|
||||
export default new Bond();
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
class Delegation {
|
||||
|
||||
get delegationTitle() { return $("[data-testid='Delegation']") }
|
||||
get delegateStakeButton() { return $("[data-testid='Delegate stake']") }
|
||||
get delegateModalHeader() { return $("[data-testid='Delegate']") }
|
||||
|
||||
get delegationTitle() {
|
||||
return $("[data-testid='Delegation']");
|
||||
}
|
||||
get delegateStakeButton() {
|
||||
return $("[data-testid='Delegate stake']");
|
||||
}
|
||||
get delegateModalHeader() {
|
||||
return $("[data-testid='Delegate']");
|
||||
}
|
||||
}
|
||||
|
||||
export default new Delegation()
|
||||
export default new Delegation();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
class Receive {
|
||||
|
||||
get receiveNymTitle() { return $("[data-testid='Receive NYM']") }
|
||||
|
||||
get receiveNymTitle() {
|
||||
return $("[data-testid='Receive NYM']");
|
||||
}
|
||||
}
|
||||
|
||||
export default new Receive()
|
||||
export default new Receive();
|
||||
|
||||
@@ -1,28 +1,46 @@
|
||||
class Send {
|
||||
|
||||
// send nym form
|
||||
get sendHeader() { return $("[data-testid='Send']") }
|
||||
get recipientAddress() { return $("[data-testid='recipientAddress']") }
|
||||
// get sendAmount() { return $("[data-testid='Amount']") }
|
||||
get sendAmount() { return $("#mui-5") } // TO-DO fix this selector, using #mui-5 isn't a good solution
|
||||
get next() { return $("[data-testid='Next']") }
|
||||
|
||||
// confirm transaction modal
|
||||
get sendDetailsHeader() { return $("[data-testid='Send details']") }
|
||||
get from() { return $("/html/body/div[2]/div[3]/div[2]/div[1]/div[1]") }
|
||||
get to() { return $("/html/body/div[2]/div[3]/div[2]/div[2]") }
|
||||
get amount() { return $("/html/body/div[2]/div[3]/div[2]/div[3]") }
|
||||
get fee() { return $("/html/body/div[2]/div[3]/div[2]/div[4]") }
|
||||
|
||||
get confirm() { return $("[data-testid='Confirm']") }
|
||||
|
||||
|
||||
// transaction sent
|
||||
get viewOnBlockchain() { return $("[data-testid='viewOnBlockchain']") }
|
||||
get done() { return $("[data-testid='Done']") }
|
||||
|
||||
// send nym form
|
||||
get sendHeader() {
|
||||
return $("[data-testid='Send']");
|
||||
}
|
||||
get recipientAddress() {
|
||||
return $("[data-testid='recipientAddress']");
|
||||
}
|
||||
// get sendAmount() { return $("[data-testid='Amount']") }
|
||||
get sendAmount() {
|
||||
return $('#mui-5');
|
||||
} // TO-DO fix this selector, using #mui-5 isn't a good solution
|
||||
get next() {
|
||||
return $("[data-testid='Next']");
|
||||
}
|
||||
|
||||
// confirm transaction modal
|
||||
get sendDetailsHeader() {
|
||||
return $("[data-testid='Send details']");
|
||||
}
|
||||
get from() {
|
||||
return $('/html/body/div[2]/div[3]/div[2]/div[1]/div[1]');
|
||||
}
|
||||
get to() {
|
||||
return $('/html/body/div[2]/div[3]/div[2]/div[2]');
|
||||
}
|
||||
get amount() {
|
||||
return $('/html/body/div[2]/div[3]/div[2]/div[3]');
|
||||
}
|
||||
get fee() {
|
||||
return $('/html/body/div[2]/div[3]/div[2]/div[4]');
|
||||
}
|
||||
|
||||
get confirm() {
|
||||
return $("[data-testid='Confirm']");
|
||||
}
|
||||
|
||||
// transaction sent
|
||||
get viewOnBlockchain() {
|
||||
return $("[data-testid='viewOnBlockchain']");
|
||||
}
|
||||
get done() {
|
||||
return $("[data-testid='Done']");
|
||||
}
|
||||
}
|
||||
export default new Send()
|
||||
export default new Send();
|
||||
|
||||
@@ -1,32 +1,34 @@
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import Helper from '../../../common/helper';
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
|
||||
describe('Balance screen displays correctly', () => {
|
||||
|
||||
it('selecting qa network', async () => {
|
||||
|
||||
//log in
|
||||
await Helper.loginMnemonic()
|
||||
await Helper.loginMnemonic();
|
||||
// select QA network
|
||||
await Helper.navigateAndClick(Balance.networkDropdown)
|
||||
await Helper.navigateAndClick(Balance.networkSelectQa)
|
||||
await Helper.navigateAndClick(Balance.networkDropdown);
|
||||
await Helper.navigateAndClick(Balance.networkSelectQa);
|
||||
// verifty QA network has been selected properly
|
||||
await Helper.verifyStrictText(Balance.networkEnv, textConstants.qaNetwork)
|
||||
|
||||
})
|
||||
await Helper.verifyStrictText(Balance.networkEnv, textConstants.qaNetwork);
|
||||
});
|
||||
|
||||
it('copy the account id', async () => {
|
||||
// ensure the account number contains *something*
|
||||
await Helper.elementVisible(Balance.walletAddress);
|
||||
|
||||
// ensure the account number contains *something*
|
||||
await Helper.elementVisible(Balance.accountNumber)
|
||||
await Helper.verifyPartialText(Balance.accountNumber[1],'1')
|
||||
await Helper.navigateAndClick(Balance.copyAccountId)
|
||||
// TO-DO is there a way to verify that the copy worked, aka pasting it somewhere maybe?
|
||||
let getaccountAddress = await Helper.getAccountAddress();
|
||||
|
||||
console.log(getaccountAddress);
|
||||
|
||||
})
|
||||
await Helper.navigateAndClick(Balance.copyAccountId);
|
||||
// disclaimer - I think if it's in clipboard we can use the below...
|
||||
// let's try using the clipboard api here - TODO
|
||||
|
||||
})
|
||||
// let clipboard = await browser.execute(() => {
|
||||
//
|
||||
// });
|
||||
//
|
||||
// })
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Nav from '../../pageobjects/appNavConstants'
|
||||
import Delegation from '../../pageobjects/delegationScreen'
|
||||
import Send from '../../pageobjects/sendScreen'
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Nav from '../../pageobjects/appNavConstants';
|
||||
import Delegation from '../../pageobjects/delegationScreen';
|
||||
import Send from '../../pageobjects/sendScreen';
|
||||
const Helper = require('../../../common/helper');
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
const userData = require('../../../common/user-data.json');
|
||||
|
||||
describe('Delegate to a mixnode', () => {
|
||||
|
||||
it('entering an invalid node identity key', async () => {
|
||||
|
||||
//login and navigate to the screen
|
||||
await Helper.freshMnemonicLoginQaNetwork()
|
||||
await Helper.navigateAndClick(Nav.delegation)
|
||||
await Helper.elementVisible(Delegation.delegationTitle)
|
||||
// TO-DO enter an invalid node
|
||||
|
||||
})
|
||||
})
|
||||
it('entering an invalid node identity key', async () => {
|
||||
//login and navigate to the screen
|
||||
await Helper.freshMnemonicLoginQaNetwork();
|
||||
await Helper.navigateAndClick(Nav.delegation);
|
||||
await Helper.elementVisible(Delegation.delegationTitle);
|
||||
// TO-DO enter an invalid node
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,72 +1,63 @@
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Nav from '../../pageobjects/appNavConstants'
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import Send from '../../pageobjects/sendScreen'
|
||||
import Receive from '../../pageobjects/receiveScreen'
|
||||
import Bond from '../../pageobjects/bondScreen'
|
||||
import Delegation from '../../pageobjects/delegationScreen'
|
||||
const userData = require("../../common/user-data.json");
|
||||
const Helper = require('../../common/helper');
|
||||
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Nav from '../../pageobjects/appNavConstants';
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import Send from '../../pageobjects/sendScreen';
|
||||
import Receive from '../../pageobjects/receiveScreen';
|
||||
import Bond from '../../pageobjects/bondScreen';
|
||||
import Delegation from '../../pageobjects/delegationScreen';
|
||||
const userData = require('../../../common/user-data.json');
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
describe('Nav Items behave correctly', () => {
|
||||
it('switch from light to dark mode and back', async () => {
|
||||
//log in()
|
||||
await Helper.freshMnemonicLoginQaNetwork();
|
||||
// click on different modes
|
||||
await Helper.navigateAndClick(Nav.lightMode);
|
||||
await Helper.navigateAndClick(Nav.darkMode);
|
||||
await Helper.elementVisible(Nav.lightMode);
|
||||
});
|
||||
|
||||
it('switch from light to dark mode and back', async () => {
|
||||
|
||||
//log in
|
||||
await Helper.freshMnemonicLoginQaNetwork()
|
||||
// click on different modes
|
||||
await Helper.navigateAndClick(Nav.lightMode)
|
||||
await Helper.navigateAndClick(Nav.darkMode)
|
||||
await Helper.elementVisible(Nav.lightMode)
|
||||
|
||||
})
|
||||
|
||||
it('clicking terminal opens the modal', async () => {
|
||||
|
||||
// ensure the terminal button opens the terminal
|
||||
await Helper.elementVisible(Nav.terminalIcon)
|
||||
await Helper.navigateAndClick(Nav.terminalIcon)
|
||||
await Helper.elementVisible(Nav.terminalTitle)
|
||||
await Helper.verifyPartialText(Nav.terminalTitle, 'Terminal')
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
it('clicking terminal opens the modal', async () => {
|
||||
// ensure the terminal button opens the terminal
|
||||
await Helper.elementVisible(Nav.terminalIcon);
|
||||
await Helper.navigateAndClick(Nav.terminalIcon);
|
||||
await Helper.elementVisible(Nav.terminalTitle);
|
||||
await Helper.verifyPartialText(Nav.terminalTitle, 'Terminal');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Menu items lead to correct screen', () => {
|
||||
//TO-DO none of this works
|
||||
//check each menu item opens the right screen/modal
|
||||
it('check Balance link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.balance);
|
||||
await Helper.verifyPartialText(Balance.balance, 'Balance');
|
||||
});
|
||||
|
||||
//TO-DO none of this works
|
||||
//check each menu item opens the right screen/modal
|
||||
it('check Balance link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.balance)
|
||||
await Helper.verifyPartialText(Balance.balance, 'Balance')
|
||||
})
|
||||
it('check Send link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.send);
|
||||
await Helper.verifyPartialText(Send.sendHeader, 'Send');
|
||||
await Helper.navigateAndClick(Nav.closeIcon);
|
||||
});
|
||||
|
||||
it('check Send link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.send)
|
||||
await Helper.verifyPartialText(Send.sendHeader, 'Send')
|
||||
await Helper.navigateAndClick(Nav.closeIcon)
|
||||
})
|
||||
it('check Receive link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.receive);
|
||||
await Helper.verifyPartialText(Receive.receiveNymTitle, 'Receive NYM');
|
||||
});
|
||||
|
||||
it('check Receive link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.receive)
|
||||
await Helper.verifyPartialText(Receive.receiveNymTitle, 'Receive NYM')
|
||||
})
|
||||
it('check Bond link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.bond);
|
||||
await Helper.verifyPartialText(Bond.bondTitle, 'Bond');
|
||||
});
|
||||
|
||||
it('check Bond link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.bond)
|
||||
await Helper.verifyPartialText(Bond.bondTitle, 'Bond')
|
||||
})
|
||||
it('check Unbond link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.unbond);
|
||||
await Helper.verifyPartialText(Bond.unbondTitle, 'Unbond');
|
||||
});
|
||||
|
||||
it('check Unbond link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.unbond)
|
||||
await Helper.verifyPartialText(Bond.unbondTitle, 'Unbond')
|
||||
})
|
||||
|
||||
it('check Delegation link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.delegation)
|
||||
await Helper.verifyPartialText(Delegation.delegationTitle, 'Delegation')
|
||||
})
|
||||
|
||||
})
|
||||
it('check Delegation link works', async () => {
|
||||
await Helper.navigateAndClick(Nav.delegation);
|
||||
await Helper.verifyPartialText(Delegation.delegationTitle, 'Delegation');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,62 +1,57 @@
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Nav from '../../pageobjects/appNavConstants'
|
||||
import Send from '../../pageobjects/sendScreen'
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Nav from '../../pageobjects/appNavConstants';
|
||||
import Send from '../../pageobjects/sendScreen';
|
||||
const Helper = require('../../../common/helper');
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
const userData = require('../../../common/user-data.json');
|
||||
|
||||
describe.skip('Send modal functions correctly', () => {
|
||||
it('entering an invalid recipient address shows error', async () => {
|
||||
// sign in with mnemonic and select QA
|
||||
await Helper.freshMnemonicLoginQaNetwork();
|
||||
// click on send and check modal appears
|
||||
await Helper.navigateAndClick(Nav.send);
|
||||
await Helper.elementVisible(Send.sendHeader);
|
||||
// add an invalid recipient address
|
||||
await Helper.addValueToTextField(Send.recipientAddress, textConstants.invalidRecipientAddress);
|
||||
// TO-DO -- question: should there not be an error message before clicking on Next to warn that the address is invalid?
|
||||
});
|
||||
|
||||
it('entering an invalid recipient address shows error', async () => {
|
||||
it('entering an valid recipient address with negative amount value shows error', async () => {
|
||||
await Helper.navigateAndClick(Send.recipientAddress);
|
||||
// TO-DO figure out how to clear a text field before adding new value
|
||||
await Send.recipientAddress.clearValue();
|
||||
await Helper.addValueToTextField(Send.recipientAddress, userData.receiver_address);
|
||||
await Helper.navigateAndClick(Send.sendAmount);
|
||||
await Helper.addValueToTextField(Send.sendAmount, textConstants.negativeAmount);
|
||||
//next button is still disabled and error message appears
|
||||
const nextButton = await Send.next;
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
expect(isNextDisabled).toBe('true');
|
||||
});
|
||||
|
||||
// sign in with mnemonic and select QA
|
||||
await Helper.freshMnemonicLoginQaNetwork()
|
||||
// click on send and check modal appears
|
||||
await Helper.navigateAndClick(Nav.send)
|
||||
await Helper.elementVisible(Send.sendHeader)
|
||||
// add an invalid recipient address
|
||||
await Helper.addValueToTextField(Send.recipientAddress, textConstants.invalidRecipientAddress)
|
||||
// TO-DO -- question: should there not be an error message before clicking on Next to warn that the address is invalid?
|
||||
})
|
||||
it('enter a valid recipient and value', async () => {
|
||||
// enter valid data
|
||||
await Helper.addValueToTextField(Send.recipientAddress, userData.receiver_address);
|
||||
const getCurrentBalance = await (await Balance.nymBalance).getText();
|
||||
await Helper.addValueToTextField(Send.sendAmount, textConstants.amountToSend);
|
||||
// click on next and verify details
|
||||
await Helper.navigateAndClick(Send.next);
|
||||
const fee = await (await Send.fee).getText();
|
||||
await Helper.verifyPartialText(Send.sendDetailsHeader, textConstants.sendDetails);
|
||||
await Helper.verifyPartialText(Send.amount, textConstants.confirmedAmount);
|
||||
|
||||
it('entering an valid recipient address with negative amount value shows error', async () => {
|
||||
await Helper.navigateAndClick(Send.confirm);
|
||||
await Helper.elementVisible(Send.viewOnBlockchain);
|
||||
await Helper.elementClickable(Send.done);
|
||||
|
||||
await Helper.navigateAndClick(Send.recipientAddress)
|
||||
// TO-DO figure out how to clear a text field before adding new value
|
||||
await (Send.recipientAddress).clearValue()
|
||||
await Helper.addValueToTextField(Send.recipientAddress, userData.receiver_address)
|
||||
await Helper.navigateAndClick(Send.sendAmount)
|
||||
await Helper.addValueToTextField(Send.sendAmount, textConstants.negativeAmount)
|
||||
//next button is still disabled and error message appears
|
||||
const nextButton = await Send.next
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled')
|
||||
expect(isNextDisabled).toBe("true")
|
||||
// calculate the transaction and verify it has been correctly executed
|
||||
let sumCost = await Helper.calculateFees(getCurrentBalance, fee, textConstants.amountToSend, true);
|
||||
const getNewBalance = await (await Balance.nymBalance).getText();
|
||||
|
||||
})
|
||||
|
||||
it('enter a valid recipient and value', async () => {
|
||||
|
||||
// enter valid data
|
||||
await Helper.addValueToTextField(Send.recipientAddress, userData.receiver_address)
|
||||
const getCurrentBalance = await (await Balance.nymBalance).getText()
|
||||
await Helper.addValueToTextField(Send.sendAmount, textConstants.amountToSend)
|
||||
// click on next and verify details
|
||||
await Helper.navigateAndClick(Send.next)
|
||||
const fee = await (await Send.fee).getText()
|
||||
await Helper.verifyPartialText(Send.sendDetailsHeader, textConstants.sendDetails)
|
||||
await Helper.verifyPartialText(Send.amount, textConstants.confirmedAmount)
|
||||
|
||||
await Helper.navigateAndClick(Send.confirm)
|
||||
await Helper.elementVisible(Send.viewOnBlockchain)
|
||||
await Helper.elementClickable(Send.done)
|
||||
|
||||
// calculate the transaction and verify it has been correctly executed
|
||||
let sumCost = await Helper.calculateFees(getCurrentBalance, fee, textConstants.amountToSend, true)
|
||||
const getNewBalance = await (await Balance.nymBalance).getText()
|
||||
|
||||
await Helper.navigateAndClick(Send.done)
|
||||
// TO-DO the following fails with "TypeError: elem[prop] is not a function"
|
||||
expect(getNewBalance).toEqual(sumCost)
|
||||
})
|
||||
})
|
||||
await Helper.navigateAndClick(Send.done);
|
||||
// TO-DO the following fails with "TypeError: elem[prop] is not a function"
|
||||
expect(getNewBalance).toEqual(sumCost);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
|
||||
describe('Create a new account and verify login', () => {
|
||||
it('generate new mnemonic and verify mnemonic words', async () => {
|
||||
// test to check new mnemonic creation
|
||||
// will refine shortly
|
||||
await browser.pause(1500);
|
||||
|
||||
await Auth.newMnemonicCreation();
|
||||
});
|
||||
});
|
||||
@@ -1,67 +1,54 @@
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import ValidatorClient from '@nymproject/nym-validator-client';
|
||||
import { text } from 'stream/consumers';
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
|
||||
|
||||
describe.skip('Wallet sign in functionality with mnemonic', () => {
|
||||
|
||||
describe('Wallet sign in functionality with mnemonic', () => {
|
||||
it('get to the sign in with mnemonic screen', async () => {
|
||||
|
||||
// click through to reach the mnemonic sign in
|
||||
await Helper.navigateAndClick(Auth.signInButton)
|
||||
await Helper.navigateAndClick(Auth.signInMnemonic)
|
||||
await Helper.navigateAndClick(Auth.signInButton);
|
||||
await Helper.navigateAndClick(Auth.signInMnemonic);
|
||||
// verify you are on the right screen by confirming the header
|
||||
await Helper.verifyStrictText(Auth.mnemonicLoginScreenHeader, textConstants.mnemonicSignIn)
|
||||
|
||||
})
|
||||
await Helper.verifyStrictText(Auth.mnemonicLoginScreenHeader, textConstants.mnemonicSignIn);
|
||||
});
|
||||
|
||||
it('sign in with no mnemonic throws error', async () => {
|
||||
|
||||
await Helper.navigateAndClick(Auth.signIn)
|
||||
await Helper.navigateAndClick(Auth.signIn);
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error)
|
||||
await Helper.elementVisible(Auth.error);
|
||||
// verify error has the correct message
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.signInWithoutMnemonic)
|
||||
|
||||
})
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.signInWithoutMnemonic);
|
||||
});
|
||||
|
||||
it('sign in with incorrect mnemonic throws error', async () => {
|
||||
|
||||
// enter an incorrect mnemonic string
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.incorrectMnemonic)
|
||||
await Helper.navigateAndClick(Auth.signIn)
|
||||
await Helper.navigateAndClick(Auth.revealMnemonic);
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.incorrectMnemonic);
|
||||
await Helper.navigateAndClick(Auth.signIn);
|
||||
// verifty error message is correct
|
||||
await Helper.verifyPartialText(Auth.error, textConstants.signInIncorrectMnemonic)
|
||||
|
||||
})
|
||||
await Helper.verifyPartialText(Auth.error, textConstants.signInIncorrectMnemonic);
|
||||
});
|
||||
|
||||
it('sign in with random string throws error', async () => {
|
||||
|
||||
await Helper.navigateAndClick(Auth.revealMnemonic);
|
||||
// enter a random string not in mnemonic "format"
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.randomString)
|
||||
await Helper.navigateAndClick(Auth.signIn)
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.randomString);
|
||||
await Helper.navigateAndClick(Auth.signIn);
|
||||
// verifty error message is correct
|
||||
await Helper.verifyPartialText(Auth.error, textConstants.signInRandomString)
|
||||
|
||||
})
|
||||
await Helper.verifyPartialText(Auth.error, textConstants.signInRandomString);
|
||||
});
|
||||
|
||||
it('should sign in with valid credentials', async () => {
|
||||
|
||||
// create new mnemonic
|
||||
const randomMnemonic = ValidatorClient.randomMnemonic();
|
||||
// enter mnemonic
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, randomMnemonic)
|
||||
await Helper.navigateAndClick(Auth.signIn)
|
||||
await Helper.navigateAndClick(Auth.revealMnemonic);
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, randomMnemonic);
|
||||
await Helper.navigateAndClick(Auth.signIn);
|
||||
// verify successful login, balance is visible
|
||||
await Helper.elementVisible(Balance.balance)
|
||||
//new accounts will always default to mainnet, so 0 balance
|
||||
// TO-DO this value sometimes returns " " instead of "0"
|
||||
await Helper.verifyStrictText(Balance.nymBalance, textConstants.noNym)
|
||||
|
||||
})
|
||||
})
|
||||
await Helper.elementVisible(Balance.balance);
|
||||
// TO-DO this value below is sometimes returning ""
|
||||
await Helper.verifyStrictText(Balance.nymBalance, textConstants.noNym);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,122 +1,98 @@
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
import ValidatorClient from '@nymproject/nym-validator-client'
|
||||
const deleteScript = require("../../../scripts/deletesavedwallet");
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const deleteWallet = require("../../../scripts/deletesavedwallet");
|
||||
const walletExists = require("../../../scripts/savedwalletexists");
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
import ValidatorClient from '@nymproject/nym-validator-client';
|
||||
const deleteScript = require('../../../scripts/deletesavedwallet');
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
describe.skip('Create password for existing account and use it to sign in', () => {
|
||||
describe('Create password for existing account and use it to sign in', () => {
|
||||
it('enter incorrect mnemonic', async () => {
|
||||
//click through sign in
|
||||
await Helper.navigateAndClick(Auth.signInButton);
|
||||
await Helper.navigateAndClick(Auth.signInMnemonic);
|
||||
//instead of entering mnemonic, click on create a password
|
||||
await Helper.navigateAndClick(Auth.createPassword);
|
||||
//enter incorrect mnemonic
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.incorrectMnemonic);
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation);
|
||||
|
||||
it('enter incorrect mnemonic', async () => {
|
||||
// assert error message is correct
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.incorrectMnemonicPasswordCreation);
|
||||
});
|
||||
|
||||
//click through sign in
|
||||
await Helper.navigateAndClick(Auth.signInButton)
|
||||
await Helper.navigateAndClick(Auth.signInMnemonic)
|
||||
//instead of entering mnemonic, click on create a password
|
||||
await Helper.navigateAndClick(Auth.createPassword)
|
||||
//enter incorrect mnemonic
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.incorrectMnemonic)
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation)
|
||||
it('enter random string', async () => {
|
||||
// enter random string as mnemonic
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.randomString);
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation);
|
||||
// assert error is correct
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.incorrectMnemonicPasswordCreation);
|
||||
});
|
||||
|
||||
// assert error message is correct
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.incorrectMnemonicPasswordCreation)
|
||||
})
|
||||
it('enter correct mnemonic', async () => {
|
||||
// generate random mnemonic in the backend
|
||||
const randomMnemonic = ValidatorClient.randomMnemonic();
|
||||
|
||||
it('enter random string', async () => {
|
||||
// use it to continue with password creation flow
|
||||
await Helper.navigateAndClick(Auth.backToMnemonicSignIn);
|
||||
await Helper.navigateAndClick(Auth.createPassword);
|
||||
await Helper.navigateAndClick(Auth.revealMnemonic);
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, randomMnemonic);
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation);
|
||||
await Helper.elementVisible(Auth.password);
|
||||
});
|
||||
|
||||
// enter random string as mnemonic
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, textConstants.randomString)
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation)
|
||||
// assert error is correct
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.incorrectMnemonicPasswordCreation)
|
||||
it('create an invalid password', async () => {
|
||||
// type an invalid password in both fields
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.incorrectPassword);
|
||||
await Helper.navigateAndClick(Auth.confirmPassword);
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.incorrectPassword);
|
||||
// ensure the button to proceed is still disabled
|
||||
const nextButton = await Auth.createPasswordButton;
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
expect(isNextDisabled).toBe('true');
|
||||
});
|
||||
|
||||
})
|
||||
it('create a valid password', async () => {
|
||||
// type a valid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password);
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.password);
|
||||
await Helper.navigateAndClick(Auth.confirmPassword);
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.password);
|
||||
// verify the password is created and the next screen is visible
|
||||
await Helper.navigateAndClick(Auth.createPasswordButton);
|
||||
await Helper.verifyStrictText(Auth.passwordLoginScreenHeader, textConstants.passwordSignIn);
|
||||
});
|
||||
|
||||
it('sign in with no password throws error', async () => {
|
||||
//click sign without entering a password
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton);
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error);
|
||||
// verify error has the correct message
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.signInWithoutPassword);
|
||||
});
|
||||
|
||||
it('enter correct mnemonic', async () => {
|
||||
|
||||
// generate random mnemonic in the backend
|
||||
const randomMnemonic = ValidatorClient.randomMnemonic();
|
||||
deleteScript
|
||||
// use it to continue with password creation flow
|
||||
await Helper.navigateAndClick(Auth.backToMnemonicSignIn)
|
||||
await Helper.navigateAndClick(Auth.createPassword)
|
||||
await Helper.addValueToTextField(Auth.mnemonicInput, randomMnemonic)
|
||||
await Helper.navigateAndClick(Auth.nextToPasswordCreation)
|
||||
await Helper.elementVisible(Auth.password)
|
||||
})
|
||||
|
||||
it('create an invalid password', async () => {
|
||||
|
||||
// type an invalid password in both fields
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.incorrectPassword)
|
||||
await Helper.navigateAndClick(Auth.confirmPassword)
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.incorrectPassword)
|
||||
// ensure the button to proceed is still disabled
|
||||
const nextButton = await Auth.createPasswordButton
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled')
|
||||
expect(isNextDisabled).toBe("true")
|
||||
|
||||
})
|
||||
|
||||
it('create a valid password', async () => {
|
||||
|
||||
// type a valid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password)
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.password)
|
||||
await Helper.navigateAndClick(Auth.confirmPassword)
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.password)
|
||||
// verify the password is created and the next screen is visible
|
||||
await Helper.navigateAndClick(Auth.createPasswordButton)
|
||||
await Helper.verifyStrictText(Auth.passwordLoginScreenHeader, textConstants.passwordSignIn)
|
||||
|
||||
})
|
||||
|
||||
it('sign in with no password throws error', async () => {
|
||||
|
||||
//click sign without entering a password
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton)
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error)
|
||||
// verify error has the correct message
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.signInWithoutPassword)
|
||||
|
||||
})
|
||||
|
||||
it('sign in with invalid password throws error', async () => {
|
||||
|
||||
// enter invalid password
|
||||
await Helper.addValueToTextField(Auth.enterPassword, textConstants.incorrectPassword)
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton)
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error)
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.invalidPasswordOnSignIn)
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
it('sign in with invalid password throws error', async () => {
|
||||
// enter invalid password
|
||||
await Helper.addValueToTextField(Auth.enterPassword, textConstants.incorrectPassword);
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton);
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error);
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.invalidPasswordOnSignIn);
|
||||
});
|
||||
});
|
||||
|
||||
describe('Wallet sign in functionality without creating password', () => {
|
||||
|
||||
it('sign in with invalid password and no saved wallet.json file throws error', async () => {
|
||||
|
||||
// delete existing saved wallet file
|
||||
deleteWallet
|
||||
//click through sign without entering a password
|
||||
await Helper.navigateAndClick(Auth.signInButton)
|
||||
await Helper.navigateAndClick(Auth.signInPassword)
|
||||
// enter invalid password
|
||||
await Helper.addValueToTextField(Auth.enterPassword,textConstants.incorrectPassword)
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton)
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error)
|
||||
// verify error has the correct message
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.failedToFindWalletFile)
|
||||
|
||||
})
|
||||
|
||||
})
|
||||
it('sign in with invalid password and no saved wallet.json file throws error', async () => {
|
||||
//click through sign without entering a password
|
||||
await Helper.navigateAndClick(Auth.signInButton);
|
||||
await Helper.navigateAndClick(Auth.signInPassword);
|
||||
// enter invalid password
|
||||
await Helper.addValueToTextField(Auth.enterPassword, textConstants.incorrectPassword);
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton);
|
||||
// wait for error
|
||||
await Helper.elementVisible(Auth.error);
|
||||
// verify error has the correct message
|
||||
await Helper.verifyStrictText(Auth.error, textConstants.failedToFindWalletFile);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,101 +1,72 @@
|
||||
import Auth from '../../pageobjects/authScreens'
|
||||
import Balance from '../../pageobjects/balanceScreen'
|
||||
const textConstants = require("../../../common/text-constants");
|
||||
const userData = require("../../../common/user-data.json");
|
||||
const deleteScript = require("../../../scripts/deletesavedwallet")
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
import Balance from '../../pageobjects/balanceScreen';
|
||||
const textConstants = require('../../../common/text-constants');
|
||||
const userData = require('../../../common/user-data.json');
|
||||
const deleteScript = require('../../../scripts/deletesavedwallet');
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
// TO-DO figure out how to not repeat steps but also start a fresh test on each run
|
||||
|
||||
describe.skip('Create a new account and verify it exists', () => {
|
||||
describe('Create a new account negative scenarios', () => {
|
||||
it('generate new mnemonic and verify mnemonic words', async () => {
|
||||
//create the new mnemoinc
|
||||
await Auth.newMnemonicCreation();
|
||||
});
|
||||
|
||||
it('generate new mnemonic and verify mnemonic words', async () => {
|
||||
it('click skip password', async () => {
|
||||
// click on skip password creation
|
||||
await Helper.navigateAndClick(Auth.nextToStep3);
|
||||
await Helper.navigateAndClick(Auth.skipPasswordAndSignInWithMnemonic);
|
||||
// can see mnemonic login page
|
||||
await Helper.elementVisible(Auth.mnemonicInput);
|
||||
await Helper.navigateAndClick(Auth.backToSignInOptions);
|
||||
});
|
||||
|
||||
// delete any existing saved-wallet.json
|
||||
deleteScript
|
||||
// click through create account flow
|
||||
await Helper.navigateAndClick(Auth.createAccount)
|
||||
await Helper.elementVisible(Auth.mnemonicPhrase)
|
||||
// save mnemonic phrase
|
||||
let mnemonic = await (await Auth.mnemonicPhrase).getText()
|
||||
let arrayMnemonic = mnemonic.split(" ")
|
||||
await Helper.navigateAndClick(Auth.copyMnemonic)
|
||||
await Helper.navigateAndClick(Auth.iSavedMnemonic)
|
||||
// verify the mnemonic words in the correct order
|
||||
let mnemonicWordTiles = await (await Auth.mnemonicWordTile)
|
||||
let wordTileIndex = await (await Auth.wordIndex)
|
||||
it('set up invalid password for new account', async () => {
|
||||
// enter invalid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password);
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.incorrectPassword);
|
||||
await Helper.navigateAndClick(Auth.confirmPassword);
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.incorrectPassword);
|
||||
// verify that the 'next' button is still disabled
|
||||
const nextButton = await Auth.nextStorePassword;
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
expect(isNextDisabled).toBe('true');
|
||||
|
||||
const wordsArray: any[] = []
|
||||
await browser.reloadSession();
|
||||
});
|
||||
});
|
||||
|
||||
for (const word of mnemonicWordTiles) {
|
||||
const wordText = await word.getText()
|
||||
const index = arrayMnemonic.indexOf(wordText)
|
||||
wordsArray.push({ word, index })
|
||||
}
|
||||
describe.skip('Create a new account and verify login', () => {
|
||||
it('generate new mnemonic and verify mnemonic words', async () => {
|
||||
await Auth.newMnemonicCreation();
|
||||
});
|
||||
|
||||
for (const index of wordTileIndex) {
|
||||
const indexValue = await index.getText()
|
||||
const match = wordsArray.find((word) => +word.index === +indexValue - 1)
|
||||
if (match) {
|
||||
await match.word.click()
|
||||
}
|
||||
}
|
||||
// ensure that once the task above is complete, the 'next' button is enabled
|
||||
const nextButton = await Auth.nextToStep3
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled')
|
||||
expect(isNextDisabled).toBe(null)
|
||||
it('set up valid password for new account', async () => {
|
||||
// enter a valid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password);
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.password);
|
||||
await browser.pause(3000);
|
||||
await Helper.navigateAndClick(Auth.confirmPassword);
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.password);
|
||||
await browser.pause(3000);
|
||||
// verify that the 'next' button is clickable
|
||||
const nextButton = await Auth.nextStorePassword;
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled');
|
||||
expect(isNextDisabled).toBe(null);
|
||||
});
|
||||
|
||||
})
|
||||
it('proceed to login with newly created password', async () => {
|
||||
// login with a password
|
||||
await Helper.navigateAndClick(Auth.nextStorePassword);
|
||||
|
||||
it('click skip password', async () => {
|
||||
await Helper.navigateAndClick(Auth.enterPassword);
|
||||
await Helper.addValueToTextField(Auth.enterPassword, textConstants.password);
|
||||
|
||||
// click on skip password creation
|
||||
await Helper.navigateAndClick(Auth.nextToStep3)
|
||||
await Helper.navigateAndClick(Auth.skipPasswordAndSignInWithMnemonic)
|
||||
// can see mnemonic login page
|
||||
await Helper.elementVisible(Auth.mnemonicInput)
|
||||
await Helper.navigateAndClick(Auth.backToSignInOptions)
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton);
|
||||
|
||||
})
|
||||
|
||||
it('set up invalid password for new account', async () => {
|
||||
|
||||
// enter invalid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password)
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.incorrectPassword)
|
||||
await Helper.navigateAndClick(Auth.confirmPassword)
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.incorrectPassword)
|
||||
// verify that the 'next' button is still disabled
|
||||
const nextButton = await Auth.nextStorePassword
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled')
|
||||
expect(isNextDisabled).toBe("true")
|
||||
|
||||
})
|
||||
|
||||
it('set up valid password for new account', async () => {
|
||||
|
||||
// enter a valid password in both fields
|
||||
await Helper.navigateAndClick(Auth.password)
|
||||
await Helper.addValueToTextField(Auth.password, textConstants.password)
|
||||
await Helper.navigateAndClick(Auth.confirmPassword)
|
||||
await Helper.addValueToTextField(Auth.confirmPassword, textConstants.password)
|
||||
// verify that the 'next' button is clickable
|
||||
const nextButton = await Auth.nextStorePassword
|
||||
const isNextDisabled = await nextButton.getAttribute('disabled')
|
||||
expect(isNextDisabled).toBe(null)
|
||||
|
||||
})
|
||||
|
||||
it('proceed to login with newly created password', async () => {
|
||||
|
||||
// login with a password
|
||||
await Helper.navigateAndClick(Auth.nextStorePassword)
|
||||
await Helper.navigateAndClick(Auth.enterPassword)
|
||||
await Helper.addValueToTextField(Auth.enterPassword, textConstants.password)
|
||||
await Helper.navigateAndClick(Auth.signInPasswordButton)
|
||||
// TO-DO for some reason this is failing due to failed to decrypt the wallet etc error
|
||||
await Helper.elementVisible(Balance.balance)
|
||||
//new accounts will always default to mainnet, so 0 balance
|
||||
await Helper.verifyStrictText(Balance.nymBalance, textConstants.noNym)
|
||||
|
||||
})
|
||||
})
|
||||
await Helper.elementVisible(Balance.balance);
|
||||
//new accounts will always default to mainnet, so 0 balance
|
||||
await Helper.verifyStrictText(Balance.nymBalance, textConstants.noNym);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"types": [
|
||||
"node",
|
||||
"webdriverio/async",
|
||||
"@wdio/mocha-framework",
|
||||
"expect-webdriverio"
|
||||
],
|
||||
"target": "ES5"
|
||||
}
|
||||
}
|
||||
"compilerOptions": {
|
||||
"moduleResolution": "node",
|
||||
"types": ["node", "webdriverio/async", "@wdio/mocha-framework", "expect-webdriverio"],
|
||||
"target": "ES5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,14 @@
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const { spawn, spawnSync } = require('child_process')
|
||||
//insert path to binary
|
||||
const nym_path = '../target/debug/nym-wallet'
|
||||
const os = require('os');
|
||||
const path = require('path');
|
||||
const deleteSavedWallet = require('../scripts/deletesavedwallet');
|
||||
const { spawn, spawnSync } = require('child_process');
|
||||
|
||||
let tauriDriver: any
|
||||
//insert path to binary
|
||||
const nym_path = '../target/debug/nym-wallet';
|
||||
// this one below will run the prod version aka without QA netwo0rk option
|
||||
// const nym_path = '../target/release/nym-wallet'
|
||||
|
||||
let tauriDriver: any;
|
||||
|
||||
exports.config = {
|
||||
autoCompileOpts: {
|
||||
@@ -17,26 +21,15 @@ exports.config = {
|
||||
specs: ['./test/specs/**/*.ts'],
|
||||
|
||||
suites: {
|
||||
// signup: [
|
||||
// './test/specs/signup/*.ts',
|
||||
// ],
|
||||
login: [
|
||||
'./test/specs/login/*.ts',
|
||||
],
|
||||
// balance: [
|
||||
// './test/specs/balance/*.ts',
|
||||
// ],
|
||||
// nav: [
|
||||
// './test/specs/general/*.ts',
|
||||
// ],
|
||||
// send: [
|
||||
// './test/specs/send/*.ts',
|
||||
// ],
|
||||
// delegation: [
|
||||
// './test/specs/delegation/*.ts',
|
||||
// ],
|
||||
signup: ['./test/specs/signup/*.ts'],
|
||||
login: ['./test/specs/login/*.ts'],
|
||||
balance: ['./test/specs/balance/*.ts'],
|
||||
general: ['./test/specs/general/*.ts'],
|
||||
send: ['./test/specs/bond/*.ts'],
|
||||
delegation: ['./test/specs/delegation/*.ts'],
|
||||
helper: ['./test/specs/helpers/*.ts'],
|
||||
},
|
||||
// Patterns to exclude.
|
||||
|
||||
exclude: [
|
||||
// 'path/to/excluded/files'
|
||||
],
|
||||
@@ -49,55 +42,58 @@ exports.config = {
|
||||
},
|
||||
},
|
||||
],
|
||||
//
|
||||
|
||||
// ===================
|
||||
// Test Configurations
|
||||
// ===================
|
||||
// Define all options that are relevant for the WebdriverIO instance here
|
||||
//
|
||||
|
||||
// Level of logging verbosity: trace | debug | info | warn | error | silent
|
||||
logLevel: 'info',
|
||||
logLevel: 'error',
|
||||
bail: 0,
|
||||
framework: 'mocha',
|
||||
// reporters: ['spec'],
|
||||
// reporters: ['spec'],
|
||||
mochaOpts: {
|
||||
ui: 'bdd',
|
||||
timeout: 60000,
|
||||
},
|
||||
// ===================
|
||||
// Test Reporters
|
||||
// ===================
|
||||
// reporters: [
|
||||
// [
|
||||
// "allure",
|
||||
// {
|
||||
// outputDir: "allure-results",
|
||||
// disableWebdriverStepsReporting: true,
|
||||
// disableWebdriverScreenshotsReporting: true,
|
||||
// },
|
||||
// ],
|
||||
// ],
|
||||
|
||||
// this is documentented in the readme - you will need to build the project first
|
||||
// ensure the rust project is built since we expect this binary to exist for the webdriver sessions
|
||||
// Reporting tool and settings
|
||||
|
||||
// ensure we are running `tauri-driver` before the session starts so that we can proxy the webdriver requests
|
||||
reporters: [
|
||||
[
|
||||
'allure',
|
||||
{
|
||||
outputDir: 'allure-results',
|
||||
disableWebdriverStepsReporting: true,
|
||||
disableWebdriverScreenshotsReporting: true,
|
||||
// useCucumberStepReporter: true,
|
||||
// disableMochaHooks: true,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
// Things to run before/after each test session
|
||||
|
||||
beforeSession: () => {
|
||||
|
||||
let scriptpath = process.cwd() + "/scripts/killprocess.sh";
|
||||
onPrepare: () => {
|
||||
let scriptpath = process.cwd() + '/scripts/killprocess.sh';
|
||||
spawn('bash', [scriptpath]);
|
||||
|
||||
(tauriDriver = spawn(
|
||||
path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'),
|
||||
[],
|
||||
{ stdio: [null, process.stdout, process.stderr] }
|
||||
))
|
||||
|
||||
},
|
||||
|
||||
beforeSession: () => {
|
||||
tauriDriver = spawn(path.resolve(os.homedir(), '.cargo', 'bin', 'tauri-driver'), [], {
|
||||
stdio: [null, process.stdout, process.stderr],
|
||||
});
|
||||
|
||||
//before the session - if any issues arise with wallet data, let's remove existing saved files
|
||||
deleteSavedWallet;
|
||||
},
|
||||
|
||||
afterEach: function (test) {
|
||||
if (test.error !== undefined) {
|
||||
browser.takeScreenshot();
|
||||
}
|
||||
},
|
||||
|
||||
// clean up the `tauri-driver` process we spawned at the start of the session
|
||||
afterSession: () => tauriDriver.kill(),
|
||||
}
|
||||
};
|
||||
|
||||
@@ -313,6 +313,11 @@
|
||||
"@types/node" "*"
|
||||
"@types/responselike" "*"
|
||||
|
||||
"@types/diff@^5.0.0":
|
||||
version "5.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/diff/-/diff-5.0.2.tgz#dd565e0086ccf8bc6522c6ebafd8a3125c91c12b"
|
||||
integrity sha512-uw8eYMIReOwstQ0QKF0sICefSy8cNO/v7gOTiIy9SbwuHyEecJUm7qlgueOO5S1udZ5I/irVydHVwMchgzbKTg==
|
||||
|
||||
"@types/ejs@^3.0.5":
|
||||
version "3.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/ejs/-/ejs-3.1.1.tgz#29c539826376a65e7f7d672d51301f37ed718f6d"
|
||||
@@ -419,6 +424,11 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-13.13.52.tgz#03c13be70b9031baaed79481c0c0cfb0045e53f7"
|
||||
integrity sha512-s3nugnZumCC//n4moGGe6tkNMyYEdaDBitVjwPxXmR5lnMG5dHePinH2EdxkG3Rh1ghFHHixAG4NJhpJW1rthQ==
|
||||
|
||||
"@types/object-inspect@^1.8.0":
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/object-inspect/-/object-inspect-1.8.1.tgz#7c08197ad05cc0e513f529b1f3919cc99f720e1f"
|
||||
integrity sha512-0JTdf3CGV0oWzE6Wa40Ayv2e2GhpP3pEJMcrlM74vBSJPuuNkVwfDnl0SZxyFCXETcB4oKA/MpTVfuYSMOelBg==
|
||||
|
||||
"@types/recursive-readdir@^2.2.0":
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/recursive-readdir/-/recursive-readdir-2.2.1.tgz#330f5ec0b73e8aeaf267a6e056884e393f3543a3"
|
||||
@@ -445,6 +455,11 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/supports-color@^8.1.0":
|
||||
version "8.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/supports-color/-/supports-color-8.1.1.tgz#1b44b1b096479273adf7f93c75fc4ecc40a61ee4"
|
||||
integrity sha512-dPWnWsf+kzIG140B8z2w3fr5D03TLWbOAFQl45xUpI3vcizeXriNR5VYkWZ+WTMsUHqZ9Xlt3hrxGNANFyNQfw==
|
||||
|
||||
"@types/through@*":
|
||||
version "0.0.30"
|
||||
resolved "https://registry.yarnpkg.com/@types/through/-/through-0.0.30.tgz#e0e42ce77e897bd6aead6f6ea62aeb135b8a3895"
|
||||
@@ -452,6 +467,11 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/tmp@^0.2.0":
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.2.3.tgz#908bfb113419fd6a42273674c00994d40902c165"
|
||||
integrity sha512-dDZH/tXzwjutnuk4UacGgFRwV+JSLaXL1ikvidfJprkb7L9Nx1njcRHHmi3Dsvt7pgqqTEeucQuOrWHPFgzVHA==
|
||||
|
||||
"@types/ua-parser-js@^0.7.33":
|
||||
version "0.7.36"
|
||||
resolved "https://registry.yarnpkg.com/@types/ua-parser-js/-/ua-parser-js-0.7.36.tgz#9bd0b47f26b5a3151be21ba4ce9f5fa457c5f190"
|
||||
@@ -481,6 +501,18 @@
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@wdio/allure-reporter@^7.0.0":
|
||||
version "7.25.4"
|
||||
resolved "https://registry.yarnpkg.com/@wdio/allure-reporter/-/allure-reporter-7.25.4.tgz#8ab1fa2d13da56771a192dec456a14426da7d989"
|
||||
integrity sha512-Xt2bIc64E0PNwN2PHXL4uLuWosJRqjK52HdMuI7fgXAsvvhcRizv+tDUOrePCZxonveVUJlRKQGX+AJIqrxmng==
|
||||
dependencies:
|
||||
"@types/node" "^18.0.0"
|
||||
"@wdio/reporter" "7.25.4"
|
||||
"@wdio/types" "7.25.4"
|
||||
allure-js-commons "^1.3.2"
|
||||
csv-stringify "^6.0.4"
|
||||
strip-ansi "^6.0.0"
|
||||
|
||||
"@wdio/cli@^7.25.4":
|
||||
version "7.25.4"
|
||||
resolved "https://registry.yarnpkg.com/@wdio/cli/-/cli-7.25.4.tgz#3bb35c6875eb5a10d408a43b2e0f5df65b83287e"
|
||||
@@ -574,6 +606,22 @@
|
||||
dependencies:
|
||||
"@wdio/utils" "7.25.4"
|
||||
|
||||
"@wdio/reporter@7.25.4":
|
||||
version "7.25.4"
|
||||
resolved "https://registry.yarnpkg.com/@wdio/reporter/-/reporter-7.25.4.tgz#b6a69652dd0c4ec131255000af128eac403a18b9"
|
||||
integrity sha512-M37qzEmF5qNffyZmRQGjDlrXqWW21EFvgW8wsv1b/NtfpZc0c0MoRpeh6BnvX1KcE4nCXfjXgSJPOqV4ZCzUEQ==
|
||||
dependencies:
|
||||
"@types/diff" "^5.0.0"
|
||||
"@types/node" "^18.0.0"
|
||||
"@types/object-inspect" "^1.8.0"
|
||||
"@types/supports-color" "^8.1.0"
|
||||
"@types/tmp" "^0.2.0"
|
||||
"@wdio/types" "7.25.4"
|
||||
diff "^5.0.0"
|
||||
fs-extra "^10.0.0"
|
||||
object-inspect "^1.10.3"
|
||||
supports-color "8.1.1"
|
||||
|
||||
"@wdio/runner@7.25.4":
|
||||
version "7.25.4"
|
||||
resolved "https://registry.yarnpkg.com/@wdio/runner/-/runner-7.25.4.tgz#9bf4fb43bc0c7f3f32a90f53d821962d4d137f63"
|
||||
@@ -612,6 +660,18 @@ agent-base@6:
|
||||
dependencies:
|
||||
debug "4"
|
||||
|
||||
allure-js-commons@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/allure-js-commons/-/allure-js-commons-1.3.2.tgz#e1cf0466e36695bb3ced1228f6570eac6c2e9eda"
|
||||
integrity sha512-FTmoqP36ZjHFT4iLdYamyCFhyj1jqD6BIdiZ5pBlyafDJrFRV76XIXNxwRqbHpSw40o1vHzYi4vGpmREnhnHVw==
|
||||
dependencies:
|
||||
file-type "^7.7.1"
|
||||
fs-extra "^6.0.1"
|
||||
js2xmlparser "^3.0.0"
|
||||
mime "^2.3.1"
|
||||
object-assign "^4.1.1"
|
||||
uuid "^3.0.0"
|
||||
|
||||
ansi-colors@4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348"
|
||||
@@ -1103,6 +1163,11 @@ css-value@^0.0.1:
|
||||
resolved "https://registry.yarnpkg.com/css-value/-/css-value-0.0.1.tgz#5efd6c2eea5ea1fd6b6ac57ec0427b18452424ea"
|
||||
integrity sha512-FUV3xaJ63buRLgHrLQVlVgQnQdR4yqdLGaDu7g8CQcWjInDfM9plBTPI9FRfpahju1UBSaMckeb2/46ApS/V1Q==
|
||||
|
||||
csv-stringify@^6.0.4:
|
||||
version "6.2.1"
|
||||
resolved "https://registry.yarnpkg.com/csv-stringify/-/csv-stringify-6.2.1.tgz#de4f9940abd8c9780eda41130c737a18d24e5986"
|
||||
integrity sha512-+DT/YEgqRy82aMPMA7yUUpFJPx9X8iZy7UhfyTE2bHmFJcjDiz1j29wzTFkYTtuNVceNgz8efsjICch+O1WcLQ==
|
||||
|
||||
debug@4, debug@4.3.4, debug@^4.1.1:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
@@ -1214,6 +1279,11 @@ diff@5.0.0:
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b"
|
||||
integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==
|
||||
|
||||
diff@^5.0.0:
|
||||
version "5.1.0"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-5.1.0.tgz#bc52d298c5ea8df9194800224445ed43ffc87e40"
|
||||
integrity sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==
|
||||
|
||||
edge-paths@^2.1.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/edge-paths/-/edge-paths-2.2.1.tgz#d2d91513225c06514aeac9843bfce546abbf4391"
|
||||
@@ -1358,6 +1428,11 @@ figures@^3.0.0:
|
||||
dependencies:
|
||||
escape-string-regexp "^1.0.5"
|
||||
|
||||
file-type@^7.7.1:
|
||||
version "7.7.1"
|
||||
resolved "https://registry.yarnpkg.com/file-type/-/file-type-7.7.1.tgz#91c2f5edb8ce70688b9b68a90d931bbb6cb21f65"
|
||||
integrity sha512-bTrKkzzZI6wH+NXhyD3SOXtb2zXTw2SbwI2RxUlRcXVsnN7jNL5hJzVQLYv7FOQhxFkK4XWdAflEaWFpaLLWpQ==
|
||||
|
||||
filelist@^1.0.1:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/filelist/-/filelist-1.0.4.tgz#f78978a1e944775ff9e62e744424f215e58352b5"
|
||||
@@ -1427,6 +1502,15 @@ fs-extra@^10.0.0:
|
||||
jsonfile "^6.0.1"
|
||||
universalify "^2.0.0"
|
||||
|
||||
fs-extra@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-6.0.1.tgz#8abc128f7946e310135ddc93b98bddb410e7a34b"
|
||||
integrity sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
jsonfile "^4.0.0"
|
||||
universalify "^0.1.0"
|
||||
|
||||
fs.realpath@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||
@@ -2005,11 +2089,25 @@ js-yaml@4.1.0:
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
|
||||
js2xmlparser@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/js2xmlparser/-/js2xmlparser-3.0.0.tgz#3fb60eaa089c5440f9319f51760ccd07e2499733"
|
||||
integrity sha512-CSOkdn0/GhRFwxnipmhXfqJ+FG6+wkWBi46kKSsPx6+j65176ZiQcrCYpg6K8x3iLbO4k3zScBnZ7I/L80dAtw==
|
||||
dependencies:
|
||||
xmlcreate "^1.0.1"
|
||||
|
||||
json-buffer@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.1.tgz#9338802a30d3b6605fbe0613e094008ca8c05a13"
|
||||
integrity sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==
|
||||
|
||||
jsonfile@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||
integrity sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==
|
||||
optionalDependencies:
|
||||
graceful-fs "^4.1.6"
|
||||
|
||||
jsonfile@^6.0.1:
|
||||
version "6.1.0"
|
||||
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
|
||||
@@ -2206,6 +2304,11 @@ micromatch@^4.0.4:
|
||||
braces "^3.0.2"
|
||||
picomatch "^2.3.1"
|
||||
|
||||
mime@^2.3.1:
|
||||
version "2.6.0"
|
||||
resolved "https://registry.yarnpkg.com/mime/-/mime-2.6.0.tgz#a2a682a95cd4d0cb1d6257e28f83da7e35800367"
|
||||
integrity sha512-USPkMeET31rOMiarsBNIHZKLGgvKc/LrjofAnBlOttf5ajRvqiRA8QsenbcooctK6d6Ts6aqZXBA+XbkKthiQg==
|
||||
|
||||
mimic-fn@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b"
|
||||
@@ -2353,7 +2456,12 @@ normalize-url@^6.0.1:
|
||||
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-6.1.0.tgz#40d0885b535deffe3f3147bec877d05fe4c5668a"
|
||||
integrity sha512-DlL+XwOy3NxAQ8xuC0okPgK46iuVNAK01YN7RueYBqqFeGsBjV9XmCAzAdgt+667bCl5kPh9EqKKDwnaPG1I7A==
|
||||
|
||||
object-inspect@^1.9.0:
|
||||
object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
|
||||
object-inspect@^1.10.3, object-inspect@^1.9.0:
|
||||
version "1.12.2"
|
||||
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.2.tgz#c0641f26394532f28ab8d796ab954e43c009a8ea"
|
||||
integrity sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==
|
||||
@@ -3091,6 +3199,11 @@ unbzip2-stream@1.4.3:
|
||||
buffer "^5.2.1"
|
||||
through "^2.3.8"
|
||||
|
||||
universalify@^0.1.0:
|
||||
version "0.1.2"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||
|
||||
universalify@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
|
||||
@@ -3101,6 +3214,11 @@ util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||
integrity sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==
|
||||
|
||||
uuid@^3.0.0:
|
||||
version "3.4.0"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
|
||||
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==
|
||||
|
||||
uuid@^9.0.0:
|
||||
version "9.0.0"
|
||||
resolved "https://registry.yarnpkg.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
|
||||
@@ -3258,6 +3376,11 @@ ws@^7:
|
||||
resolved "https://registry.yarnpkg.com/ws/-/ws-7.5.9.tgz#54fa7db29f4c7cec68b1ddd3a89de099942bb591"
|
||||
integrity sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==
|
||||
|
||||
xmlcreate@^1.0.1:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/xmlcreate/-/xmlcreate-1.0.2.tgz#fa6bf762a60a413fb3dd8f4b03c5b269238d308f"
|
||||
integrity sha512-Mbe56Dvj00onbnSo9J0qj/XlY5bfN9KidsOnpd5tRCsR3ekB3hyyNU9fGrTdqNT5ZNvv4BsA2TcQlignsZyVcw==
|
||||
|
||||
xstream@^11.14.0:
|
||||
version "11.14.0"
|
||||
resolved "https://registry.yarnpkg.com/xstream/-/xstream-11.14.0.tgz#2c071d26b18310523b6877e86b4e54df068a9ae5"
|
||||
|
||||
Reference in New Issue
Block a user