Skip to content

Commit 57844c9

Browse files
committed
fix: address PR review comments
- Restore capacitor branch in byText() for WebView text node matching - Remove accidental it.only in 02_push.spec.ts - Move platform guard before waitForAppReady in 12_activity.spec.ts Made-with: Cursor
1 parent 782bc25 commit 57844c9

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

appium/tests/helpers/selectors.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,13 @@ export async function byTestId(id: string) {
224224
*/
225225
export async function byText(text: string, partial = false) {
226226
const platform = getPlatform();
227+
const sdkType = getSdkType();
228+
229+
if (sdkType === 'capacitor') {
230+
return partial
231+
? $(`//*[contains(text(), "${text}")]`)
232+
: $(`//*[text()="${text}"]`);
233+
}
227234

228235
if (platform === 'ios') {
229236
const op = partial ? 'CONTAINS' : '==';

appium/tests/specs/02_push.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ describe('Push Subscription', () => {
2222
expect(value).toBe('1');
2323
});
2424

25-
it.only('can send an image notification', async () => {
25+
it('can send an image notification', async () => {
2626
await checkNotification({
2727
buttonId: 'send_image_button',
2828
title: 'Image Notification',

appium/tests/specs/12_activity.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ async function checkActivity(options: { orderId?: string; status: string; messag
2626

2727
describe('Live Activities', () => {
2828
before(async function () {
29-
await waitForAppReady({ skipLogin: true });
3029
if (getPlatform() !== 'ios') {
3130
return this.skip();
3231
}
32+
await waitForAppReady({ skipLogin: true });
3333
await scrollToEl('live_activities_section');
3434
});
3535

0 commit comments

Comments
 (0)