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

fix: circleci doesn't have permissions (#34) #35

Merged
merged 1 commit into from
Sep 7, 2024

Conversation

hbk619
Copy link
Contributor

@hbk619 hbk619 commented Sep 7, 2024

Issue

Fixes #34

Details

CircleCI runs a process called '.machine-agent' which needs permissions to do all the things required for the test.

I created a variable to make it clearer what this path is for. The macos orb1 has an 'add-permission' command but it's hard coded to expect a bundle id, not a path to an executable so we can't use it.

Some permissions can be got from

  - macos/add-uitest-permissions
  - macos/add-safari-permissions
  - macos/add-voiceover-permissions

but not enough for a VoiceOver test

CheckList

  • Has been tested (where required).

CircleCI runs a process called '.machine-agent' which needs permissions to do all the things required for the test.

I created a variable to make it clearer what this path is for.
The macos orb[1] has an 'add-permission' command but it's hard coded to expect a bundle id, not a path to an executable so we can't use it.

Some permissions can be got from

      - macos/add-uitest-permissions
      - macos/add-safari-permissions
      - macos/add-voiceover-permissions

but not enough for a VoiceOver test

[1]: https://circleci.com/developer/orbs/orb/circleci/macos
@cmorten
Copy link
Contributor

cmorten commented Sep 7, 2024

Thanks @hbk619

The feedback loop as to success here won’t be great as this project doesn’t kick of a CircleCI test to check (perhaps one for future) - have you confirmed that these permissions will be sufficient?

Alternatively, it could be worth contributing to the macos/add-voiceover-permissions or macos/add-uitest-permissions (perhaps the latter for dnd as it impacts all ui tests)

See CircleCI-Public/macos-orb#15 as an example contribution (though an old one and repo has likely moved forward!)

@hbk619
Copy link
Contributor Author

hbk619 commented Sep 7, 2024

Thanks for the quick response! I've tested with Safari and screen recording but not other browsers. I didn't realise you were the author of add-voiceover-permissions, nice! Given the variety of permissions would it be better to modify the add-permission script to accept if it's a bundle or process that's being modified? Or does that lead to two places to maintain the list? I'm not sure it fits under "ui-testing" as I don't know if they're required for other types of UI testing as I've not tried anything else (e.g. Selenium tests), although as you said DND might which required kTCCServiceAppleEvents I think

@cmorten
Copy link
Contributor

cmorten commented Sep 7, 2024

Thanks for the quick response! I've tested with Safari and screen recording but not other browsers. I didn't realise you were the author of add-voiceover-permissions, nice! Given the variety of permissions would it be better to modify the add-permission script to accept if it's a bundle or process that's being modified? Or does that lead to two places to maintain the list? I'm not sure it fits under "ui-testing" as I don't know if they're required for other types of UI testing as I've not tried anything else (e.g. Selenium tests), although as you said DND might which required kTCCServiceAppleEvents I think

Maybe raise an issue with that repo and see what the maintainers suggest?

For now happy to have this here as have already got GitHub and GitLab specific permissions. Might have a think about whether add some feature detection or flags to specify CI specific configs in future.

@cmorten cmorten merged commit 85bbac2 into guidepup:main Sep 7, 2024
8 checks passed
@hbk619 hbk619 deleted the circle-ci-runner branch September 7, 2024 10:12
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.

CircleCI doesn't have permissions
2 participants