Skip to content

Commit c6b141e

Browse files
committed
2 parents 8686990 + cc290d1 commit c6b141e

File tree

82 files changed

+1145
-919
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+1145
-919
lines changed

.github/workflows/android-regression.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ on:
2727
options:
2828
- session-foundation/session-appium
2929
- burtonemily/session-appium
30+
- Miki-Session/session-appium
3031
- bilb/session-appium
3132
default: session-foundation/session-appium
3233

@@ -69,15 +70,15 @@ on:
6970
default: '0'
7071

7172
PRINT_FAILED_TEST_LOGS:
72-
description: 'print failed test logs (1 to enable)'
73+
description: 'print failed test logs (1 to enable) - DONT DO FOR FULL REGRESSION (it crashes github)'
7374
required: true
7475
type: choice
7576
options:
7677
- '0'
7778
- '1'
7879
default: '0'
7980
PRINT_ONGOING_TEST_LOGS:
80-
description: 'print ongoing test logs (1 to enable)'
81+
description: 'print ongoing test logs (1 to enable) - DONT DO FOR FULL REGRESSION (it crashes github)'
8182
required: true
8283
type: choice
8384
options:
@@ -90,8 +91,6 @@ on:
9091
type: choice
9192
options:
9293
- '1'
93-
- '2'
94-
- '3'
9594
default: '1'
9695

9796
# concurrency:
@@ -109,7 +108,6 @@ jobs:
109108
PLAYWRIGHT_RETRIES_COUNT: ${{ github.event.inputs.PLAYWRIGHT_RETRIES_COUNT }}
110109
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
111110
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
112-
PLAYWRIGHT_WORKERS_COUNT: 1
113111
IOS_FIRST_SIMULATOR: '49651A15-3E14-4BAF-8B8E-0C630C35B8DD'
114112
IOS_SECOND_SIMULATOR: '7CA21E47-56AC-4B76-82A4-1D5199515F38'
115113
IOS_THIRD_SIMULATOR: 'FE1DEDC7-D530-41E7-9B38-86ED2DDB97CD'

.github/workflows/ios-regression.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ jobs:
108108
PRINT_FAILED_TEST_LOGS: ${{ github.event.inputs.PRINT_FAILED_TEST_LOGS }}
109109
PRINT_ONGOING_TEST_LOGS: ${{ github.event.inputs.PRINT_ONGOING_TEST_LOGS }}
110110
PLAYWRIGHT_WORKERS_COUNT: 3
111-
PLAYWRIGHT_REPEAT_COUNT: 1
111+
PLAYWRIGHT_REPEAT_COUNT: 0
112112
SDK_MANAGER_FULL_PATH: '/Users/emilyburton/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager'
113113
AVD_MANAGER_FULL_PATH: '/Users/emilyburton/Library/Android/sdk/cmdline-tools/latest/bin/avdmanager'
114114
ANDROID_SYSTEM_IMAGE: 'system-images;android-35;google_atd;x86_64'

eslint.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default tseslint.config(
3232
'@typescript-eslint/no-unsafe-assignment': 'off',
3333
'@typescript-eslint/no-redundant-type-constituents': 'off',
3434
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
35+
quotes: ['error', 'single', { avoidEscape: true, allowTemplateLiterals: true }],
3536
'@typescript-eslint/no-unused-vars': [
3637
'error',
3738
{

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ require('source-map-support').install = () => {};
1515

1616
export default defineConfig({
1717
timeout: 480000,
18-
// globalTimeout: 12800000, // extends timeout to run full suite with 3 retries
18+
globalTimeout: 18000000, // extends timeout to 5 hours run full suite with 3 retries
1919
reporter: [useSessionReporter ? ['./sessionReporter.ts'] : ['list']],
2020
testDir: './run/test/specs',
2121
testIgnore: '*.js',

run/test/specs/community_tests_image.spec.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ import { newContact } from './utils/create_contact';
66
import { joinCommunity } from './utils/join_community';
77
import { SupportedPlatformsType, closeApp, openAppTwoDevices } from './utils/open_app';
88

9-
iosIt('Send image to community', 'medium', sendImageCommunityiOS);
10-
androidIt('Send image to community', 'medium', sendImageCommunityAndroid);
9+
iosIt('Send image to community', 'medium', sendImageCommunityiOS, true);
10+
androidIt('Send image to community', 'medium', sendImageCommunityAndroid, true);
11+
12+
// Tests skipped due to both platforms having unique issues, have made a ticket
13+
// to investigate further https://optf.atlassian.net/browse/QA-486
1114

1215
async function sendImageCommunityiOS(platform: SupportedPlatformsType) {
1316
const { device1, device2 } = await openAppTwoDevices(platform);
1417
const testMessage = 'Testing sending images to communities';
15-
const testImageMessage = `Image message + ${new Date().getTime()}`;
18+
const testImageMessage = `Image message + ${new Date().getTime()} - ${platform}`;
1619
// Create user A and user B
1720
const [Alice, Bob] = await Promise.all([
1821
newUser(device1, USERNAME.ALICE),
@@ -22,7 +25,7 @@ async function sendImageCommunityiOS(platform: SupportedPlatformsType) {
2225
await Promise.all([device1.navigateBack(), device2.navigateBack()]);
2326
await joinCommunity(device1, testCommunityLink, testCommunityName);
2427
await joinCommunity(device2, testCommunityLink, testCommunityName);
25-
await Promise.all([device1.scrollToBottom(platform), device2.scrollToBottom(platform)]);
28+
await Promise.all([device1.scrollToBottom(), device2.scrollToBottom()]);
2629
await device1.sendMessage(testMessage);
2730
await device1.sendImage(platform, testImageMessage, true);
2831
await device2.replyToMessage(Alice, testImageMessage);
@@ -32,7 +35,7 @@ async function sendImageCommunityiOS(platform: SupportedPlatformsType) {
3235
async function sendImageCommunityAndroid(platform: SupportedPlatformsType) {
3336
const { device1, device2 } = await openAppTwoDevices(platform);
3437
const time = await device1.getTimeFromDevice(platform);
35-
const testMessage = `Testing sending images to communities + ${time}`;
38+
const testMessage = `Testing sending images to communities + ${time} - ${platform}`;
3639
// Create user A and user B
3740
const [Alice] = await Promise.all([
3841
newUser(device1, USERNAME.ALICE),
@@ -44,11 +47,10 @@ async function sendImageCommunityAndroid(platform: SupportedPlatformsType) {
4447
joinCommunity(device2, testCommunityLink, testCommunityName),
4548
]);
4649
await device1.sendImageWithMessageAndroid(testMessage);
47-
await device2.scrollToBottom(platform);
50+
await device2.scrollToBottom();
4851
await device2.longPressMessage(testMessage);
4952
await device2.clickOnByAccessibilityID('Reply to message');
5053
await device2.sendMessage(replyMessage);
51-
await device1.onIOS().scrollToBottom(platform);
5254
await device1.waitForTextElementToBePresent({
5355
strategy: 'accessibility id',
5456
selector: 'Message body',

run/test/specs/community_tests_join.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ async function joinCommunityTest(platform: SupportedPlatformsType) {
1313
// Create user A and user B
1414
await linkedDevice(device1, device2, USERNAME.ALICE);
1515
await joinCommunity(device1, testCommunityLink, testCommunityName);
16-
await device1.onIOS().scrollToBottom(platform);
16+
await device1.onIOS().scrollToBottom();
1717
await device1.sendMessage(testMessage);
1818
// Has community synced to device 2?
1919
await device2.waitForTextElementToBePresent({

run/test/specs/disappear_after_read.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ async function disappearAfterRead(platform: SupportedPlatformsType) {
4040
strategy: 'accessibility id',
4141
selector: 'Message body',
4242
text: testMessage,
43+
maxWait: 5000,
4344
}),
4445
device2.hasElementBeenDeleted({
4546
strategy: 'accessibility id',
4647
selector: 'Message body',
4748
text: testMessage,
49+
maxWait: 5000,
4850
}),
4951
]);
5052
// Great success

run/test/specs/disappear_after_send.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@ async function disappearAfterSend(platform: SupportedPlatformsType) {
5858
strategy: 'accessibility id',
5959
selector: 'Message body',
6060
text: testMessage,
61+
maxWait: 5000,
6162
}),
6263
device2.hasElementBeenDeleted({
6364
strategy: 'accessibility id',
6465
selector: 'Message body',
6566
text: testMessage,
67+
maxWait: 5000,
6668
}),
6769
]);
6870

run/test/specs/disappear_after_send_note_to_self.spec.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { bothPlatformsIt } from '../../types/sessionIt';
22
import { DisappearActions, DISAPPEARING_TIMES, USERNAME } from '../../types/testing';
3+
import { EnterAccountID } from './locators/start_conversation';
34
import { sleepFor } from './utils';
45
import { newUser } from './utils/create_account';
56
import { closeApp, openAppOnPlatformSingleDevice, SupportedPlatformsType } from './utils/open_app';
@@ -16,10 +17,7 @@ async function disappearAfterSendNoteToSelf(platform: SupportedPlatformsType) {
1617
// Send message to self to bring up Note to Self conversation
1718
await device.clickOnByAccessibilityID('New conversation button');
1819
await device.clickOnByAccessibilityID('New direct message');
19-
await device.inputText(userA.accountID, {
20-
strategy: 'accessibility id',
21-
selector: 'Session id input box',
22-
});
20+
await device.inputText(userA.accountID, new EnterAccountID(device));
2321
await device.scrollDown();
2422
await device.clickOnByAccessibilityID('Next');
2523
await device.inputText('Creating note to self', {

run/test/specs/disappear_after_send_off_1o1.spec.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
DisappearModes,
77
USERNAME,
88
} from '../../types/testing';
9+
import { ConversationSettings } from './locators/conversation';
910
import {
1011
DisableDisappearingMessages,
1112
DisappearingMessagesMenuOption,
@@ -21,7 +22,7 @@ import { linkedDevice } from './utils/link_device';
2122
import { closeApp, openAppThreeDevices, SupportedPlatformsType } from './utils/open_app';
2223
import { setDisappearingMessage } from './utils/set_disappearing_messages';
2324

24-
bothPlatformsIt('Disappear after send off 1o1', 'high', disappearAfterSendOff1o1);
25+
bothPlatformsIt('Disappear after send off 1:1', 'high', disappearAfterSendOff1o1);
2526

2627
async function disappearAfterSendOff1o1(platform: SupportedPlatformsType) {
2728
const { device1, device2, device3 } = await openAppThreeDevices(platform);
@@ -51,8 +52,8 @@ async function disappearAfterSendOff1o1(platform: SupportedPlatformsType) {
5152
device3
5253
);
5354

54-
// Turned off disappearing messages on device 1
55-
await device1.clickOnElementAll({ strategy: 'accessibility id', selector: 'More options' });
55+
// Turn off disappearing messages on device 1
56+
await device1.clickOnElementAll(new ConversationSettings(device1));
5657
await device1.clickOnElementAll(new DisappearingMessagesMenuOption(device1));
5758
await device1.clickOnElementAll(new DisableDisappearingMessages(device1));
5859
await device1.clickOnElementAll(new SetDisappearMessagesButton(device1));
@@ -69,7 +70,7 @@ async function disappearAfterSendOff1o1(platform: SupportedPlatformsType) {
6970
await Promise.all([
7071
device1.disappearingControlMessage(disappearingMessagesTurnedOffYou),
7172
device2.disappearingControlMessage(disappearingMessagesTurnedOff),
72-
// device3.disappearingControlMessage(disappearingMessagesTurnedOffYou),
73+
device3.disappearingControlMessage(disappearingMessagesTurnedOffYou),
7374
]);
7475
// Follow setting on device 2
7576
await device2.clickOnElementAll(new FollowSettingsButton(device2));

0 commit comments

Comments
 (0)