Skip to content

Comments

feat: pro tests #96

Draft
Miki-Session wants to merge 32 commits intodevfrom
feat/pro
Draft

feat: pro tests #96
Miki-Session wants to merge 32 commits intodevfrom
feat/pro

Conversation

@Miki-Session
Copy link
Collaborator

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Session Pro–related test coverage and supporting utilities/locators to exercise Pro CTAs, longer message limits, animated profile pictures, and recovery-password banner behavior across Android/iOS QA runs.

Changes:

  • Introduces Pro test utilities (CTA config helpers + dev-backend “make account Pro” helper) and expands DeviceWrapper to support CTA assertions, paste-based input, and gesture offsets.
  • Adds/updates Playwright specs to cover Pro/non-Pro flows (animated DP, longer message limits, recovery banner) and refreshes various locators/IDs and test constants.
  • Refactors shared constants/types (community configs, iOS capability context, accessibility/id unions) and updates test media + LFS tracking.

Reviewed changes

Copilot reviewed 49 out of 52 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/create_ios_simulators.ts Adds animated GIF to seeded simulator media set.
run/types/tuple.d.ts Removes unused Tuple type definitions.
run/types/testing.ts Expands selector/id/xpath unions and centralizes Coordinates type.
run/types/allure.ts Adds “Recovery Password” suite option.
run/types/DeviceWrapper.ts Adds CTA helpers, paste-input mode, long-press offset support, attribute asserts, animated-element check, and various locator updates.
run/test/utils/utilities.ts Ensures app restarts land back on home screen.
run/test/utils/test_setup.ts Removes obsolete manual test-setup notes.
run/test/utils/open_app.ts Uses shared IOSTestContext from iOS capabilities module.
run/test/utils/mock_pro.ts New helper to register accounts as Pro against dev backend.
run/test/utils/create_account.ts Updates recovery phrase retrieval flow via Recovery Password settings.
run/test/utils/check_cta.ts New centralized CTA expected-string config by CTA type.
run/test/utils/capabilities_ios.ts Extends per-test iOS env overrides (install time + Pro flag).
run/test/specs/voice_calls.spec.ts Uses unified settings modal “Enable/Continue” locator.
run/test/specs/user_actions_share_to_session.spec.ts Adds Android-only “share within Session” test and title casing update.
run/test/specs/user_actions_animated_profile_picture.spec.ts New Pro/non-Pro animated profile picture coverage.
run/test/specs/slow_mode_background.spec.ts Adds verification for background-usage toggle state via attribute assertion.
run/test/specs/review_positive.spec.ts Updates rate-modal assertions to match new single-button behavior.
run/test/specs/recovery_banner.spec.ts New tests for recovery-password banner appearance/persistence rules (Android).
run/test/specs/message_voice.spec.ts Offsets long-press on voice message to avoid scrubber hit.
run/test/specs/message_length.spec.ts Adds Pro vs non-Pro message-length limit coverage and CTA/modal expectations.
run/test/specs/message_community_invitation.spec.ts Switches to communities constant source.
run/test/specs/linked_device_community_ban.spec.ts Switches to communities constant source (incl. roomName usage).
run/test/specs/group_message_voice.spec.ts Offsets long-press on voice message to avoid scrubber hit.
run/test/specs/disappearing_community_invite.spec.ts Switches to communities constant source.
run/test/specs/disappearing_call.spec.ts Uses unified settings modal “Enable” locator.
run/test/specs/cta_donate_time.spec.ts Migrates CTA assertions to device.checkCTA / verifyNoCTAShows.
run/test/specs/cta_donate_review.spec.ts Migrates CTA assertions and adds fallback click for Donate button.
run/test/specs/community_tests_join.spec.ts Switches to communities constant source and minor structure tweaks.
run/test/specs/community_tests_image.spec.ts Switches to communities constant source.
run/test/specs/community_requests_on.spec.ts Switches to communities constant source and restructures step.
run/test/specs/community_requests_off.spec.ts Switches to communities constant source and restructures step.
run/test/specs/community_emoji_react.spec.ts Switches to communities constant source and restructures step.
run/test/specs/community_ban.spec.ts Switches to communities constant source.
run/test/specs/app_disguise_set.spec.ts Formatting-only import wrapping.
run/test/media/animated_profile_picture.gif Adds animated DP media asset (LFS).
run/test/locators/settings.ts Adds unified “Enable/Continue” locator; updates Recovery Password menu item locator.
run/test/locators/index.ts Adds GIF media locator; updates blocked contacts/read-receipts locators; improves locator description trimming.
run/test/locators/global.ts Updates CTA locators to new IDs + adds iOS CTA feature locator support.
run/test/locators/conversation.ts Switches community invitation locator text source to communities.
run/screenshots/android/settings_privacy.png Updates stored screenshot asset (LFS pointer).
run/screenshots/android/settings_notifications.png Updates stored screenshot asset (LFS pointer).
run/screenshots/android/settings_conversations.png Updates stored screenshot asset (LFS pointer).
run/screenshots/android/landingpage_new_account.png Updates stored screenshot asset (LFS pointer).
run/screenshots/android/cta_donate.png Updates stored screenshot asset (LFS pointer).
run/localizer/englishStrippedStr.ts Removes unused localizer helper.
run/constants/testfiles.ts Adds animatedProfilePicture constant.
run/constants/index.ts Adds PRO_BACKEND_URL constant.
run/constants/community.ts Consolidates community constants into communities config object.
pnpm-lock.yaml Adds noble deps and lock updates.
package.json Adds @noble/curves and @noble/hashes dependencies.
english_wordlist.txt Adds wordlist needed for mnemonic decoding in Pro helper.
appium_next.d.ts Removes unused Appium type shim.
.gitattributes Expands LFS tracking patterns to common binary types.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

run/test/locators/index.ts:336

  • The comment for ImageName says the content-desc begins with "GIF taken on", but the selector actually matches "Photo taken on". This is misleading for future maintenance; update the comment to match the selector (or vice versa if the selector is wrong).
      // Dates can wildly differ between emulators but it will begin with "GIF taken on" on Android
      case 'android':
        return {
          strategy: 'xpath',
          selector: `//*[starts-with(@content-desc, "Photo taken on")]`,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 54 out of 57 changed files in this pull request and generated 5 comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

export class GIFName extends LocatorsInterface {
public build(): StrategyExtractionObj {
switch (this.platform) {
// Dates can wildly differ between emulators but it will begin with "Photo taken on" on Android
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "Dates can wildly differ between emulators but it will begin with 'Photo taken on' on Android" but this class is for GIFName, not ImageName. The comment should say "GIF taken on" to match the actual selector.

Suggested change
// Dates can wildly differ between emulators but it will begin with "Photo taken on" on Android
// Dates can wildly differ between emulators but it will begin with "GIF taken on" on Android

Copilot uses AI. Check for mistakes.
Comment on lines +336 to +337
console.log(`\nRequest body:
${JSON.stringify(request, null, 2)}`);
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging the entire request body exposes sensitive cryptographic material (master signatures, rotating signatures, and public keys). While this is test code for a dev backend, consider logging only non-sensitive fields or adding a flag to control verbosity to prevent accidental exposure in CI logs.

Copilot uses AI. Check for mistakes.

this.log('Locator being used:', locator);

const el = await this.waitForTextElementToBePresent({ ...locator });
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The element el is retrieved on line 1856 but never used when paste === true. Consider moving the element retrieval to the else branch (lines 1875-1877) where it's actually needed to avoid unnecessary element lookups when pasting.

Copilot uses AI. Check for mistakes.
const [mnemonic, platform] = filteredArgs;

makeAccountPro({
user: { userName: '' as any, accountID: '', recoveryPhrase: mnemonic },
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The userName: '' as any type assertion bypasses type safety. Consider using a more specific type like '' as UserNameType or a test constant from the USERNAME enum to maintain type safety.

Copilot uses AI. Check for mistakes.
export class ImageName extends LocatorsInterface {
public build(): StrategyExtractionObj {
switch (this.platform) {
// Dates can wildly differ between emulators but it will begin with "GIF taken on" on Android
Copy link

Copilot AI Feb 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment says "Dates can wildly differ between emulators but it will begin with 'GIF taken on' on Android" but this class is for ImageName, not GIFName. The comment should say "Photo taken on" to match the actual selector.

Suggested change
// Dates can wildly differ between emulators but it will begin with "GIF taken on" on Android
// Dates can wildly differ between emulators but it will begin with "Photo taken on" on Android

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant