Skip to content

Commit

Permalink
Merge remote-tracking branch 'stf/main' into consistent-account-colors
Browse files Browse the repository at this point in the history
  • Loading branch information
Miki-Session committed Jan 7, 2025
2 parents 4fecfda + b9e833c commit 5337172
Show file tree
Hide file tree
Showing 85 changed files with 572 additions and 330 deletions.
3 changes: 2 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export default tseslint.config(
},
{
rules: {
'no-unused-vars': 'off',
'no-unused-vars': 'off', // we have @typescript-eslint/no-unused-vars enabled below
'no-else-return': 'error',
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-unsafe-member-access': 'off',
'@typescript-eslint/no-explicit-any': 'off',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "session-appium",
"version": "1.0.0",
"scripts": {
"lint": "yarn prettier . --write && yarn eslint .",
"lint": "yarn prettier . --write --cache && yarn eslint . --cache ",
"lint-check": "yarn prettier . --check && yarn eslint .",
"tsc": "tsc",
"tsc-watch": "tsc -w",
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/community_tests_image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ async function sendImageCommunityiOS(platform: SupportedPlatformsType) {
const testImageMessage = `Image message + ${new Date().getTime()}`;
// Create user A and user B
const [Alice, Bob] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, Alice, device2, Bob);
await Promise.all([device1.navigateBack(), device2.navigateBack()]);
Expand All @@ -35,8 +35,8 @@ async function sendImageCommunityAndroid(platform: SupportedPlatformsType) {
const testMessage = `Testing sending images to communities + ${time}`;
// Create user A and user B
const [Alice] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
const replyMessage = `Replying to image from ${Alice.userName} in community ${testCommunityName} + ${time}`;
await Promise.all([
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/community_tests_join.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ async function joinCommunityTest(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
const testMessage = `Test message + ${new Date().getTime()}`;
// Create user A and user B
await linkedDevice(device1, device2, USERNAME.ALICE, platform);
await linkedDevice(device1, device2, USERNAME.ALICE);
await joinCommunity(device1, testCommunityLink, testCommunityName);
await device1.onIOS().scrollToBottom(platform);
await device1.sendMessage(testMessage);
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/disappear_after_read.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ async function disappearAfterRead(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
const testMessage = 'Checking disappear after read is working';
const mode: DisappearModes = 'read';
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/disappear_after_send.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ async function disappearAfterSend(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
const mode: DisappearModes = 'send';
const testMessage = `Checking disappear after ${mode} is working`;
Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/disappear_after_send_groups.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async function disappearAfterSendGroups(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
// Create contact between User A and User B
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
Expand Down
2 changes: 1 addition & 1 deletion run/test/specs/disappear_after_send_note_to_self.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bothPlatformsIt('Disappear after send note to self', 'medium', disappearAfterSen
async function disappearAfterSendNoteToSelf(platform: SupportedPlatformsType) {
const { device } = await openAppOnPlatformSingleDevice(platform);
const testMessage = `Testing disappearing messages in Note to Self`;
const userA = await newUser(device, USERNAME.ALICE, platform);
const userA = await newUser(device, USERNAME.ALICE);
const controlMode: DisappearActions = 'sent';
const time = DISAPPEARING_TIMES.THIRTY_SECONDS;
// Send message to self to bring up Note to Self conversation
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/disappear_after_send_off_1o1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ bothPlatformsIt('Disappear after send off 1o1', 'high', disappearAfterSendOff1o1

async function disappearAfterSendOff1o1(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
const Alice = await linkedDevice(device1, device3, USERNAME.ALICE, platform);
const Alice = await linkedDevice(device1, device3, USERNAME.ALICE);
const mode: DisappearModes = 'send';
const Bob = await newUser(device2, USERNAME.BOB, platform);
const Bob = await newUser(device2, USERNAME.BOB);
const controlMode: DisappearActions = 'sent';
const time = DISAPPEARING_TIMES.THIRTY_SECONDS;
// Create user A and user B
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/disappearing_call.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async function disappearingCallMessage1o1Ios(platform: SupportedPlatformsType) {

// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down Expand Up @@ -84,8 +84,8 @@ async function disappearingCallMessage1o1Android(platform: SupportedPlatformsTyp
const time = DISAPPEARING_TIMES.THIRTY_SECONDS;
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/disappearing_community_invite.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ async function disappearingCommunityInviteMessage1o1Ios(platform: SupportedPlatf
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down Expand Up @@ -69,8 +69,8 @@ async function disappearingCommunityInviteMessage1o1Android(platform: SupportedP
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);

Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/disappearing_gif.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ async function disappearingGifMessage1o1Ios(platform: SupportedPlatformsType) {
const testMessage = "Testing disappearing messages for GIF's";
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down Expand Up @@ -56,8 +56,8 @@ async function disappearingGifMessage1o1Android(platform: SupportedPlatformsType

// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/disappearing_image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async function disappearingImageMessage1o1(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/disappearing_link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async function disappearingLinkMessage1o1Ios(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down Expand Up @@ -72,8 +72,8 @@ async function disappearingLinkMessage1o1Android(platform: SupportedPlatformsTyp
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
4 changes: 2 additions & 2 deletions run/test/specs/disappearing_video.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async function disappearingVideoMessage1o1(platform: SupportedPlatformsType) {
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/disappearing_voice.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ async function disappearingVoiceMessage1o1Ios(platform: SupportedPlatformsType)
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down Expand Up @@ -49,8 +49,8 @@ async function disappearingVoiceMessage1o1Android(platform: SupportedPlatformsTy
const { device1, device2 } = await openAppTwoDevices(platform);
// Create user A and user B
const [userA, userB] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
]);
await newContact(platform, device1, userA, device2, userB);
await setDisappearingMessage(platform, device1, ['1:1', timerType, time], device2);
Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/group_disappearing_messages_gif.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async function disappearingGifMessageGroup(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create user A and user B
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
await setDisappearingMessage(platform, device1, ['Group', timerType, time]);
Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/group_disappearing_messages_image.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async function disappearingImageMessageGroup(platform: SupportedPlatformsType) {
const timerType = 'Disappear after send option';
// Create user A and user B
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);

Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/group_disappearing_messages_link.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async function disappearingLinkMessageGroup(platform: SupportedPlatformsType) {
const testLink = `https://getsession.org/`;
// Create user A and user B
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
await setDisappearingMessage(platform, device1, ['Group', timerType, time]);
Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/group_disappearing_messages_video.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ async function disappearingVideoMessageGroup(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create user A and user B
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
await setDisappearingMessage(platform, device1, ['Group', timerType, time]);
Expand Down
6 changes: 3 additions & 3 deletions run/test/specs/group_disappearing_messages_voice.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ async function disappearingVoiceMessageGroup(platform: SupportedPlatformsType) {
const timerType = 'Disappear after send option';
// Create user A and user B
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
await setDisappearingMessage(platform, device1, ['Group', timerType, time]);
Expand Down
8 changes: 4 additions & 4 deletions run/test/specs/group_message_delete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ async function deleteMessageGroup(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
// Create contact between User A and User B
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
Expand All @@ -42,7 +42,7 @@ async function deleteMessageGroup(platform: SupportedPlatformsType) {
.onAndroid()
.checkModalStrings(
englishStripped('deleteMessage').withArgs({ count: 1 }).toString(),
englishStripped('deleteMessageConfirm').toString()
englishStripped('deleteMessageConfirm').withArgs({ count: 1 }).toString()
);
// Select 'Delete for me'
await device1.clickOnElementAll(new DeleteMessageLocally(device1));
Expand Down
12 changes: 6 additions & 6 deletions run/test/specs/group_message_document.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ async function sendDocumentGroupiOS(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
const testMessage = 'Testing-document-1';
const replyMessage = `Replying to document from ${userA.userName}`;
Expand Down Expand Up @@ -51,9 +51,9 @@ async function sendDocumentGroupAndroid(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
// Create contact between User A and User B
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
Expand Down
12 changes: 6 additions & 6 deletions run/test/specs/group_message_gif.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ async function sendGifGroupiOS(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
const testMessage = 'Testing-GIF-1';
const replyMessage = `Replying to GIF from ${userA.userName}`;
Expand Down Expand Up @@ -55,9 +55,9 @@ async function sendGifGroupAndroid(platform: SupportedPlatformsType) {
const { device1, device2, device3 } = await openAppThreeDevices(platform);
// Create users A, B and C
const [userA, userB, userC] = await Promise.all([
newUser(device1, USERNAME.ALICE, platform),
newUser(device2, USERNAME.BOB, platform),
newUser(device3, USERNAME.CHARLIE, platform),
newUser(device1, USERNAME.ALICE),
newUser(device2, USERNAME.BOB),
newUser(device3, USERNAME.CHARLIE),
]);
// Create contact between User A and User B
await createGroup(platform, device1, userA, device2, userB, device3, userC, testGroupName);
Expand Down
Loading

0 comments on commit 5337172

Please sign in to comment.