put in placeholder for things
This commit is contained in:
@@ -23,8 +23,9 @@ class Helpers {
|
||||
// click the mnemonic words by index position
|
||||
|
||||
// TO-DO find the best approach
|
||||
mnemonicWordTileIndex = async (browser: WebdriverIO.Browser) => {
|
||||
mnemonicWordTileIndex = async () => {
|
||||
let mnemonic = await browser.execute(() => {
|
||||
// @ts-ignore: Object is possibly 'null'.
|
||||
return document.getElementById('mnemonicPhrase').innerHTML;
|
||||
});
|
||||
|
||||
@@ -33,8 +34,8 @@ class Helpers {
|
||||
await this.navigateAndClick(Auth.copyMnemonic);
|
||||
await this.navigateAndClick(Auth.iSavedMnemonic);
|
||||
// verify the mnemonic words in the correct order
|
||||
let mnemonicWordTiles = await await Auth.mnemonicWordTile;
|
||||
let wordTileIndex = await await Auth.wordIndex;
|
||||
let mnemonicWordTiles = await Auth.mnemonicWordTile;
|
||||
let wordTileIndex = await Auth.wordIndex;
|
||||
|
||||
const wordsArray: any[] = [];
|
||||
|
||||
@@ -52,6 +53,7 @@ class Helpers {
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -119,4 +121,4 @@ class Helpers {
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = new Helpers();
|
||||
export default new Helpers();
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
"mnemonic": ""
|
||||
"mnemonic": "Y2FsbCBub2JsZSBhdWN0aW9uIHNhdGlzZnkgZHVzdCBzdWRkZW4gbWF0aCBsb2FuIHVzdWFsIHBpenphIG95c3RlciBkd2FyZiB2ZXNzZWwgZm9vdCBuZXh0IGFnZSBsaW5rIHN0b29sIGZsdWlkIGxpemFyZCBzaHkgaGVuIHNlY3VyaXR5IHllbGxvdw=="
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
"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,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,4 +1,6 @@
|
||||
import Balance from '../pageobjects/balanceScreen';
|
||||
import Helper from '../../common/helper';
|
||||
const deleteScript = require('../../scripts/deletesavedwallet');
|
||||
|
||||
class Auth {
|
||||
//Welcome landing page
|
||||
@@ -137,11 +139,24 @@ class Auth {
|
||||
await (await this.signInMnemonic).click();
|
||||
await (await this.mnemonicInput).waitForDisplayed();
|
||||
await (await this.revealMnemonic).click();
|
||||
console.log('--------------- ' + mnemonic);
|
||||
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();
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
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');
|
||||
|
||||
describe('Balance screen displays correctly', () => {
|
||||
|
||||
@@ -1,31 +1,11 @@
|
||||
import Auth from '../../pageobjects/authScreens';
|
||||
const deleteScript = require('../../../scripts/deletesavedwallet');
|
||||
const Helper = require('../../../common/helper');
|
||||
|
||||
export function newMnemonicLogin() {
|
||||
// TO-DO find the best approach
|
||||
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);
|
||||
|
||||
describe('Create a new account and verify login', () => {
|
||||
it('generate new mnemonic and verify mnemonic words', async () => {
|
||||
// delete an existing saved-wallet
|
||||
deleteScript;
|
||||
// click through create account flow
|
||||
console.log('--------------------');
|
||||
console.log('step1');
|
||||
await Helper.navigateAndClick(Auth.createAccount);
|
||||
await browser.pause(1500);
|
||||
console.log('--------------------');
|
||||
console.log('step2');
|
||||
// save and verify mnemonic
|
||||
const mnemonic = await browser.execute(() => {
|
||||
return document.getElementById('mnemonicPhrase').innerHTML;
|
||||
});
|
||||
await Helper.mnemonicWordTileIndex(mnemonic);
|
||||
// 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);
|
||||
await Helper.navigateAndClick(Auth.nextToStep3);
|
||||
});
|
||||
await Auth.newMnemonicCreation();
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,6 +26,7 @@ exports.config = {
|
||||
general: ['./test/specs/general/*.ts'],
|
||||
send: ['./test/specs/bond/*.ts'],
|
||||
delegation: ['./test/specs/delegation/*.ts'],
|
||||
helper: ['./test/specs/helpers/*.ts'],
|
||||
},
|
||||
|
||||
exclude: [
|
||||
|
||||
Reference in New Issue
Block a user