Support for XCTestCase.addUIInterruptionMonitor #49
AlexTanabe
started this conversation in
Ideas
Replies: 1 comment 3 replies
-
CucumberSwift steps have an optional reference to their test case. You can call Example: Given("^some precondition$") { _, step in
// because the step is executing when this closure is called, testCase should not be nil.
step.testCase?.addInterruptionMonitor()
} |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I am integrating your solution in my project at the moment, and so far looks pretty nice.
However, before using CucumberSwift, we used plain XCTestCase and one of the functionalities we used was the
addUIInterruptionMonitor
method inside XCTestCase.This was being used to handle system dialogs and dismiss them if needed inside our UI Tests...
Is there any way of including this functionality inside CucumberSwift, similar to what you did with expectations?
If not, is there any alternative you might suggest me?
Thanks in advance!
P.S: In the meantime, I am thinking of using the XCTestObservation protocol methods of
testCaseWillStart
andtestCaseDidFinish
to get a reference to the current test case being executed, and use that inside my step definitions to add/remove interruption monitors.Beta Was this translation helpful? Give feedback.
All reactions