Skip to content

Commit 94a0944

Browse files
authored
Merge pull request #80 from session-foundation/dev
iOS 2.14.9, Android 1.30.3
2 parents e8aa35a + 41a0dc9 commit 94a0944

24 files changed

+1060
-1009
lines changed

eslint.config.mjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,11 @@ export default tseslint.config(
8989
'perfectionist/sort-named-imports': 'off',
9090
'perfectionist/sort-union-types': 'off',
9191
},
92+
},
93+
{
94+
files: ['run/test/specs/locators/*'],
95+
rules: {
96+
'perfectionist/sort-modules': 'error',
97+
},
9298
}
9399
);

run/localizer/locales.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ export type TokenSimpleNoArgs =
5656
'accountIdYoursDescription' |
5757
'actualSize' |
5858
'add' |
59+
'addAdminSingular' |
5960
'addAdminsDescription' |
6061
'adminCannotBeDemoted' |
6162
'adminCannotBeRemoved' |
@@ -864,6 +865,7 @@ export type TokenSimpleNoArgs =
864865
'quitButton' |
865866
'rateSession' |
866867
'rateSessionApp' |
868+
'rateUs' |
867869
'read' |
868870
'readReceipts' |
869871
'readReceiptsDescription' |
@@ -974,6 +976,8 @@ export type TokenSimpleNoArgs =
974976
'shareExtensionNoAccountError' |
975977
'shareGroupMessageHistory' |
976978
'shareToSession' |
979+
'sharingSupportMultipleMedia' |
980+
'sharingSupportMultipleMediaExcluded' |
977981
'show' |
978982
'showAll' |
979983
'showLess' |
@@ -1270,6 +1274,7 @@ export type TokensSimpleAndArgs = {
12701274
proUpgradingTosPrivacy: WithIcon,
12711275
processingRefundRequest: { platform: string },
12721276
rateSessionModalDescription: WithStoreVariant,
1277+
rateSessionModalDescriptionUpdated: WithStoreVariant,
12731278
refundNonOriginatorApple: { platform_account: string },
12741279
remainingCharactersOverTooltip: WithCount,
12751280
requestRefundPlatformWebsite: { platform: string, platform_account: string },
@@ -1558,6 +1563,7 @@ export type TokenSimpleWithArgs =
15581563
'proUpgradingTosPrivacy' |
15591564
'processingRefundRequest' |
15601565
'rateSessionModalDescription' |
1566+
'rateSessionModalDescriptionUpdated' |
15611567
'refundNonOriginatorApple' |
15621568
'remainingCharactersOverTooltip' |
15631569
'requestRefundPlatformWebsite' |
@@ -1671,6 +1677,9 @@ export const simpleDictionaryNoArgs: Record<
16711677
add: {
16721678
en: "Add",
16731679
},
1680+
addAdminSingular: {
1681+
en: "Add Admin",
1682+
},
16741683
addAdminsDescription: {
16751684
en: "Enter the Account ID of the user you are promoting to admin.<br/><br/>To add multiple users, enter each Account ID separated by a comma. Up to 20 Account IDs can be specified at a time.",
16761685
},
@@ -4095,6 +4104,9 @@ export const simpleDictionaryNoArgs: Record<
40954104
rateSessionApp: {
40964105
en: "Rate App",
40974106
},
4107+
rateUs: {
4108+
en: "Rate Us",
4109+
},
40984110
read: {
40994111
en: "Read",
41004112
},
@@ -4425,6 +4437,12 @@ export const simpleDictionaryNoArgs: Record<
44254437
shareToSession: {
44264438
en: "Share to Session",
44274439
},
4440+
sharingSupportMultipleMedia: {
4441+
en: "Sorry, Session only supports sharing multiple images and videos at once",
4442+
},
4443+
sharingSupportMultipleMediaExcluded: {
4444+
en: "Sharing only supports media. Non-media files have been excluded",
4445+
},
44284446
show: {
44294447
en: "Show",
44304448
},
@@ -5313,6 +5331,9 @@ export const simpleDictionaryWithArgs: Record<
53135331
},
53145332
rateSessionModalDescription: {
53155333
en: "We're glad you're enjoying Session, if you have a moment, rating us in the {storevariant} helps others discover private, secure messaging!",
5334+
},
5335+
rateSessionModalDescriptionUpdated: {
5336+
en: "Session runs no ads, sells no data, and answers only to its users. Your {storevariant} rating helps more people find messaging that actually respects their privacy.",
53165337
},
53175338
refundNonOriginatorApple: {
53185339
en: "Because you originally signed up for Session Pro via a different {platform_account}, you'll need to use that <b><span>{platform_account}</span></b> to update your Pro access.",

run/test/specs/check_avatar_color.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { ConversationSettings } from './locators/conversation';
66
import { ConversationItem } from './locators/home';
77
import { UserAvatar, UserSettings } from './locators/settings';
88
import { open_Alice1_Bob1_friends } from './state_builder';
9+
import { sleepFor } from './utils';
910
import { isSameColor } from './utils/check_colour';
1011
import { closeApp, SupportedPlatformsType } from './utils/open_app';
1112

@@ -40,6 +41,7 @@ async function avatarColor(platform: SupportedPlatformsType, testInfo: TestInfo)
4041
});
4142
await test.step(`Get Alice's avatar color on bob's device from the Conversation Settings avatar`, async () => {
4243
await bob1.clickOnElementAll(new ConversationItem(bob1, alice.userName));
44+
await sleepFor(500); // Wait for conversation to open
4345
bob1PixelColor = await bob1.getElementPixelColor(new ConversationSettings(bob1));
4446
});
4547
await test.step('Compare the avatar colors', () => {

run/test/specs/disappearing_link.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
OutgoingMessageStatusSent,
1313
SendButton,
1414
} from './locators/conversation';
15+
import { EnableLinkPreviewsModalButton } from './locators/global';
1516
import { open_Alice1_Bob1_friends } from './state_builder';
1617
import { sleepFor } from './utils';
1718
import { closeApp, SupportedPlatformsType } from './utils/open_app';
@@ -61,7 +62,7 @@ async function disappearingLinkMessage1o1Ios(platform: SupportedPlatformsType, t
6162
englishStrippedStr('linkPreviewsFirstDescription').toString()
6263
);
6364
});
64-
await alice1.clickOnByAccessibilityID('Enable');
65+
await alice1.clickOnElementAll(new EnableLinkPreviewsModalButton(alice1));
6566
// On iOS, Appium doesn't paste but type, and the link preview modal interrupts typing the link, the text must be deleted and typed again
6667
await alice1.deleteText(new MessageInput(alice1));
6768
await alice1.inputText(testLink, new MessageInput(alice1));
@@ -115,7 +116,7 @@ async function disappearingLinkMessage1o1Android(
115116
englishStrippedStr('linkPreviewsFirstDescription').toString()
116117
);
117118
});
118-
await alice1.clickOnByAccessibilityID('Enable');
119+
await alice1.clickOnElementAll(new EnableLinkPreviewsModalButton(alice1));
119120
// Preview takes a while to load
120121
await sleepFor(5000);
121122
await alice1.clickOnElementAll(new SendButton(alice1));

run/test/specs/group_disappearing_messages_link.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
OutgoingMessageStatusSent,
1313
SendButton,
1414
} from './locators/conversation';
15+
import { EnableLinkPreviewsModalButton } from './locators/global';
1516
import { open_Alice1_Bob1_Charlie1_friends_group } from './state_builder';
1617
import { sleepFor } from './utils';
1718
import { closeApp, SupportedPlatformsType } from './utils/open_app';
@@ -58,7 +59,7 @@ async function disappearingLinkMessageGroup(platform: SupportedPlatformsType, te
5859
);
5960
});
6061
// Accept link preview modal
61-
await alice1.clickOnByAccessibilityID('Enable');
62+
await alice1.clickOnElementAll(new EnableLinkPreviewsModalButton(alice1));
6263
// On iOS, Appium types so the link preview modal interrupts typing the link, must be deleted and typed again
6364
await alice1.onIOS().deleteText(new MessageInput(alice1));
6465
await alice1.onIOS().inputText(testLink, new MessageInput(alice1));

run/test/specs/group_message_link_preview.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
OutgoingMessageStatusSent,
1111
SendButton,
1212
} from './locators/conversation';
13+
import { EnableLinkPreviewsModalButton } from './locators/global';
1314
import { open_Alice1_Bob1_Charlie1_friends_group } from './state_builder';
1415
import { sleepFor } from './utils';
1516
import { closeApp, SupportedPlatformsType } from './utils/open_app';
@@ -52,7 +53,7 @@ async function sendLinkGroupiOS(platform: SupportedPlatformsType, testInfo: Test
5253
englishStrippedStr('linkPreviewsEnable').toString(),
5354
englishStrippedStr('linkPreviewsFirstDescription').toString()
5455
);
55-
await alice1.clickOnByAccessibilityID('Enable');
56+
await alice1.clickOnElementAll(new EnableLinkPreviewsModalButton(alice1));
5657
// No preview on first send
5758
await alice1.clickOnElementAll(new SendButton(alice1));
5859
await alice1.waitForTextElementToBePresent({
@@ -100,7 +101,7 @@ async function sendLinkGroupAndroid(platform: SupportedPlatformsType, testInfo:
100101
englishStrippedStr('linkPreviewsEnable').toString(),
101102
englishStrippedStr('linkPreviewsFirstDescription').toString()
102103
);
103-
await alice1.clickOnByAccessibilityID('Enable');
104+
await alice1.clickOnElementAll(new EnableLinkPreviewsModalButton(alice1));
104105
//wait for preview to generate
105106
await sleepFor(5000);
106107
// No preview on first send

run/test/specs/locators/browsers.ts

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,19 @@
11
import { LocatorsInterface } from '.';
22

3-
// SHARED LOCATORS
4-
export class URLInputField extends LocatorsInterface {
3+
export class ChromeNotificationsNegativeButton extends LocatorsInterface {
54
public build() {
65
switch (this.platform) {
76
case 'android':
87
return {
98
strategy: 'id',
10-
selector: 'com.android.chrome:id/url_bar',
9+
selector: 'com.android.chrome:id/negative_button',
1110
} as const;
1211
case 'ios':
13-
return {
14-
strategy: 'accessibility id',
15-
selector: 'URL',
16-
} as const;
12+
throw new Error('Unsupported platform');
1713
}
1814
}
1915
}
2016

21-
// ANDROID ONLY
2217
export class ChromeUseWithoutAnAccount extends LocatorsInterface {
2318
public build() {
2419
switch (this.platform) {
@@ -34,43 +29,45 @@ export class ChromeUseWithoutAnAccount extends LocatorsInterface {
3429
}
3530
}
3631

37-
export class ChromeNotificationsNegativeButton extends LocatorsInterface {
32+
export class SafariAddressBar extends LocatorsInterface {
3833
public build() {
3934
switch (this.platform) {
4035
case 'android':
36+
throw new Error('Unsupported platform');
37+
case 'ios':
4138
return {
42-
strategy: 'id',
43-
selector: 'com.android.chrome:id/negative_button',
39+
strategy: 'accessibility id',
40+
selector: 'TabBarItemTitle',
4441
} as const;
45-
case 'ios':
46-
throw new Error('Unsupported platform');
4742
}
4843
}
4944
}
5045

51-
// iOS ONLY
52-
export class SafariAddressBar extends LocatorsInterface {
46+
export class SafariShareButton extends LocatorsInterface {
5347
public build() {
5448
switch (this.platform) {
5549
case 'android':
5650
throw new Error('Unsupported platform');
5751
case 'ios':
5852
return {
5953
strategy: 'accessibility id',
60-
selector: 'TabBarItemTitle',
54+
selector: 'ShareButton',
6155
} as const;
6256
}
6357
}
6458
}
65-
export class SafariShareButton extends LocatorsInterface {
59+
export class URLInputField extends LocatorsInterface {
6660
public build() {
6761
switch (this.platform) {
6862
case 'android':
69-
throw new Error('Unsupported platform');
63+
return {
64+
strategy: 'id',
65+
selector: 'com.android.chrome:id/url_bar',
66+
} as const;
7067
case 'ios':
7168
return {
7269
strategy: 'accessibility id',
73-
selector: 'ShareButton',
70+
selector: 'URL',
7471
} as const;
7572
}
7673
}

0 commit comments

Comments
 (0)