Skip to content

Commit

Permalink
1.16.0 (#842)
Browse files Browse the repository at this point in the history
* taquito version bump (#829)

* 15.5.5

* TW-391 Changed Skip Ad button on advertisement (#834)

* TW-320: Manifest v3 JSON (#807)

* TW-317: Abandon XMLHttpRequest in BG. Applied axios fetch adapter.

* TW-317: Abandon XMLHttpRequest in BG. Fix BG test

* TW-312: Eliminate 'window' reliance in BG script. Resolving 'regenerator-runtime' package version.

* TW-312: Eliminate 'window' in BG. Refactored 'is-lock-up' setting

* TW-312: Eliminate 'window' in BG. Refactored 'lock-up' feature for MV3

* TW-312: Eliminate 'window' in BG. Refactored 'locale' storing

* TW-312: Eliminate 'window' in BG. Refactored 'Vault.spawn'

* TW-312: Eliminate 'window' in BG. Refactored 'vault.ts>createLedgerSigner()'

* TW-312: Eliminate 'window' in BG. Eliminated LedgerSigner creation to foreground

* Merge branch 'development' into TW-312-eliminate-window-in-bg

* TW-312: Eliminate 'window' in BG. Refactor

* TW-320: Manifest v3 JSON. Edited manifest.json

* TW-312: Eliminate 'window' in BG. Fix for lost 'no-use-before-define' rule follow

* TW-312: Eliminate 'window' in BG. Fix: removed Intercom server instance from FG

* TW-312: Eliminate 'window' in BG. + IDs to TempleLedgerSignerProxy instances

* TW-312: Eliminate 'window' in BG. Refactor

* TW-317: Abandon XMLHttpRequest in BG. Merged from 'development' branch

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for ledger-bridge's <iframe> interraction

* WIP: TW-312: Eliminate 'window' in BG. Ledger rework. Ledger bridge written locally

* TW-312: Eliminate 'window' in BG. Ledger rework. Ledger bridge written locally

* WIP: TW-317: Abandon XMLHttpRequest in BG. Updated '@taquito/*' to v14.1.0

* TW-317: Abandon XMLHttpRequest in BG. ++ '@taquito/*'

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix. LedgerHQ updated

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix. LedgerHQ updated

* WIP: TW-320: Manifest v3 JSON. WebPack rework

* WIP: TW-320: Manifest v3 JSON. WebPack rework

* TW-320: Manifest v3 JSON. WebPack rework. Linted

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. WebPack rework. Clean-up fix.

* TW-320: Manifest v3 JSON. WebPack rework. TypeScript

* TW-320: Manifest v3 JSON. WebPack rework. package.json:version > manifest.json:version

* TW-319: Manifest v3. Keep v2 for Firefox

* TW-312: Eliminate 'window' in BG. Ledger rework. Dynamic import for ledger-bridge iframe module

* WIP: TW-310: Manifest v3. Fix disconnecting Intercom port

* TW-312: Eliminate 'window' in BG. Ledger rework. Refactor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for 'ledger-live in popup window' case

* TW-312: Eliminate 'window' in BG. Ledger rework. Refactor

* TW-312: Eliminate 'window' in BG. Removed console.log

* TW-320: Manifest v3 JSON. WebPack rework. + Definition for 'process.env.MANIFEST_VERSION'

* TW-320: Manifest v3 JSON. WebPack rework. Fix for BG script path in MV2

* TW-320: Manifest v3 JSON. WebPack rework. Fix for BG script chunks

* TW-310: Manifest v3. Fix disconnecting Intercom port

* WIP: TW-310: Manifest v3. Prolong SW lifetime

* TW-310: Manifest v3. Prolong SW lifetime. + scripts/keepBackgroundWorkerAlive.js

* TW-310: Manifest v3. Prolong SW lifetime. Refactor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for WebAuthn transport on MV2

* TW-320: Manifest v3 JSON. WebPack rework. + 'safari' vendor

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for Firefox multiple tabs on WebAuthn

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for duplicate 'ledgerlive://bridge' tabs opening

* Merge branch 'TW-312-eliminate-window-in-bg' into TW-320-manifest-v3

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for recurring Ledger Live bridge open fail

* TW-312: Eliminate 'window' in BG. Ledger rework. Fix for recurring Ledger Live bridge open fail

* TW-312: Eliminate 'window' in BG. Ledger rework. ++ ledger-live.utils

* TW-320: Manifest v3 JSON. Refactor

* TW-320: Manifest v3 JSON. Fix dev live reload

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. WebPack rework. Fix dev pages reloader

* TW-320: Manifest v3 JSON. WebPack rework. + Custom dev pages reloader

* TW-320: Manifest v3 JSON. WebPack rework. Exports in ES6

* TW-320: Manifest v3 JSON. WebPack rework. Refactor

* TW-320: Manifest v3 JSON. Keeping BG worker alive from extension pages too

* TW-320: Manifest v3 JSON. BG, Vault. + Saving session (password hash)

* TW-320: Manifest v3 JSON. Fix for 'lock-enabled' feature

* TW-320: Manifest v3 JSON. Refactor lib/temple/back/vault (#827)

* TW-320: Manifest v3 JSON. Not keeping BG worker alive (#831)

* TW-320: Manifest v3 JSON. Refactor

* TW-320: Manifest v3 JSON. + Reset of 'browser.sstorage.session'

* TW-320: Manifest v3 JSON. Fix for WASM file loading in BG worker

* TW-320: Manifest v3 JSON. Refactor

* TW-427: Data URI for assets' icons (#839)

* TW-427: Data URI for assets' icons. Support at add asset

* TW-427: Data URI for assets' icons. Support at displaying icons

* TW-427: Data URI for assets' icons. + Fix for decimals display in AssetInfo component

* TW-392 Improved search assets (#835)

* TW-392 Improved search assets

* TW-392 Deleted console.logs

* TW-392 Deleted console.logs

* TW-392 Filtered assets harder

* TW-382: Utorg buy. Rate & min-max correction (#823)

* TW-382: Utorg buy. Rate & min-max correction

* TW-382: Utorg buy. Rate & min-max correction. Made Currency.network optional

* TW-382: Utorg buy. Rate & min-max correction. + 'app/templates/TopUpInput'

* TW-382: Utorg buy. Rate & min-max correction. Rate loaded for no less then minAmount

* TW-382: Utorg buy. Rate & min-max correction. Fix Alice-Bob top-up rate value

* TW-382: Utorg buy. Rate & min-max correction. Refactor

* TW406+407: [e2e] Setup pupeeteer + 'Import existing wallet' test (#822)

* basicTest+pupeeteer

* link test id fixed

* duplicate page fix

* envs setup + import existing wallet test

* envs setup + import existing wallet test

* Merge branch 'development' into e2e-setup

* [e2e] Setup. Refactor. '/extension-e2e' -> '/e2e' (#832)

* [e2e] Setup. Refactor. Fix for secrets setup

* TW406+407: [e2e] Setup. + Job to pipeline (#838)

* [e2e] Setup. + Job to pipeline

* [e2e] Setup. Pipeline. Run with Xvfb

* [e2e] Setup. Pipeline. Run with Xvfb. Secrets mock

* [e2e] Setup. Pipeline. Run with 'mujo-code/puppeteer-headful'

* [e2e] Setup. Pipeline. Gave up 'mujo-code/puppeteer-headful'

* [e2e] Setup. Pipeline. Secrets mocks clean-up

* TW-406: [e2e] Setup. GitHub workflow. Fix unit tests

* TW-406: [e2e] Setup. Throwing on missing secrets

* TestIDProps is extended

Co-authored-by: Andrii Ivaniv <[email protected]>
Co-authored-by: alex-seleznov <[email protected]>
Co-authored-by: Alex <[email protected]>

* TW-438: Issue #774. Confirm window not showing in dApps (#840)

* TW-438: Issue #774. Confirm window not showing in dApps

* TW-438: Issue #774. Confirm window not showing in dApps. Refactor

* 1.16.0

* TW-439: Fix Plenty images (#841)

* TW-439: Fix Plenty images. Trying all sizes now

* TW-439: Fix Plenty images. Fix icons in 'select asset' field on 'Send page'

Co-authored-by: Dmytro Herko <[email protected]>
Co-authored-by: Alex <[email protected]>
Co-authored-by: Vlad <[email protected]>
Co-authored-by: alex-seleznov <[email protected]>
  • Loading branch information
5 people authored Jan 9, 2023
1 parent 90d1255 commit 553b12b
Show file tree
Hide file tree
Showing 148 changed files with 4,851 additions and 2,511 deletions.
7 changes: 3 additions & 4 deletions .env
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TEMPLE_WALLET_LEDGER_BRIDGE_URL = https://templewallet.com/ledger-bridge-v2.0.1
TEMPLE_WALLET_LOGO_URL = https://templewallet.com/logo.png
TEMPLE_WALLET_SEGMENT_WRITE_KEY = N1pFDJgp6ZJ6s5zfTM0cDhUWWhnE1TkS
TEMPLE_WALLET_EXOLIX_API_KEY =
TEMPLE_WALLET_EVERSTAKE_API_KEY =
TEMPLE_WALLET_EVERSTAKE_LINK_ID =
TEMPLE_WALLET_UTORG_SID =
TEMPLE_WALLET_EVERSTAKE_API_KEY =
TEMPLE_WALLET_EVERSTAKE_LINK_ID =
TEMPLE_WALLET_UTORG_SID =
13 changes: 11 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
{
"extends": ["react-app", "plugin:import/errors", "plugin:import/warnings", "plugin:import/typescript"],
"extends": [
"react-app",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript"
],
"plugins": ["import", "prettier"],
"parser": "@typescript-eslint/parser",
"settings": {
"import/resolver": {
"typescript": {}
"typescript": {},
"node": {
"extensions": [".d.ts"]
}
}
},
"rules": {
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/code-quality-check/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Code quality check
description: Installs dependencies and checks if ts, lint, unit tests
description: Installs dependencies and checks TS, linting, dead code
runs:
using: 'composite'
steps:
Expand All @@ -18,6 +18,6 @@ runs:
run: yarn lint
shell: bash

- name: Run Unit tests
- name: Perform unit tests
run: yarn test:coverage
shell: bash
11 changes: 9 additions & 2 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ env:

jobs:
pull-request-check:
name: Checks if ts, lint, unit tests & build works
name: Checks if ts, lint, tests & build work
runs-on: ubuntu-latest
environment: production
steps:
Expand All @@ -39,12 +39,19 @@ jobs:
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies and code quality
- name: Install dependencies and code quality check
uses: ./.github/workflows/code-quality-check

- name: Create Chrome build
run: yarn build:chrome

- name: Perform end-to-end tests
uses: ./.github/workflows/e2e
with:
DEFAULT_SEED_PHRASE: ${{ secrets.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD: ${{ secrets.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/e2e/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: End-to-end tests

description: Prepares and runs e2e tests

inputs:
DEFAULT_SEED_PHRASE:
required: true
DEFAULT_PASSWORD:
required: true
DEFAULT_HD_ACCOUNT_PRIVATE_KEY:
required: true

runs:
using: 'composite'
steps:
- working-directory: ./e2e
shell: bash
run: yarn install

- name: Secrets setup
working-directory: ./e2e
shell: bash
run: |
cat << EOF > .env
DEFAULT_SEED_PHRASE=${{ inputs.DEFAULT_SEED_PHRASE }}
DEFAULT_PASSWORD=${{ inputs.DEFAULT_PASSWORD }}
DEFAULT_HD_ACCOUNT_PRIVATE_KEY=${{ inputs.DEFAULT_HD_ACCOUNT_PRIVATE_KEY }}
EOF
- name: Run tests
working-directory: ./e2e
shell: bash
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: 'true'
CI: 'true'
run: |
export DISPLAY=:99
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional
yarn test
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
node_modules/
/.pnp
.pnp.js

Expand All @@ -12,7 +12,8 @@
/dist

# Env
.env.*
.env*
!.env.dist

# misc
.DS_Store
Expand Down
3 changes: 3 additions & 0 deletions e2e/.env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
DEFAULT_SEED_PHRASE=
DEFAULT_PASSWORD=
DEFAULT_HD_ACCOUNT_PRIVATE_KEY=
7 changes: 7 additions & 0 deletions e2e/cucumber.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"default": {
"paths": ["src/features/**/*.feature"],
"require": ["src/**/*.ts"],
"requireModule": ["ts-node/register"]
}
}
18 changes: 18 additions & 0 deletions e2e/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "temple-wallet-extension-e2e",
"version": "1.0.0",
"private": true,
"license": "MIT",
"scripts": {
"start": "./node_modules/.bin/cucumber-js",
"start:dev": "yarn start --tags @dev",
"test": "yarn start --exit",
"ts": "tsc --pretty"
},
"dependencies": {
"@cucumber/cucumber": "^8.7.0",
"puppeteer": "^19.4.0",
"ts-node": "^10.9.1",
"dotenv": "^16.0.3"
}
}
18 changes: 18 additions & 0 deletions e2e/src/classes/browser-context.class.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { Browser, Page } from 'puppeteer';

import { getEnv } from '../utils/env.utils';

const defaultSeedPhrase = getEnv('DEFAULT_SEED_PHRASE');
const defaultPassword = getEnv('DEFAULT_PASSWORD');
const defaultPrivateKey = getEnv('DEFAULT_HD_ACCOUNT_PRIVATE_KEY');

if (!defaultSeedPhrase) throw new Error('process.env.DEFAULT_SEED_PHRASE not found.');
if (!defaultPassword) throw new Error('process.env.DEFAULT_PASSWORD not found.');

export class BrowserContext {
public static browser: Browser;
public static page: Page;
public static seedPhrase = defaultSeedPhrase;
public static password = defaultPassword;
public static privateKey = defaultPrivateKey;
}
3 changes: 3 additions & 0 deletions e2e/src/classes/page.class.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export abstract class Page {
abstract isVisible(): void;
}
19 changes: 19 additions & 0 deletions e2e/src/features/import-existing-wallet.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Feature: Import existing wallet
@dev
Scenario: As a user, I'd like to import account with existing seed phrase
Given I am on the Welcome page
And I press Import Existing Wallet button on the Welcome page

And I am on the ImportExistingWallet page
And I enter my mnemonic
And I press Next button on the Import Existing Seed Phrase page

And I am on the SetWallet page
And I enter password into Password Field on the Register Form page
And I enter password into Repeat Password Field on the Register Form page
And I press Skip Onboarding Checkbox on the Register Form page
And I press Accept Terms Checkbox on the Register Form page
And I press Import Button on the Register Form page

Then I am on the Header page

7 changes: 7 additions & 0 deletions e2e/src/hooks/after-all.hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { AfterAll } from '@cucumber/cucumber';

import { BrowserContext } from '../classes/browser-context.class';

AfterAll(async () => {
await BrowserContext.browser.close();
});
15 changes: 15 additions & 0 deletions e2e/src/hooks/before-all.hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { BeforeAll } from '@cucumber/cucumber';

import { initBrowserContext } from '../utils/browser-context.utils';
import { initBrowser } from '../utils/browser.utils';

const LONG_TIMEOUT = 20 * 1000;
BeforeAll({ timeout: LONG_TIMEOUT }, async () => {
const browser = await initBrowser();

const [blankPage] = await browser.pages();
await blankPage.goto('https://www.google.com/');
await blankPage.close();

await initBrowserContext(browser);
});
8 changes: 8 additions & 0 deletions e2e/src/hooks/before.hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { Before } from '@cucumber/cucumber';

import { BrowserContext } from '../classes/browser-context.class';

Before(async () => {
await BrowserContext.page.evaluate(() => void localStorage.clear());
await BrowserContext.page.reload();
});
11 changes: 11 additions & 0 deletions e2e/src/page-objects/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { HeaderPage } from './pages/header.page';
import { ImportExistingWalletPage } from './pages/importing-existing-wallet.page';
import { setWalletPage } from './pages/setWalletPassword.page';
import { WelcomePage } from './pages/welcome.page';

export const Pages = {
Welcome: new WelcomePage(),
ImportExistingWallet: new ImportExistingWalletPage(),
SetWallet: new setWalletPage(),
Header: new HeaderPage()
};
13 changes: 13 additions & 0 deletions e2e/src/page-objects/pages/header.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { HeaderSelectors } from '../../../../src/app/layouts/PageLayout/Header.selectors';
import { Page } from '../../classes/page.class';
import { createPageElement } from '../../utils/search.utils';

export class HeaderPage extends Page {
accountIconButton = createPageElement(HeaderSelectors.AccountIcon);
templeLogoButton = createPageElement(HeaderSelectors.TempleLogo);

async isVisible() {
await this.accountIconButton.waitForDisplayed();
await this.templeLogoButton.waitForDisplayed();
}
}
16 changes: 16 additions & 0 deletions e2e/src/page-objects/pages/importing-existing-wallet.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { ImportFromSeedPhraseTestIds } from '../../../../src/app/pages/NewWallet/import/ImportSeedPhrase/ImportFromSeedPhrase.test-ids';
import { Page } from '../../classes/page.class';
import { createPageElement, findElements } from '../../utils/search.utils';

export class ImportExistingWalletPage extends Page {
nextButton = createPageElement(ImportFromSeedPhraseTestIds.nextButton);
wordInput = createPageElement(ImportFromSeedPhraseTestIds.wordInput);

async isVisible() {
await this.nextButton.waitForDisplayed();
await this.wordInput.waitForDisplayed();
}
async getWordsInputs() {
return findElements(ImportFromSeedPhraseTestIds.wordInput);
}
}
19 changes: 19 additions & 0 deletions e2e/src/page-objects/pages/setWalletPassword.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { setWalletPasswordTestIDS } from '../../../../src/app/pages/NewWallet/setWalletPassword/SetWalletPassword.test-ids';
import { Page } from '../../classes/page.class';
import { createPageElement } from '../../utils/search.utils';

export class setWalletPage extends Page {
passwordField = createPageElement(setWalletPasswordTestIDS.passwordField);
repeatPasswordField = createPageElement(setWalletPasswordTestIDS.repeatPasswordField);
skipOnboarding = createPageElement(setWalletPasswordTestIDS.skipOnboardingCheckbox);
acceptTerms = createPageElement(setWalletPasswordTestIDS.acceptTermsCheckbox);
importButton = createPageElement(setWalletPasswordTestIDS.importButton);

async isVisible() {
await this.passwordField.waitForDisplayed();
await this.repeatPasswordField.waitForDisplayed();
await this.skipOnboarding.waitForDisplayed();
await this.acceptTerms.waitForDisplayed();
await this.importButton.waitForDisplayed();
}
}
13 changes: 13 additions & 0 deletions e2e/src/page-objects/pages/welcome.page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { WelcomeTestIds } from '../../../../src/app/pages/Welcome/Welcome.test-ids';
import { Page } from '../../classes/page.class';
import { createPageElement } from '../../utils/search.utils';

export class WelcomePage extends Page {
createNewWalletButton = createPageElement(WelcomeTestIds.createNewWallet);
importExistingWalletButton = createPageElement(WelcomeTestIds.importExistingWallet);

async isVisible() {
await this.createNewWalletButton.waitForDisplayed();
await this.importExistingWalletButton.waitForDisplayed();
}
}
27 changes: 27 additions & 0 deletions e2e/src/step-definitions/common.steps.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { Given } from '@cucumber/cucumber';

import { Pages } from '../page-objects';
import { getInputText } from '../utils/input.utils';
import { createPageElement } from '../utils/search.utils';
import { enterMyMnemonicStep } from '../utils/shared-steps.utils';

Given(/^I am on the (\w+) page$/, async (page: keyof typeof Pages) => {
await Pages[page].isVisible();
});

Given(/I press (.*) on the (.*) page/, async (elementName: string, pageName: string) => {
await createPageElement(`${pageName}/${elementName}`).click();
});

Given(/I enter my mnemonic/, async () => {
await enterMyMnemonicStep();
});

Given(
/I enter (seed|password) into (.*) on the (.*) page/,
async (inputType: string, elementName: string, pageName: string) => {
const inputText = getInputText(inputType);

await createPageElement(`${pageName}/${elementName}`).type(inputText);
}
);
10 changes: 10 additions & 0 deletions e2e/src/utils/browser-context.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Browser } from 'puppeteer';

import { BrowserContext } from '../classes/browser-context.class';

export const initBrowserContext = async (browser: Browser) => {
const [page] = await browser.pages();

BrowserContext.browser = browser;
BrowserContext.page = page;
};
10 changes: 10 additions & 0 deletions e2e/src/utils/browser.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import path from 'path';
import { launch } from 'puppeteer';

const EXTENSION_PATH = path.resolve(__dirname, '../../../dist/chrome_unpacked');

export const initBrowser = () =>
launch({
headless: false,
args: [`--disable-extensions-except=${EXTENSION_PATH}`, `--load-extension=${EXTENSION_PATH}`]
});
5 changes: 5 additions & 0 deletions e2e/src/utils/env.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import * as dotenv from 'dotenv';

dotenv.config();

export const getEnv = (key: string) => process.env[key] ?? '';
16 changes: 16 additions & 0 deletions e2e/src/utils/input.utils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { BrowserContext } from '../classes/browser-context.class';

export const getInputText = (inputType: string) => {
let inputText = '';

switch (inputType) {
case 'seed':
inputText = BrowserContext.seedPhrase;
break;
case 'password':
inputText = BrowserContext.password;
break;
}

return inputText;
};
Loading

0 comments on commit 553b12b

Please sign in to comment.