-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added an E2E test for pre-loaded views instrumentation
- Loading branch information
Robert
committed
Jan 25, 2024
1 parent
9ae3e02
commit 00bd0e1
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
38 changes: 38 additions & 0 deletions
38
features/fixtures/ios/Scenarios/AutoInstrumentPreLoadedViewLoadScenario.swift
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// AutoInstrumentPreLoadedViewLoadScenario.swift | ||
// Fixture | ||
// | ||
// Created by Robert Bartoszewski on 25/01/2024. | ||
// | ||
|
||
import Foundation | ||
|
||
import UIKit | ||
|
||
@objcMembers | ||
class AutoInstrumentPreLoadedViewLoadScenario: Scenario { | ||
|
||
override func configure() { | ||
super.configure() | ||
config.autoInstrumentViewControllers = true | ||
} | ||
|
||
override func run() { | ||
let viewController = AutoInstrumentPreLoadedViewLoadScenario_ViewController() | ||
_ = viewController.view | ||
Thread.sleep(forTimeInterval: 1.5) | ||
UIApplication.shared.windows[0].rootViewController!.present( | ||
viewController, animated: true) | ||
} | ||
} | ||
|
||
class AutoInstrumentPreLoadedViewLoadScenario_ViewController: UIViewController { | ||
|
||
override func loadView() { | ||
let label = UILabel() | ||
label.backgroundColor = .white | ||
label.textAlignment = .center | ||
label.text = String(describing: type(of: self)) | ||
view = label | ||
} | ||
} |