feat: Add XCUITest suite and CI workflow for issue #326#654
Draft
Mounil2005 wants to merge 1 commit into
Draft
Conversation
- Register ScribeUITests UI testing target in Scribe.xcodeproj by directly editing project.pbxproj (no Mac available for Xcode GUI) - Add ScribeUITests to the Scribe scheme TestAction - Add Tests/UITests/ with four XCTestCase files covering app launch, Installation tab (header, download card navigation, back nav, pop-to-root on tab retap), Settings tab, and About tab - Add .github/workflows/ci_uitest.yaml running UI tests on iPhone 16 / iOS 18.5 simulator, separate from the unit test workflow Resolves scribe-org#326 Signed-off-by: Mounil Kanakhara <mounilkankhara@gmail.com>
Thank you for the pull request! 💙🩵The Scribe-iOS team will do our best to address your contribution as soon as we can. The following are some important points:
Note Scribe uses Conventional Comments in reviews to make sure that communication is as clear as possible. |
Maintainer ChecklistThe following is a checklist for maintainers to make sure this process goes as well as possible. Feel free to address the points below yourself in further commits if you realize that actions are needed :) |
There was a problem hiding this comment.
First PR Commit Check
- The commit messages for the remote branch should be checked to make sure the contributor's email is set up correctly so that they receive credit for their contribution
- The contributor's name and icon in remote commits should be the same as what appears in the PR
- If there's a mismatch, the contributor needs to make sure that the email they use for GitHub matches what they have for
git config user.emailin their local Scribe-iOS repo (can be set withgit config --global user.email "GITHUB_EMAIL")
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[ ] This pull request is on a separate branch and not the main branch
[ ] I have tested my code with the xcodebuild and swiftlint --strict commands as directed in the testing section of the contributing guide
Description:
Adds a XCUITest suite and a dedicated CI workflow as requested in Add UI tests and CI process #326.
Scribe.xcodeproj/project.pbxproj and Scribe.xcscheme
The ScribeUITests UI testing bundle target was registered by directly editing project.pbxproj, since Xcode is required on macOS to do this through the GUI. All required sections were updated to mirror the structure of the existing Tests unit test target: PBXBuildFile, PBXFileReference, PBXGroup, PBXSourcesBuildPhase, PBXFrameworksBuildPhase, PBXResourcesBuildPhase, PBXContainerItemProxy, PBXTargetDependency, PBXNativeTarget, and XCBuildConfiguration. The target uses product type com.apple.product-type.bundle.ui-testing and TEST_TARGET_NAME = Scribe (the correct build setting for UI tests, as opposed to BUNDLE_LOADER/TEST_HOST used for unit tests). The Scribe.xcscheme was updated to include ScribeUITests in its TestAction so that xcodebuild build-for-testing picks it up.
Tests/UITests/
Four XCTestCase files covering the three main tabs:
6 .github/workflows/ci_uitest.yaml
:
A separate workflow from the existing ci_test.yaml. Uses xcodebuild build-for-testing followed by test-without-building -only-testing:ScribeUITests on an iPhone 16 / iOS 18.5 simulator. Triggered on PRs and pushes to main.
Testing note: The project file changes could not be validated locally with Xcode (no Mac). A maintainer with Mac access should open the project once to confirm Xcode accepts it before merging. Individual test assertions may need minor adjustment if any UI element accessibility labels differ from what the source code shows at runtime.
Related issue:
Closes #326