Skip to content

Commit

Permalink
Merge branch 'TW-1343-epic-evm-arch-prep' into TW-1454-new-setup-e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-tsx committed Jun 21, 2024
2 parents 8b68681 + 4b02a61 commit e6ddd8e
Show file tree
Hide file tree
Showing 310 changed files with 8,119 additions and 3,490 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@
"@typescript-eslint/ban-types": "warn",
"@typescript-eslint/no-dynamic-delete": "off",
"@typescript-eslint/prefer-literal-enum-member": "off",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "off",

"react/prop-types": "off",
"react/display-name": "off",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ jobs:
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}

- name: Install dependencies and code quality check with private modules
uses: ./.github/workflows/code-quality-check
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/manual-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}
# [e2e]
DEFAULT_HD_ACCOUNT_SEED_PHRASE: ${{ secrets.DEFAULT_HD_ACCOUNT_SEED_PHRASE }}
DEFAULT_HD_ACCOUNT_FIRST_PRIVATE_KEY: ${{ secrets.DEFAULT_HD_ACCOUNT_FIRST_PRIVATE_KEY }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID: ${{ vars.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE: ${{ vars.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL: ${{ vars.CONVERSION_VERIFICATION_URL }}

- name: Install dependencies and code quality
uses: ./.github/workflows/code-quality-check
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/secrets-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ inputs:
required: true
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID:
required: true
CONVERSION_VERIFICATION_URL:
required: true
# [e2e]
DEFAULT_HD_ACCOUNT_SEED_PHRASE:
required: false
Expand Down Expand Up @@ -140,6 +142,7 @@ runs:
PERSONA_ADS_MEDIUM_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_MEDIUM_BANNER_UNIT_ID }}
PERSONA_ADS_SQUARISH_BANNER_UNIT_ID=${{ inputs.PERSONA_ADS_SQUARISH_BANNER_UNIT_ID }}
TEMPLE_ADS_ORIGIN_PASSPHRASE=${{ inputs.TEMPLE_ADS_ORIGIN_PASSPHRASE }}
CONVERSION_VERIFICATION_URL=${{ inputs.CONVERSION_VERIFICATION_URL }}
TEMPLE_WALLET_DEVELOPMENT_BRANCH_NAME=${{ github.ref_name }}
EOF
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/page-objects/pages/delegate-form.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DelegateFormSelectors } from 'src/app/templates/DelegateForm.selectors';
import { DelegateFormSelectors } from 'src/app/pages/Delegate/selectors';

import { Page } from '../../classes/page.class';
import { createPageElement } from '../../utils/search.utils';
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/page-objects/pages/delegate-tab.page.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { BakingSectionSelectors } from 'src/app/pages/Home/OtherComponents/BakingSection.selectors';
import { BakingSectionSelectors } from 'src/app/pages/Home/OtherComponents/BakingSection/selectors';

import { Page } from '../../classes/page.class';
import { createPageElement } from '../../utils/search.utils';
Expand Down
2 changes: 0 additions & 2 deletions e2e/src/page-objects/pages/setWalletPassword.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,13 @@ export class setWalletPage extends Page {
passwordField = createPageElement(setWalletPasswordSelectors.passwordField);
repeatPasswordField = createPageElement(setWalletPasswordSelectors.repeatPasswordField);
analyticsCheckbox = createPageElement(setWalletPasswordSelectors.analyticsCheckBox);
skipOnboarding = createPageElement(setWalletPasswordSelectors.skipOnboardingCheckbox);
acceptTerms = createPageElement(setWalletPasswordSelectors.acceptTermsCheckbox);
importButton = createPageElement(setWalletPasswordSelectors.importButton);

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

import { BrowserContext } from '../classes/browser-context.class';
import { Pages } from '../page-objects';
import { iEnterValues, IEnterValuesKey, clearDataFromCurrentInput } from '../utils/input-data.utils';
import { createPageElement } from '../utils/search.utils';
import { LONG_TIMEOUT, MEDIUM_TIMEOUT, SHORT_TIMEOUT } from '../utils/timing.utils';

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

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

Given(
/I clear (.*) value on the (.*) page/,
{ timeout: MEDIUM_TIMEOUT },
async (elementName: string, pageName: string) => {
const element = createPageElement(`${pageName}/${elementName}`);
await element.click();
await clearDataFromCurrentInput();
}
);

Given(
/I enter (.*) into (.*) on the (.*) page/,
{ timeout: SHORT_TIMEOUT },
async (key: IEnterValuesKey, elementName: string, pageName: string) => {
const inputText = iEnterValues[key];

await createPageElement(`${pageName}/${elementName}`).type(inputText);
}
);

Given(/I have imported an existing account/, { timeout: LONG_TIMEOUT }, async () => {
await Pages.Welcome.isVisible();
await Pages.Welcome.importExistingWalletButton.click();

await Pages.ImportExistingWallet.isVisible();
await Pages.ImportExistingWallet.enterSeedPhrase(BrowserContext.seedPhrase);
await Pages.ImportExistingWallet.nextButton.click();

await Pages.SetWallet.isVisible();
await Pages.SetWallet.passwordField.type(BrowserContext.password);
await Pages.SetWallet.repeatPasswordField.type(BrowserContext.password);
await Pages.SetWallet.analyticsCheckbox.click();
await Pages.SetWallet.acceptTerms.click();
await Pages.SetWallet.importButton.click();

await Pages.NewsletterModal.isVisible(LONG_TIMEOUT);
await Pages.NewsletterModal.closeButton.click();

await Pages.Home.isVisible();
});

Given(
/^I scroll (.*) pixels on the (\w+) page$/,
{ timeout: MEDIUM_TIMEOUT },
async (countOfScroll: number, page: keyof typeof Pages) => {
await Pages[page].scrollTo(countOfScroll);
}
);

Given(/I reload the page/, async () => {
await BrowserContext.page.reload();
});
41 changes: 20 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@
"@hypelab/sdk-react": "^1.0.3",
"@jitsu/sdk-js": "madfish-solutions/jitsu-js#87c49de334f5747952f7beda573b95ceb5d86903",
"@ledgerhq/errors": "^6",
"@ledgerhq/hw-transport": "6.27.8",
"@ledgerhq/hw-transport-http": "6.27.8",
"@ledgerhq/hw-transport": "^6.30.6",
"@ledgerhq/hw-transport-http": "^6.29.6",
"@ledgerhq/hw-transport-u2f": "5.36.0-deprecated",
"@ledgerhq/hw-transport-webauthn": "5.36.0-deprecated",
"@ledgerhq/hw-transport-webhid": "6.27.8",
"@ledgerhq/hw-transport-webhid": "^6.28.6",
"@microsoft/signalr": "^8.0.0",
"@peculiar/webcrypto": "1.1.6",
"@personaxyz/ad-sdk": "^0.0.19",
Expand All @@ -58,16 +58,16 @@
"@reduxjs/toolkit": "^1.8.5",
"@rnw-community/shared": "^0.48.0",
"@svgr/webpack": "^8",
"@taquito/ledger-signer": "19.0.2",
"@taquito/local-forging": "19.0.2",
"@taquito/michel-codec": "19.0.2",
"@taquito/michelson-encoder": "19.0.2",
"@taquito/rpc": "19.0.2",
"@taquito/signer": "19.0.2",
"@taquito/taquito": "19.0.2",
"@taquito/tzip12": "19.0.2",
"@taquito/tzip16": "19.0.2",
"@taquito/utils": "19.0.2",
"@taquito/ledger-signer": "20.0.0",
"@taquito/local-forging": "20.0.0",
"@taquito/michel-codec": "20.0.0",
"@taquito/michelson-encoder": "20.0.0",
"@taquito/rpc": "20.0.0",
"@taquito/signer": "20.0.0",
"@taquito/taquito": "20.0.0",
"@taquito/tzip12": "20.0.0",
"@taquito/tzip16": "20.0.0",
"@taquito/utils": "20.0.0",
"@temple-wallet/dapp": "5.0.2",
"@temple-wallet/jest-webextension-mock": "^5.0.0",
"@temple-wallet/save-remote-file-webpack-plugin": "^1.1.2",
Expand Down Expand Up @@ -205,7 +205,7 @@
"use-force-update": "1.0.7",
"use-onclickoutside": "0.4.1",
"util": "0.11.1",
"viem": "^2.8.6",
"viem": "^2.15.1",
"wasm-themis": "0.14.6",
"webextension-polyfill": "^0.10.0",
"webpack": "^5",
Expand All @@ -222,20 +222,19 @@
},
"resolutions": {
"react-dev-utils/fork-ts-checker-webpack-plugin": "^9",
"ws": "7.4.6",
"tslib": "^2.4.0",
"@types/react": "18.0.15",
"@taquito/taquito": "19.0.2",
"@taquito/utils": "19.0.2",
"@taquito/beacon-wallet": "19.0.2",
"@taquito/contracts-library": "19.0.2",
"@taquito/tzip16": "19.0.2",
"@taquito/taquito": "20.0.0",
"@taquito/utils": "20.0.0",
"@taquito/beacon-wallet": "20.0.0",
"@taquito/contracts-library": "20.0.0",
"@taquito/tzip16": "20.0.0",
"bignumber.js": "9.1.0",
"graphql-request": "^6.1.0",
"json5": "^2.2.2",
"follow-redirects": "^1.15.4"
},
"optionalDependencies": {
"@temple-wallet/extension-ads": "^6.0.0"
"@temple-wallet/extension-ads": "^6.1.0"
}
}
13 changes: 5 additions & 8 deletions public/_locales/de/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@
}
}
},
"clickOnBakerPrompt": {
"message": "Klicken Sie auf den Baker, an den Sie Gelder delegieren möchten. Diese Liste wird unterstützt von $link$.",
"recommendedBakersDescription": {
"message": "Diese Liste wird unterstützt von $link$",
"placeholders": {
"link": {
"content": "$1"
Expand Down Expand Up @@ -454,9 +454,6 @@
"toBeConnectedWithDApp": {
"message": "soll mit dApp verbunden werden."
},
"atLeast8Characters": {
"message": "Mindestens 8 Zeichen"
},
"atLeast1Number": {
"message": "Mindestens 1 Zahl"
},
Expand Down Expand Up @@ -881,8 +878,8 @@
"delegation": {
"message": "Delegation"
},
"baker": {
"message": "Baker"
"customBaker": {
"message": "Custom Baker"
},
"bakerInputDescription": {
"message": "Adresse eines registrierten Bakers."
Expand All @@ -902,7 +899,7 @@
"unknownBakerDescription": {
"message": "Die angegebene Adresse ist uns als Baker nicht bekannt! Delegieren Sie Gelder nur auf eigenes Risiko."
},
"delegateToRecommendedBakers": {
"recommendedBakers": {
"message": "Delegieren an empfohlene Baker"
},
"sortBy": {
Expand Down
Loading

0 comments on commit e6ddd8e

Please sign in to comment.