Skip to content

Commit 7aebeaf

Browse files
committed
chore: clean up
1 parent b9a9f21 commit 7aebeaf

File tree

8 files changed

+24
-39
lines changed

8 files changed

+24
-39
lines changed

.github/workflows/android-regression.yml

-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
name: Android regression tests
22
run-name: '${{ inputs.RISK }} regressions on: ${{ inputs.BRANCH_TO_CHECKOUT }} (${{ inputs.APPIUM_REPO }})'
33

4-
concurrency:
5-
group: ${{ github.workflow }}
6-
cancel-in-progress: true
7-
84
on:
95
workflow_dispatch:
106
inputs:

.github/workflows/ios-regression.yml

-5
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,6 @@ on:
7272
- '3'
7373
default: '3'
7474

75-
concurrency:
76-
group: ${{ github.workflow }}
77-
cancel-in-progress: true
78-
79-
8075
jobs:
8176
ios-regression:
8277
runs-on: [self-hosted, macOS]

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ yarn install --frozen # to install packages referenced from yarn.lock
8181
Then, choose an option:
8282

8383
```
84-
yarn build-and-test # Build typescript and run the tests
84+
yarn tsc # Build typescript files
8585
yarn run test # Run all the tests
8686
8787
Platform specific

package.json

+9-11
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66
"lint-check": "yarn prettier . --check && yarn eslint .",
77
"tsc": "tsc",
88
"tsc-watch": "tsc -w",
9-
"test": "npx playwright test --timeout 300000 ./run/test/specs/*.spec.ts --grep ",
10-
"test-no-retry": "_TESTING=1 npx playwright test --timeout 300000 ./run/test/specs/*.spec.ts --grep ",
11-
"test-one": "_TESTING=1 _FORCE_LOGS=0 npx playwright test --timeout 300000 ./run/test/**/*.spec.ts --grep",
12-
"test-udid": "_TESTING=1 npx playwright test UDID=$udid --timeout 300000 ./run/test/**/*.spec.ts --grep",
13-
"test-ios": "_TESTING=1 npx playwright test --timeout 400000 ./run/test/**/*.spec.ts --grep '@ios'",
14-
"test-android": "_TESTING=1 npx playwright test --timeout 300000 ./run/test/**/*.spec.ts --grep '@android'",
15-
"build-and-test": "yarn tsc && yarn test",
16-
"test-one-logs": "_TESTING=1 _FORCELOGS=1 npx playwright test --timeout 300000 --retries 0 ./run/test/**/*.spec.ts --grep",
17-
"test-parallel": "_TESTING=1 npx playwright test ./run/test/**/*.spec.ts --grep '@ios'",
18-
"test-high-risk-android": "_TESTING=1 npx playwright test --timeout 300000 ./run/test/**/*.spec.ts --grep '@android @high-risk'",
19-
"test-high-risk-ios": "_TESTING=1 npx playwright test --timeout 300000 ./run/test/**/*.spec.ts --grep '@ios @high-risk'",
9+
"test": "npx playwright test --grep ",
10+
"test-no-retry": "_TESTING=1 npx playwright test --grep ",
11+
"test-one": "_TESTING=1 _FORCE_LOGS=0 npx playwright test --grep",
12+
"test-udid": "_TESTING=1 npx playwright test UDID=$udid --grep",
13+
"test-ios": "_TESTING=1 npx playwright test --grep '@ios'",
14+
"test-android": "_TESTING=1 npx playwright test --grep '@android'",
15+
"test-one-logs": "_TESTING=1 _FORCELOGS=1 npx playwright test --retries 0 ./run/test/**/*.spec.ts --grep",
16+
"test-high-risk-android": "_TESTING=1 npx playwright test --grep '@android @high-risk'",
17+
"test-high-risk-ios": "_TESTING=1 npx playwright test --grep '@ios @high-risk'",
2018
"start-server": "./node_modules/.bin/appium server --use-drivers=uiautomator2,xcuitest --port 8110 --allow-cors"
2119
},
2220
"devDependencies": {

run/localizer/locales.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -550,7 +550,7 @@ export const simpleDictionary = {
550550
en: 'Ban User',
551551
args: undefined,
552552
},
553-
banbobanned: {
553+
banUserBanned: {
554554
en: 'User banned',
555555
args: undefined,
556556
},
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { bothPlatformsIt } from '../../types/sessionIt';
2-
import { closeApp, SupportedPlatformsType } from './utils/open_app';
2+
import { closeApp, openAppTwoDevices, SupportedPlatformsType } from './utils/open_app';
33
import { verifyElementScreenshot } from './utils/verify_screenshots';
44
import { EmptyLandingPageScreenshot } from './utils/screenshot_paths';
5-
import { open_Alice2 } from './state_builder';
5+
import { USERNAME } from '@session-foundation/qa-seeder';
6+
import { linkedDevice } from './utils/link_device';
67

78
bothPlatformsIt({
89
title: 'Landing page restore account',
@@ -13,14 +14,9 @@ bothPlatformsIt({
1314

1415
async function landingPageRestoreAccount(platform: SupportedPlatformsType) {
1516
// Creating a linked device is used as a shortcut to restore an account
16-
const {
17-
devices: { alice1, alice2 },
18-
} = await open_Alice2({ platform });
17+
const { device1: alice1, device2: alice2 } = await openAppTwoDevices(platform);
18+
await linkedDevice(alice1, alice2, USERNAME.ALICE);
1919
// Verify that the Session logo is shown on the landing page
20-
await verifyElementScreenshot(
21-
alice2,
22-
new EmptyLandingPageScreenshot(alice2),
23-
'restore_account'
24-
);
20+
await verifyElementScreenshot(alice2, new EmptyLandingPageScreenshot(alice2), 'restore_account');
2521
await closeApp(alice1, alice2);
2622
}

run/test/specs/linked_device.spec.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import { USERNAME } from '@session-foundation/qa-seeder';
12
import { bothPlatformsIt } from '../../types/sessionIt';
23
import { UserSettings } from './locators/settings';
3-
import { open_Alice2 } from './state_builder';
4-
import { SupportedPlatformsType, closeApp } from './utils/open_app';
4+
import { linkedDevice } from './utils/link_device';
5+
import { SupportedPlatformsType, closeApp, openAppTwoDevices } from './utils/open_app';
56

67
bothPlatformsIt({
78
title: 'Link device',
@@ -12,10 +13,9 @@ bothPlatformsIt({
1213

1314
async function linkDevice(platform: SupportedPlatformsType) {
1415
// Open server and two devices
15-
const {
16-
devices: { alice1, alice2 },
17-
prebuilt: { alice },
18-
} = await open_Alice2({ platform });
16+
const { device1: alice1, device2: alice2 } = await openAppTwoDevices(platform);
17+
// link device
18+
const alice = await linkedDevice(alice1, alice2, USERNAME.ALICE);
1919
// Check that 'Youre almost finished' reminder doesn't pop up on alice2
2020
await alice2.hasElementBeenDeleted({
2121
strategy: 'accessibility id',

run/test/specs/state_builder/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ export async function open_Alice1_Bob1_Charlie1_Unknown1({
206206
});
207207

208208
const seedPhrases = result.prebuilt.users.map(m => m.seedPhrase);
209-
await linkDevices(result.devices, seedPhrases);
209+
await linkDevices(result.devices.slice(0, -1), seedPhrases);
210210

211211
const formattedGroup = { group: result.prebuilt.group };
212212

0 commit comments

Comments
 (0)