Skip to content

Commit

Permalink
Merge pull request #9 from Darock-Studio/main
Browse files Browse the repository at this point in the history
Merge main UI Tests Update to NetworkFix feature
  • Loading branch information
WindowsMEMZ authored Nov 18, 2023
2 parents 550308d + bdb059a commit 5829cad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ jobs:

- name: Archive DarockBili App
run: |
xcodebuild -scheme DarockBili -configuration Debug DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath DarockBili_Debug.xcarchive clean archive CODE_SIGN_IDENTITY=""
xcodebuild -scheme DarockBili -configuration Release DEVELOPMENT_TEAM=B57D8PP775 -sdk 'iphoneos' -destination 'generic/platform=iOS' -archivePath DarockBili_Release.xcarchive clean archive CODE_SIGN_IDENTITY=""
xcodebuild -scheme 'DarockBili Watch App' -configuration Debug -archivePath DarockBili_Debug.xcarchive clean archive CODE_SIGN_IDENTITY=""
xcodebuild -scheme 'DarockBili Watch App' -configuration Release -archivePath DarockBili_Release.xcarchive clean archive CODE_SIGN_IDENTITY=""
- name: Export IPA
run: |
Expand Down
17 changes: 14 additions & 3 deletions DarockBili Watch App UI Tests/DarockBili_Watch_App_UI_Tests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,23 @@ final class DarockBili_Watch_App_UI_Tests: XCTestCase {
app.launch()

takeScreenshot(of: app, named: "Launch")

app.buttons["SuggestVideo"].firstMatch.tap()
sleep(1)
takeScreenshot(of: app, named: "RMVideo")
app.swipeUp()
sleep(1)
takeScreenshot(of: app, named: "RMVideoP2")
app.navigationBars.buttons.element(boundBy: 0).tap()
sleep(1)
app.otherElements["MainTabView"].swipeLeft()
sleep(1)
takeScreenshot(of: app, named: "PersonalCenter")
app.buttons["AppSettingsButton"].firstMatch.tap()

takeScreenshot(of: app, named: "PC")
sleep(1)
takeScreenshot(of: app, named: "SettingsMain")
app.buttons["以太网"].firstMatch.tap()
sleep(1)
takeScreenshot(of: app, named: "EthernetSetting")
}

func testLaunchPerformance() throws {
Expand Down
2 changes: 1 addition & 1 deletion DarockBili Watch App/InMain/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct MainView: View {
autoreleasepool {
ForEach(0...videos.count - 1, id: \.self) { i in
VideoCard(videos[i])
.accessibilityIdentifier(i == 0 ? "TestVideoCard" : "")
.accessibility(identifier: "SuggestVideo")
}
}
}
Expand Down

0 comments on commit 5829cad

Please sign in to comment.