Releases: treatwell/twuitests
Swift Package Manager support
Added Swift Package Manager support (#22) * Added Swift Package Manager support * Update README
Try - catch for `replace` and `update`
Add try
- catch
to replace and update methods.
Try - catch support
Add try - catch support in tests.
Custom HTTP created 201 response body
Add support for custom HTTP created 201 response body
Inject custom API mocks on app launch
In order to use custom API response mocks (with special data) we used
start(using: AppConfiguration())
app.replaceValues(
of: [
"result": "NOT_AUTHENTICATED"
],
in: Stub.Authentication.success
)
But API mocked responses were replaced only after next refresh/API call. So as a workaround we had to do additional UI actions like pull to refresh, closing and opening screens again and so on, just to get that API endpoint called again.
This PR adds nicer way to do that by introducing initiationClosure
param to start(using:)
So, now there is a way to do:
start(using: Configuration()) { app in
app.replaceValues(
of: [
"result": "NOT_AUTHENTICATED"
],
in: Stub.Authentication.success
)
}
.loginStep.authenticationStatusIsVisible()
.loginStep.authenticationStatusIs(equal: "NOT_AUTHENTICATED")
Using this closure we get our custom replaced API mocks right after UI Tests launches the app.
To better illustrate that, I have updated example app with few examples.
0.13: Merge pull request #16 from treatwell/Add-support-for-HTTP-201-created
Add created http status code
0.12: Merge pull request #15 from antranapp/change_protocol
Expose start
function to be used in tests for restart scenario.
Add scrollView swipe helpers
Merge pull request #13 from treatwell/Add-XCUIelement-find-method- Add XCUIElement find method
Tableview load checking
Add tableview loaded checking method
Check element if it exists on screen
0.9 Merge pull request #10 from treatwell/Add-check-for-is-element-hittab…