Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLAT-5956] Ensure intended copy of Mac test fixture is run #1259

Merged
merged 1 commit into from
Dec 16, 2021

Conversation

nickdowell
Copy link
Contributor

@nickdowell nickdowell commented Dec 14, 2021

Goal

Prevent the wrong app bundle being run during E2E testing.

Changeset

The macOS test fixture now accepts a command line argument -register which will cause it to register itself with Launch Services, and (crucially) unregister all other copies of the app using the private _LSUnregisterURL API.

env.rb no longer moves the test fixture into /Applications - it will unzip if needed and register the app if found in the standard location of {repo}/features/fixtures/macos/output.

The fixture now prints its path in the log, to aid debugging in the future.

To run tests locally against a fixture built via Xcode, simply ensure that features/fixtures/macos/output is empty or missing.

Testing

Verified locally and via CI.

@github-actions
Copy link

Infer: No issues found 🎉

OCLint: No issues found 🎉

Bugsnag.framework binary size did not change - 1,253,528 bytes

Generated by 🚫 Danger

Copy link
Contributor

@twometresteve twometresteve left a comment

Choose a reason for hiding this comment

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

When I run this locally, the initial launch of the app stays up and I have to close it manually for the scenarios to start in anger.

However, everything seems to be ok on CI (I triggered a separate full run), so if you're happy then I'm happy.

@nickdowell nickdowell merged commit bbfb09c into next Dec 16, 2021
@nickdowell nickdowell deleted the nickdowell/register-mac-fixture branch December 16, 2021 08:44
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.

2 participants