You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Sources/XCAppTest/XCUIApplication+App.swift
+16-4Lines changed: 16 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,9 @@ extension XCUIApplication {
20
20
file:StaticString= #file,
21
21
line:UInt= #line
22
22
){
23
-
XCTAssertTrue(wait(for:.runningForeground, timeout:8),message()??"Application should be in foreground", file: file, line: line)
23
+
XCTContext.runActivity(named:"Assert \(self) is in foreground"){ _ in
24
+
XCTAssertTrue(wait(for:.runningForeground, timeout:8),message()??"Application should be in foreground", file: file, line: line)
25
+
}
24
26
}
25
27
26
28
/// Asserts that the application is not currently in foreground.
@@ -34,7 +36,15 @@ extension XCUIApplication {
34
36
file:StaticString= #file,
35
37
line:UInt= #line
36
38
){
37
-
XCAppTest.assert(condition:{ $0.state !=.runningForeground }, on:self, message:{message()??"Application should not be in foreground"}, file: file, line: line)
39
+
XCTContext.runActivity(named:"Assert \(self) is NOT in foreground"){ _ in
40
+
XCAppTest.assert(
41
+
condition:{ $0.state !=.runningForeground },
42
+
on:self,
43
+
message:{message()??"Application should not be in foreground"},
message()??"Element has incorrect placeholder value. Expected '\(String(describing: expectedPlaceholder))' but found '\(String(describing:self.value))'",
0 commit comments