-
Notifications
You must be signed in to change notification settings - Fork 489
Expand file tree
/
Copy pathassets.discoverability.spec.ts
More file actions
129 lines (110 loc) · 3.92 KB
/
Copy pathassets.discoverability.spec.ts
File metadata and controls
129 lines (110 loc) · 3.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
import { test } from "tests/fixtures/common";
import { expect } from "@playwright/test";
import { Team } from "@ledgerhq/live-e2e-shared/enum/Team";
import { addTmsLink } from "tests/utils/allureUtils";
import { getDescription } from "tests/utils/customJsonReporter";
import { FF_LWD_WALLET_40_Q2 } from "tests/utils/featureFlagUtils";
import { liveDataCommand } from "@ledgerhq/live-e2e-shared/cliCommandsUtils";
import { Account } from "@ledgerhq/live-e2e-shared/enum/Account";
import { Currency } from "@ledgerhq/live-e2e-shared/enum/Currency";
import { DEVICE_TAGS } from "tests/utils/tagsUtils";
test.describe("Asset discoverability", () => {
test.use({
teamOwner: Team.WALLET_XP,
userdata: "1AccountBTC1AccountETH",
featureFlags: FF_LWD_WALLET_40_Q2,
});
test(
"Explore the stocks market from the empty stocks category",
{
tag: [...DEVICE_TAGS],
annotation: {
type: "TMS",
description: "B2CQA-5955",
},
},
async ({ app }) => {
await addTmsLink(getDescription(test.info().annotations, "TMS").split(", "));
await app.mainNavigation.openTargetFromMainNavigation("home");
await app.portfolio.expectStocksDiscoveryVisible();
await app.portfolio.clickStocksExploreAll();
await app.market.expectMarketPageVisible();
await app.market.expectCategorySelected("stocks");
},
);
});
test.describe("Asset discoverability", () => {
test.use({
teamOwner: Team.WALLET_XP,
userdata: "skip-onboarding-with-last-seen-device",
speculosApp: Account.ETH_1.currency.speculosApp,
cliCommands: [liveDataCommand(Account.ETH_1)],
featureFlags: FF_LWD_WALLET_40_Q2,
});
test(
`[${Account.ETH_1.currency.testLabel}] - Open the stocks assets page from the stocks category`,
{
tag: [...DEVICE_TAGS],
annotation: {
type: "TMS",
description: "B2CQA-5956",
},
},
async ({ app }) => {
await addTmsLink(getDescription(test.info().annotations, "TMS").split(", "));
await app.mainNavigation.openTargetFromMainNavigation("home");
await app.portfolio.expectStocksHoldingsVisible();
await app.portfolio.clickStocksSectionTitle();
await expect(app.layout.getPage()).toHaveURL(/\/assets\?category=stocks/);
await expect(app.portfolio.assetsView.categoryPageContent).toBeVisible();
},
);
});
test.describe("Asset discoverability", () => {
test.use({
teamOwner: Team.WALLET_XP,
userdata: "skip-onboarding-with-last-seen-device",
featureFlags: FF_LWD_WALLET_40_Q2,
});
test(
"Navigate to markets from the search categories",
{
tag: [...DEVICE_TAGS],
annotation: {
type: "TMS",
description: "B2CQA-5957",
},
},
async ({ app }) => {
await addTmsLink(getDescription(test.info().annotations, "TMS").split(", "));
await app.topBarSearch.open();
await app.topBarSearch.expectCategoriesVisible();
await app.topBarSearch.selectCryptosCategory();
await app.market.expectMarketPageVisible();
await app.market.expectCategorySelected("all");
await app.topBarSearch.open();
await app.topBarSearch.selectStocksCategory();
await app.market.expectMarketPageVisible();
await app.market.expectCategorySelected("stocks");
},
);
test(
`[${Currency.BTC.testLabel}-${Currency.ETH.testLabel}] - Match the typed ticker to the top search result`,
{
tag: [...DEVICE_TAGS],
annotation: {
type: "TMS",
description: "B2CQA-5958",
},
},
async ({ app }) => {
await addTmsLink(getDescription(test.info().annotations, "TMS").split(", "));
await app.topBarSearch.open();
await app.topBarSearch.searchFor("btc");
await app.topBarSearch.expectFirstResultTicker("btc");
await app.topBarSearch.clearSearch();
await app.topBarSearch.searchFor("eth");
await app.topBarSearch.expectFirstResultTicker("eth");
},
);
});