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

UI Tests fixes. #1322

Merged
merged 4 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Integration tests

on:
schedule:
- cron: '0 * * * *'
- cron: '0 6,18 * * *'

workflow_dispatch:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ui_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion ElementX/Sources/UITests/UITestsAppCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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


Expand Down
Loading