Skip to content

chore(UITest): ability to auto backend redirect - WPB-28604 - #5230

Merged
findms merged 4 commits into
developfrom
chore/ms-test-auto-backend-redirect-WPB-28604
Sep 16, 2026
Merged

findms merged 4 commits into
developfrom
chore/ms-test-auto-backend-redirect-WPB-28604

Conversation

@findms

@findms findms commented Sep 15, 2026

Copy link
Copy Markdown
Contributor
TaskWPB-28604 [iOS] Automate - TC-8965 As a user, I am able to auto backend redirect

Issue

Please describe the issue.

Optional: add details about technical approach, solutions etc.

Optional: reference dependencies to other pull requests etc.

UITest - able to auto backend redirect

Testing

Describe how to test.

Optional: attachments like images, videos, etc.

auto-redirect.mp4

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

Copilot AI lite review requested due to automatic review settings September 15, 2026 09:13
@findms findms changed the title chore: on-prem redirect test chore: As a user, I am able to auto backend redirect - WPB-28604 Sep 15, 2026
@findms findms changed the title chore: As a user, I am able to auto backend redirect - WPB-28604 chore: UITest - able to auto backend redirect - WPB-28604 Sep 15, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Two moderate unresolved findings affect backend URL configuration and cleanup error handling.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Adds an end-to-end UI test for on-premises login redirection, with page-model helpers and BackOffice domain management APIs.

Changes:

  • Adds staging domain setup, polling, and cleanup.
  • Adds redirect navigation and backend URL verification.
  • Improves proceed-button interaction reliability.
File summaries
File Summary
wire-ios/WireUITests/Pages/WelcomePage.swift Adds domain-based backend switching navigation.
wire-ios/WireUITests/Pages/SetCustomBackendPage.swift Adds backend URL lookup and reliable tap handling.
wire-ios/WireUITests/OnPremLoginRedirectTests.swift Adds the redirect test. Moderate (2 votes): uses the REST API base instead of the environment-provided deeplink/config URL. Moderate (1 vote): cleanup DELETE failures are discarded.
wire-ios/WireUITests/Helper/BackOffice.swift Adds domain configuration, polling, and deletion APIs.
Review details

Suppressed comments (1)

wire-ios/WireUITests/OnPremLoginRedirectTests.swift:31

  • operational_implications: These are the only cleanup calls for the shared staging domain, but both errors are discarded. A transient DELETE failure can leave the claimed domain and custom-backend entry in staging without failing or reporting the test, accumulating state across runs; surface the cleanup failure while still attempting both deletes instead of silently swallowing it.
            try? await backOffice.deleteCustomBackendDomain(claimedDomain, basicAuth: UserHelper.default.basicAuth())
            try? await backOffice.deleteDomainClaim(claimedDomain, basicAuth: UserHelper.default.basicAuth())
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread wire-ios/WireUITests/OnPremLoginRedirectTests.swift Outdated
@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Test Results

1 952 tests   1 925 ✅  2m 26s ⏱️
  305 suites     27 💤
    1 files        0 ❌

Results for commit 04fe675.

♻️ This comment has been updated with latest results.

Summary: workflow run #35078019257
Allure report (download zip): html-report-33442-chore_ms-test-auto-backend-redirect-WPB-28604

@findms
findms requested review from jullianm and netbe September 15, 2026 09:48

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Address the cleanup failure handling and confirmation-tap result before approval.

Review details

Suppressed comments (3)

Previously missed (1) — in code that hasn't changed since the last review.

wire-ios/WireUITests/OnPremLoginRedirectTests.swift:31

  • These try? calls hide cleanup failures. If a staging deletion fails transiently, the test can still pass while leaving the claimed domain and custom-backend record in the shared environment; please make teardown surface/aggregate cleanup errors and/or retry so test-created state cannot be silently leaked.

wire-ios/WireUITests/Pages/SetCustomBackendPage.swift:31

  • The new method uses Url in its name, while the surrounding test API consistently spells this acronym as URL (backendURL(for:) in EnvironmentVariables.swift:269 and targetBackendURL in OnPremLoginRedirectTests.swift:44). Rename it to backendURLValue and update the call site for a consistent page-model API.
    func backendUrlValue(containing url: URL) -> XCUIElement {

wire-ios/WireUITests/Pages/SetCustomBackendPage.swift:38

  • waitAndTap() returns false when the button never becomes hittable, but that result is ignored here. The method can therefore return a WelcomePage while the confirmation sheet is still presented, allowing callers to continue as if the redirect was confirmed; guard the result and throw before constructing the next page.
        proceedButton.waitAndTap()
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@netbe netbe changed the title chore: UITest - able to auto backend redirect - WPB-28604 chore(UITest): ability to auto backend redirect - WPB-28604 Sep 16, 2026

@netbe netbe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM:)

@findms
findms added this pull request to the merge queue Sep 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Sep 16, 2026
@findms
findms enabled auto-merge September 16, 2026 09:11
@findms
findms added this pull request to the merge queue Sep 16, 2026
Merged via the queue into develop with commit 9d5c801 Sep 16, 2026
11 checks passed
@findms
findms deleted the chore/ms-test-auto-backend-redirect-WPB-28604 branch September 16, 2026 09:48
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.

4 participants