Skip to content

Commit 2559cc5

Browse files
authored
test: e2e labels rename and shards update (#29431)
## **Description** Refactors E2E smoke tagging to better match feature ownership and test scope, and updates all downstream consumers (specs, workflows, Bitrise, analyzer/docs). Main changes: - Replaced `SmokeTrade` with: - `SmokeSwap` for `tests/smoke/swap/*` - `SmokeStake` for `tests/smoke/stake/*` - Merged Card + Ramps under `SmokeMoney`: - Updated `tests/smoke/card/*` and `tests/smoke/ramps/*` - Removed deprecated `SmokeCard` and `SmokeRamps` - Merged Seedless onboarding under `SmokeAccounts`: - Updated `tests/smoke/seedless/*` - Removed deprecated `SmokeSeedlessOnboarding` - Added one extra Snap shard in smoke workflows: - iOS: `snaps-ios-smoke` 3 -> 4 - Android: `snaps-android-smoke` 3 -> 4 ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: Smoke tag taxonomy migration Scenario: run smoke workflows with new tags Given a branch with the updated smoke tags and workflow config When smoke workflows are triggered for iOS and Android Then tests in swap use SmokeSwap And tests in stake use SmokeStake And tests in card and ramps use SmokeMoney And tests in seedless use SmokeAccounts Scenario: verify deprecated tags are removed Given the updated repository When searching for SmokeTrade, SmokeCard, SmokeRamps, and SmokeSeedlessOnboarding Then no active smoke spec or smoke workflow references those tags ``` ## **Screenshots/Recordings** ### **Before** N/A (tag/workflow refactor) ### **After** N/A (tag/workflow refactor) ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I've included tests if applicable - [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. #### Performance checks (if applicable) - [ ] I've tested on Android - Ideally on a mid-range device; emulator is acceptable - [ ] I've tested with a power user scenario - Use these [power-user SRPs](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/edit-v2/401401446401?draftShareId=9d77e1e1-4bdc-4be1-9ebb-ccd916988d93) to import wallets with many accounts and tokens - [ ] I've instrumented key operations with Sentry traces for production performance metrics - See [`trace()`](/app/util/trace.ts) for usage and [`addToken`](/app/components/Views/AddAsset/components/AddCustomToken/AddCustomToken.tsx#L274) for an example For performance guidelines and tooling, see the [Performance Guide](https://consensyssoftware.atlassian.net/wiki/spaces/TL1/pages/400085549067/Performance+Guide+for+Engineers). ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent da5ca97 commit 2559cc5

23 files changed

Lines changed: 149 additions & 140 deletions

.agents/skills/e2e-test/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ Do not read the full reference files until the decision tree or workflow sends y
6666
5. **Never use `TestHelpers.delay()`** — use `Assertions.*` which has auto-retry
6767
6. **Use `FixtureBuilder` for state** — do not set state through UI interactions
6868
7. **Selectors live in `*.testIds.ts`** (co-located) or `tests/selectors/` (legacy)
69-
8. **Tag correctly** — Use the tag that matches your feature and test type. Options include `SmokeE2E`, `SmokeTrade`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, `RegressionTrade`, `RegressionWallet`, etc. Check **`tests/tags.js`** for the full list and descriptions, and **existing specs in the same feature folder** to see which tag they use.
69+
8. **Tag correctly** — Use the tag that matches your feature and test type. Options include `SmokeE2E`, `SmokeSwap`, `SmokeStake`, `SmokeMoney`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, `RegressionTrade`, `RegressionWallet`, etc. Check **`tests/tags.js`** for the full list and descriptions, and **existing specs in the same feature folder** to see which tag they use.
7070
9. **Descriptive test names** — no 'should' prefix (e.g., `'opens market details'`)
7171
10. **Fix lint/tsc before running** — never run with known errors
7272

.agents/skills/e2e-test/references/writing-tests.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Spec File Location
44

5-
| Test Type | Directory | Tag |
6-
| ---------- | ------------------------------------------- | -------------------------------------------------------------------------------------- |
7-
| Smoke | `tests/smoke/<feature>/<name>.spec.ts` | `SmokeE2E`, `SmokeTrade`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, etc. |
8-
| Regression | `tests/regression/<feature>/<name>.spec.ts` | `RegressionTrade`, `RegressionWallet`, etc. |
5+
| Test Type | Directory | Tag |
6+
| ---------- | ------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
7+
| Smoke | `tests/smoke/<feature>/<name>.spec.ts` | `SmokeE2E`, `SmokeSwap`, `SmokeStake`, `SmokeMoney`, `SmokePredictions`, `SmokePerps`, `SmokeConfirmations`, etc. |
8+
| Regression | `tests/regression/<feature>/<name>.spec.ts` | `RegressionTrade`, `RegressionWallet`, etc. |
99

10-
Import tags from `tests/tags.ts`. Check **`tests/tags.js`** for the full list and descriptions. Use the same tag as **existing specs in that feature folder** (e.g. `tests/smoke/predict/` uses `SmokeTrade`).
10+
Import tags from `tests/tags.ts`. Check **`tests/tags.js`** for the full list and descriptions. Use the same tag as **existing specs in that feature folder** (e.g. `tests/smoke/swap/` uses `SmokeSwap`, `tests/smoke/stake/` uses `SmokeStake`, `tests/smoke/card/` and `tests/smoke/ramps/` use `SmokeMoney`).
1111

1212
## Minimal Smoke Spec
1313

.github/workflows/run-e2e-smoke-tests-android.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
selected_tags:
7-
description: 'JSON array of selected tags from Smart E2E selection (e.g., ["SmokeAccounts", "SmokeTrade"])'
7+
description: 'JSON array of selected tags from Smart E2E selection (e.g., ["SmokeAccounts", "SmokeSwap"])'
88
required: false
99
type: string
1010
default: '["ALL"]'
@@ -19,17 +19,33 @@ permissions:
1919
id-token: write
2020

2121
jobs:
22-
trade-android-smoke:
23-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeTrade')
22+
swap-android-smoke:
23+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeSwap')
24+
strategy:
25+
matrix:
26+
split: [1, 2]
27+
fail-fast: false
28+
uses: ./.github/workflows/run-e2e-workflow.yml
29+
with:
30+
test-suite-name: swap-android-smoke-${{ matrix.split }}
31+
platform: android
32+
test_suite_tag: 'SmokeSwap'
33+
split_number: ${{ matrix.split }}
34+
total_splits: 2
35+
changed_files: ${{ inputs.changed_files }}
36+
secrets: inherit
37+
38+
stake-android-smoke:
39+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeStake')
2440
strategy:
2541
matrix:
2642
split: [1]
2743
fail-fast: false
2844
uses: ./.github/workflows/run-e2e-workflow.yml
2945
with:
30-
test-suite-name: trade-android-smoke-${{ matrix.split }}
46+
test-suite-name: stake-android-smoke-${{ matrix.split }}
3147
platform: android
32-
test_suite_tag: 'SmokeTrade'
48+
test_suite_tag: 'SmokeStake'
3349
split_number: ${{ matrix.split }}
3450
total_splits: 1
3551
changed_files: ${{ inputs.changed_files }}
@@ -163,33 +179,17 @@ jobs:
163179
changed_files: ${{ inputs.changed_files }}
164180
secrets: inherit
165181

166-
card-android-smoke:
167-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeCard')
168-
strategy:
169-
matrix:
170-
split: [1]
171-
fail-fast: false
172-
uses: ./.github/workflows/run-e2e-workflow.yml
173-
with:
174-
test-suite-name: card-android-smoke-${{ matrix.split }}
175-
platform: android
176-
test_suite_tag: 'SmokeCard'
177-
split_number: ${{ matrix.split }}
178-
total_splits: 1
179-
changed_files: ${{ inputs.changed_files }}
180-
secrets: inherit
181-
182-
ramps-android-smoke:
183-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeRamps')
182+
money-android-smoke:
183+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeMoney')
184184
strategy:
185185
matrix:
186186
split: [1]
187187
fail-fast: false
188188
uses: ./.github/workflows/run-e2e-workflow.yml
189189
with:
190-
test-suite-name: ramps-android-smoke-${{ matrix.split }}
190+
test-suite-name: money-android-smoke-${{ matrix.split }}
191191
platform: android
192-
test_suite_tag: 'SmokeRamps'
192+
test_suite_tag: 'SmokeMoney'
193193
split_number: ${{ matrix.split }}
194194
total_splits: 1
195195
changed_files: ${{ inputs.changed_files }}
@@ -247,15 +247,15 @@ jobs:
247247
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeSnaps')
248248
strategy:
249249
matrix:
250-
split: [1, 2, 3]
250+
split: [1, 2, 3, 4]
251251
fail-fast: false
252252
uses: ./.github/workflows/run-e2e-workflow.yml
253253
with:
254254
test-suite-name: snaps-android-smoke-${{ matrix.split }}
255255
platform: android
256256
test_suite_tag: 'SmokeSnaps'
257257
split_number: ${{ matrix.split }}
258-
total_splits: 3
258+
total_splits: 4
259259
changed_files: ${{ inputs.changed_files }}
260260
secrets: inherit
261261

@@ -264,7 +264,8 @@ jobs:
264264
runs-on: ubuntu-latest
265265
if: ${{ !cancelled() && inputs.selected_tags != '[]' && inputs.selected_tags != '["FlaskBuildTests"]' }}
266266
needs:
267-
- trade-android-smoke
267+
- swap-android-smoke
268+
- stake-android-smoke
268269
- perps-android-smoke
269270
- wallet-platform-android-smoke
270271
- identity-android-smoke
@@ -273,8 +274,7 @@ jobs:
273274
- network-expansion-android-smoke
274275
- confirmations-android-smoke
275276
- prediction-market-android-smoke
276-
- card-android-smoke
277-
- ramps-android-smoke
277+
- money-android-smoke
278278
- multichain-api-android-smoke
279279
- seedless-onboarding-android-smoke
280280
- browser-android-smoke

.github/workflows/run-e2e-smoke-tests-ios.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
workflow_call:
55
inputs:
66
selected_tags:
7-
description: 'JSON array of selected tags from Smart E2E selection (e.g., ["SmokeAccounts", "SmokeTrade"])'
7+
description: 'JSON array of selected tags from Smart E2E selection (e.g., ["SmokeAccounts", "SmokeSwap"])'
88
required: false
99
type: string
1010
default: '["ALL"]'
@@ -37,17 +37,35 @@ jobs:
3737
metamask_environment: 'qa'
3838
secrets: inherit
3939

40-
trade-ios-smoke:
41-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeTrade')
40+
swap-ios-smoke:
41+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeSwap')
42+
strategy:
43+
matrix:
44+
split: [1, 2]
45+
fail-fast: false
46+
uses: ./.github/workflows/run-e2e-workflow.yml
47+
with:
48+
test-suite-name: swap-ios-smoke-${{ matrix.split }}
49+
platform: ios
50+
test_suite_tag: 'SmokeSwap'
51+
split_number: ${{ matrix.split }}
52+
total_splits: 2
53+
changed_files: ${{ inputs.changed_files }}
54+
build_type: 'main'
55+
metamask_environment: 'qa'
56+
secrets: inherit
57+
58+
stake-ios-smoke:
59+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeStake')
4260
strategy:
4361
matrix:
4462
split: [1]
4563
fail-fast: false
4664
uses: ./.github/workflows/run-e2e-workflow.yml
4765
with:
48-
test-suite-name: trade-ios-smoke-${{ matrix.split }}
66+
test-suite-name: stake-ios-smoke-${{ matrix.split }}
4967
platform: ios
50-
test_suite_tag: 'SmokeTrade'
68+
test_suite_tag: 'SmokeStake'
5169
split_number: ${{ matrix.split }}
5270
total_splits: 1
5371
changed_files: ${{ inputs.changed_files }}
@@ -181,35 +199,17 @@ jobs:
181199
metamask_environment: 'qa'
182200
secrets: inherit
183201

184-
card-ios-smoke:
185-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeCard')
186-
strategy:
187-
matrix:
188-
split: [1]
189-
fail-fast: false
190-
uses: ./.github/workflows/run-e2e-workflow.yml
191-
with:
192-
test-suite-name: card-ios-smoke-${{ matrix.split }}
193-
platform: ios
194-
test_suite_tag: 'SmokeCard'
195-
split_number: ${{ matrix.split }}
196-
total_splits: 1
197-
changed_files: ${{ inputs.changed_files }}
198-
build_type: 'main'
199-
metamask_environment: 'qa'
200-
secrets: inherit
201-
202-
ramps-ios-smoke:
203-
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeRamps')
202+
money-ios-smoke:
203+
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeMoney')
204204
strategy:
205205
matrix:
206206
split: [1]
207207
fail-fast: false
208208
uses: ./.github/workflows/run-e2e-workflow.yml
209209
with:
210-
test-suite-name: ramps-ios-smoke-${{ matrix.split }}
210+
test-suite-name: money-ios-smoke-${{ matrix.split }}
211211
platform: ios
212-
test_suite_tag: 'SmokeRamps'
212+
test_suite_tag: 'SmokeMoney'
213213
split_number: ${{ matrix.split }}
214214
total_splits: 1
215215
changed_files: ${{ inputs.changed_files }}
@@ -275,15 +275,15 @@ jobs:
275275
if: contains(fromJson(inputs.selected_tags), 'ALL') || contains(fromJson(inputs.selected_tags), 'SmokeSnaps')
276276
strategy:
277277
matrix:
278-
split: [1, 2, 3]
278+
split: [1, 2, 3, 4]
279279
fail-fast: false
280280
uses: ./.github/workflows/run-e2e-workflow.yml
281281
with:
282282
test-suite-name: snaps-ios-smoke-${{ matrix.split }}
283283
platform: ios
284284
test_suite_tag: 'SmokeSnaps'
285285
split_number: ${{ matrix.split }}
286-
total_splits: 3
286+
total_splits: 4
287287
changed_files: ${{ inputs.changed_files }}
288288
build_type: 'main'
289289
metamask_environment: 'qa'
@@ -295,16 +295,16 @@ jobs:
295295
if: ${{ !cancelled() && inputs.selected_tags != '[]' && inputs.selected_tags != '["FlaskBuildTests"]' }}
296296
needs:
297297
- confirmations-ios-smoke
298-
- trade-ios-smoke
298+
- swap-ios-smoke
299+
- stake-ios-smoke
299300
- perps-ios-smoke
300301
- wallet-platform-ios-smoke
301302
- identity-ios-smoke
302303
- accounts-ios-smoke
303304
- network-abstraction-ios-smoke
304305
- network-expansion-ios-smoke
305306
- prediction-market-ios-smoke
306-
- card-ios-smoke
307-
- ramps-ios-smoke
307+
- money-ios-smoke
308308
- multichain-api-ios-smoke
309309
- seedless-onboarding-ios-smoke
310310
- browser-ios-smoke

bitrise.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -383,8 +383,8 @@ stages:
383383
# - run_tag_smoke_accounts_android: {}
384384
# - run_tag_smoke_performance_ios: {}
385385
# - run_tag_smoke_performance_android: {}
386-
- run_tag_smoke_card_ios: {}
387-
# - run_tag_smoke_card_android: {}
386+
- run_tag_smoke_money_ios: {}
387+
# - run_tag_smoke_money_android: {}
388388
# The entire workflow is disabled as Android runs on GHA and iOS was already skipped due to a regression
389389
# run_smoke_e2e_performance_ios_android_stage:
390390
# workflows:
@@ -450,8 +450,8 @@ stages:
450450
- run_tag_smoke_multichain_api_ios: {}
451451
- run_tag_smoke_accounts_ios: {}
452452
- run_tag_smoke_accounts_android: {}
453-
- run_tag_smoke_card_ios: {}
454-
- run_tag_smoke_card_android: {}
453+
- run_tag_smoke_money_ios: {}
454+
- run_tag_smoke_money_android: {}
455455
build_regression_e2e_ios_gns_disabled_stage:
456456
abort_on_fail: true
457457
workflows:
@@ -1128,7 +1128,7 @@ workflows:
11281128
- android_e2e_test
11291129
run_trade_swimlane_ios_smoke:
11301130
envs:
1131-
- TEST_SUITE_TAG: '.*SmokeTrade.*'
1131+
- TEST_SUITE_TAG: '.*(SmokeSwap|SmokeStake).*'
11321132
after_run:
11331133
- ios_e2e_test
11341134
run_trade_swimlane_android_smoke:
@@ -1137,7 +1137,7 @@ workflows:
11371137
stack: linux-docker-android-22.04
11381138
machine_type_id: elite-xl
11391139
envs:
1140-
- TEST_SUITE_TAG: '.*SmokeTrade.*'
1140+
- TEST_SUITE_TAG: '.*(SmokeSwap|SmokeStake).*'
11411141
after_run:
11421142
- android_e2e_test
11431143
run_ios_api_specs:
@@ -1227,18 +1227,18 @@ workflows:
12271227
- TEST_SUITE_TAG: 'SmokeAccounts'
12281228
after_run:
12291229
- android_e2e_test
1230-
run_tag_smoke_card_ios:
1230+
run_tag_smoke_money_ios:
12311231
envs:
1232-
- TEST_SUITE_TAG: 'SmokeCard'
1232+
- TEST_SUITE_TAG: '.*SmokeMoney.*'
12331233
after_run:
12341234
- ios_e2e_test
1235-
run_tag_smoke_card_android:
1235+
run_tag_smoke_money_android:
12361236
meta:
12371237
bitrise.io:
12381238
stack: linux-docker-android-22.04
12391239
machine_type_id: elite-xl
12401240
envs:
1241-
- TEST_SUITE_TAG: 'SmokeCard'
1241+
- TEST_SUITE_TAG: '.*SmokeMoney.*'
12421242
after_run:
12431243
- android_e2e_test
12441244
android_e2e_build:

tests/smoke/card/card-button.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import WalletView from '../../page-objects/wallet/WalletView';
2-
import { SmokeCard } from '../../tags';
2+
import { SmokeMoney } from '../../tags';
33
import Assertions from '../../framework/Assertions';
44
import { loginToApp } from '../../flows/wallet.flow';
55
import { withFixtures } from '../../framework/fixtures/FixtureHelper';
@@ -9,7 +9,7 @@ import CardHomeView from '../../page-objects/Card/CardHomeView';
99
import { CustomNetworks } from '../../resources/networks.e2e';
1010
import { cardButtonExpectations } from '../../helpers/analytics/expectations/card-button.analytics';
1111

12-
describe(SmokeCard('Card NavBar Button'), () => {
12+
describe(SmokeMoney('Card NavBar Button'), () => {
1313
beforeEach(async () => {
1414
jest.setTimeout(150000);
1515
});

tests/smoke/card/card-home-add-funds.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import WalletView from '../../page-objects/wallet/WalletView';
2-
import { SmokeCard } from '../../tags';
2+
import { SmokeMoney } from '../../tags';
33
import Assertions from '../../framework/Assertions';
44
import { loginToApp } from '../../flows/wallet.flow';
55
import { withFixtures } from '../../framework/fixtures/FixtureHelper';
@@ -9,7 +9,7 @@ import CardHomeView from '../../page-objects/Card/CardHomeView';
99
import { CustomNetworks } from '../../resources/networks.e2e';
1010
import { cardHomeAddFundsExpectations } from '../../helpers/analytics/expectations/card-home-add-funds.analytics';
1111

12-
describe(SmokeCard('CardHome - Add Funds'), () => {
12+
describe(SmokeMoney('CardHome - Add Funds'), () => {
1313
beforeEach(async () => {
1414
jest.setTimeout(150000);
1515
});

tests/smoke/ramps/deeplink-to-buy-flow-with-unsupported-network.failing.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import TestHelpers from '../../helpers';
22
import { loginToApp } from '../../flows/wallet.flow';
33
import { withFixtures } from '../../framework/fixtures/FixtureHelper';
4-
import { SmokeRamps } from '../../tags';
4+
import { SmokeMoney } from '../../tags';
55
import FixtureBuilder from '../../framework/fixtures/FixtureBuilder';
66
import BuyGetStartedView from '../../page-objects/Ramps/BuyGetStartedView';
77
import Assertions from '../../framework/Assertions';
@@ -18,7 +18,7 @@ import { setupRemoteFeatureFlagsMock } from '../../api-mocking/helpers/remoteFea
1818

1919
// This test is failing because we do not have any UI related to navigating to an unsupported network
2020
// We shall update once there is a decision on what that UI looks like.
21-
describe(SmokeRamps('Buy Crypto Deeplinks - Unsupported Network'), () => {
21+
describe(SmokeMoney('Buy Crypto Deeplinks - Unsupported Network'), () => {
2222
beforeAll(async () => {
2323
await TestHelpers.reverseServerPort();
2424
});

0 commit comments

Comments
 (0)