Skip to content

Commit 1c32f00

Browse files
committed
Merge branch 'main' into 2091-map-proposal-elements-for-testing
2 parents a4dd8b0 + caa02b0 commit 1c32f00

File tree

18 files changed

+106
-140
lines changed

18 files changed

+106
-140
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v22.15.0

catalyst_voices/apps/voices/e2e_tests/pageobject/app-bar-page.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import { Locator, Page } from "@playwright/test";
2-
import intlEn from "./onboarding/localization-util";
32

43
export class AppBarPage {
54
getStartedBtn: Locator;
65
page: Page;
76

87
constructor(page: Page) {
98
this.page = page;
10-
this.getStartedBtn = page.getByRole("button", {
11-
name: intlEn.getStarted,
12-
});
9+
this.getStartedBtn = this.page.getByTestId("GetStartedBtn");
1310
}
1411
async GetStartedBtnClick() {
1512
await this.getStartedBtn.click();

catalyst_voices/apps/voices/e2e_tests/pageobject/onboarding/create-flow/step-2-base-profile-info.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { Locator, Page } from "@playwright/test";
2-
import intlEn from "../localization-util";
32
import { GetStartedPanel } from "../step-1-get-started";
43

54
export class BaseProfileInfoPanel {
@@ -8,9 +7,7 @@ export class BaseProfileInfoPanel {
87

98
constructor(page: Page) {
109
this.page = page;
11-
this.createYourBaseProfileBtn = page.getByRole("button", {
12-
name: intlEn.createBaseProfileInstructionsNext,
13-
});
10+
this.createYourBaseProfileBtn = page.getByTestId('CreateBaseProfileNextButton');
1411
}
1512

1613
async goto() {

catalyst_voices/apps/voices/e2e_tests/pageobject/onboarding/localization-util.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.

catalyst_voices/apps/voices/e2e_tests/pageobject/onboarding/onboarding-base-page.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import { type Locator, type Page } from "@playwright/test";
2-
import intlEn from "./localization-util";
32

43
export class OnboardingBasePage {
54
page: Page;

catalyst_voices/apps/voices/e2e_tests/pageobject/onboarding/step-1-get-started.ts

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { Locator, Page } from "@playwright/test";
22
import { AppBarPage } from "../app-bar-page";
3-
import intlEn from "./localization-util";
43

54
export class GetStartedPanel {
65
createNewCatalystKeychain: Locator;
@@ -9,16 +8,8 @@ export class GetStartedPanel {
98

109
constructor(page: Page) {
1110
this.page = page;
12-
this.createNewCatalystKeychain = page.getByRole("group", {
13-
name:
14-
intlEn.accountCreationCreate + " " + intlEn.accountCreationOnThisDevice,
15-
});
16-
this.recoverCatalystKeychain = page.getByRole("group", {
17-
name:
18-
intlEn.accountCreationRecover +
19-
" " +
20-
intlEn.accountCreationOnThisDevice,
21-
});
11+
this.createNewCatalystKeychain = page.getByTestId("CreateAccountType.createNew");
12+
this.recoverCatalystKeychain = page.getByTestId("CreateAccountType.recover");
2213
}
2314

2415
async goto() {

catalyst_voices/apps/voices/e2e_tests/playwright.config.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,18 @@ import { defineConfig, devices } from "@playwright/test";
22

33
export default defineConfig({
44
testDir: "./tests",
5+
testIgnore: ["**/test‑fixtures.ts"],
6+
57
fullyParallel: true,
68
forbidOnly: !!process.env.CI,
79
retries: 3,
810
workers: 1,
911
use: {
12+
testIdAttribute: "flt-semantics-identifier",
1013
ignoreHTTPSErrors: true,
1114
screenshot: "only-on-failure",
12-
trace: "on",
13-
video: "on",
15+
trace: "retain-on-failure",
16+
video: "retain-on-failure",
1417
},
1518

1619
reporter: "html",

catalyst_voices/apps/voices/e2e_tests/tests/onboarding.spec.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,21 @@ import { WalletConfig } from "../utils/wallets/walletUtils";
99
const walletConfig: WalletConfig = walletConfigs[3];
1010

1111
// do some non-happy flows (wrong seed phrase, cancel connection, no wallet, etc)
12+
13+
// test("Refactored restore flow demo", async ({ page }) => {
14+
// await page.goto("http://localhost:51709/m4/discovery");
15+
// await new UnlockPasswordSuccessPanel(page).goto("test1234");
16+
// });
17+
1218
test(
1319
"Create keychain and link wallet for " + walletConfig.extension.Name,
1420
async ({ restoreWallet }) => {
1521
const browser = await restoreWallet(walletConfig);
1622
const page = browser.pages()[0];
1723

1824
// await new WalletListPage(page).clickEnableWallet(walletConfig.extension.Name);
19-
await page.goto("http://localhost:51709/m4/discovery");
20-
await new WalletListPanel(page).goto('test1234');
25+
await page.goto("http://localhost:55338/m4/discovery");
26+
await new WalletListPanel(page).goto("test1234");
2127
const [walletPopup] = await Promise.all([
2228
browser.waitForEvent("page"),
2329
new WalletListPanel(page).clickYoroiWallet(),
@@ -35,9 +41,3 @@ test(
3541
await signPopup.locator("#confirmButton").click();
3642
}
3743
);
38-
39-
test("Refactored restore flow demo", async ({ page }) => {
40-
await page.goto("http://localhost:51709/m4/discovery");
41-
await new UnlockPasswordSuccessPanel(page).goto("test1234");
42-
});
43-

catalyst_voices/apps/voices/e2e_tests/utils/wallets/yoroiUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export const onboardYoroiWallet = async (
3636
await page.locator('xpath=//*[@id="sidebar.settings"]').click();
3737
await page.locator('button:has-text("I Understand")').click();
3838
await page.locator('button:has-text("SWITCH NETWORK")').click();
39-
await page.locator('xpath=//*[@id="selectedNetwork--55"]').click();
40-
await page.locator("#selectNetwork-network_250-menuItem").click();
39+
await page.locator("#switchNetworkDialog-selectNetwork-dropdown").click();
40+
await page.locator("#switchNetworkDialog-selectNetwork_250-menuItem").click();
4141
await page.locator("#switchNetworkDialog-apply-button").click();
4242
await page.locator("#somewhere-checkbox").click();
4343
await page.locator('button:has-text("Continue")').click();

catalyst_voices/apps/voices/lib/pages/registration/create_base_profile/stage/instructions_panel.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,14 @@ class _NextButton extends StatelessWidget {
100100

101101
@override
102102
Widget build(BuildContext context) {
103-
return Semantics(
104-
button: true,
105-
child: VoicesFilledButton(
106-
key: const Key('CreateBaseProfileNext'),
107-
onTap: () => RegistrationCubit.of(context).nextStep(),
108-
child: Text(context.l10n.createBaseProfileInstructionsNext),
103+
return VoicesFilledButton(
104+
key: const Key('CreateBaseProfileNext'),
105+
onTap: () => RegistrationCubit.of(context).nextStep(),
106+
child: Semantics(
107+
identifier: 'CreateBaseProfileNextButton',
108+
child: Text(
109+
context.l10n.createBaseProfileInstructionsNext,
110+
),
109111
),
110112
);
111113
}

0 commit comments

Comments
 (0)