mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
UI Tests fixes. (#1322)
* Fix broken UI tests and update snapshots. * Tweak workflow. * Update schedule and zip the result bundle.
This commit is contained in:
parent
3ff257c075
commit
dff18d7851
2
.github/workflows/integration-tests.yml
vendored
2
.github/workflows/integration-tests.yml
vendored
@ -2,7 +2,7 @@ name: Integration tests
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 * * * *'
|
||||
- cron: '0 6,18 * * *'
|
||||
|
||||
workflow_dispatch:
|
||||
|
||||
|
4
.github/workflows/ui_tests.yml
vendored
4
.github/workflows/ui_tests.yml
vendored
@ -8,12 +8,12 @@ on:
|
||||
required: false
|
||||
|
||||
schedule:
|
||||
- cron: '0 0 * * 1-5'
|
||||
- cron: '0 0,12 * * 1-5'
|
||||
|
||||
jobs:
|
||||
tests:
|
||||
name: Tests
|
||||
runs-on: macos-13
|
||||
runs-on: perf-only
|
||||
|
||||
concurrency:
|
||||
# When running on develop, use the sha to allow all runs of this workflow to run concurrently.
|
||||
|
@ -328,10 +328,11 @@ class MockScreen: Identifiable {
|
||||
let parameters = SessionVerificationScreenCoordinatorParameters(sessionVerificationControllerProxy: sessionVerificationControllerProxy)
|
||||
return SessionVerificationScreenCoordinator(parameters: parameters)
|
||||
case .userSessionScreen:
|
||||
let navigationSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: SplashScreenCoordinator())
|
||||
let navigationSplitCoordinator = NavigationSplitCoordinator(placeholderCoordinator: PlaceholderScreenCoordinator())
|
||||
|
||||
let clientProxy = MockClientProxy(userID: "@mock:client.com", roomSummaryProvider: MockRoomSummaryProvider(state: .loaded(.mockRooms)))
|
||||
ServiceLocator.shared.settings.migratedAccounts[clientProxy.userID] = true
|
||||
ServiceLocator.shared.settings.hasShownWelcomeScreen = true
|
||||
|
||||
let coordinator = UserSessionFlowCoordinator(userSession: MockUserSession(clientProxy: clientProxy, mediaProvider: MockMediaProvider()),
|
||||
navigationSplitCoordinator: navigationSplitCoordinator,
|
||||
|
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.invites-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.invites-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.invites-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/en-GB-iPhone-14.invites-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.invites-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.invites-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPad-9th-generation.userSessionScreen-1.png
(Stored with Git LFS)
Binary file not shown.
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.invites-1.png
(Stored with Git LFS)
BIN
UITests/Sources/__Snapshots__/Application/pseudo-iPhone-14.invites-1.png
(Stored with Git LFS)
Binary file not shown.
@ -110,6 +110,9 @@ lane :unit_tests do
|
||||
end
|
||||
|
||||
lane :ui_tests do |options|
|
||||
# Use a fresh simulator state to ensure hardware keyboard isn't attached.
|
||||
reset_simulator_contents()
|
||||
|
||||
create_simulator_if_necessary(
|
||||
name: "iPad (9th generation)",
|
||||
type: "com.apple.CoreSimulator.SimDeviceType.iPad-9th-generation"
|
||||
@ -138,6 +141,14 @@ lane :ui_tests do |options|
|
||||
scheme: "UITests",
|
||||
binary_basename: "ElementX.app"
|
||||
)
|
||||
|
||||
# Zip the result bundle for faster upload.
|
||||
zip(
|
||||
path: "./fastlane/test_output/UITests.xcresult",
|
||||
output_path: "./fastlane/test_output/UITests.xcresult.zip"
|
||||
)
|
||||
# Shell working directory is already inside the fastlane dir.
|
||||
sh("rm -rf ./test_output/UITests.xcresult")
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user