mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Improve user search using the GET profile (#754)
* Add getProfile in ClientProxyProtocol * Add fetchProfileIfNeeded * Refactor search * Update StartChatSuggestedUserCell UI * Add showProfilePopover action * Remove popover code * Add UTs in StartChatViewModelTests * Add UI tests * Cleanup code * Refine design * Fix design * Localise StartChatSuggestedUserCell * Update localisations * Update StartChatSuggestedUserCell design * Fix UT * Fix PR comments * Apply suggestions * Fix typo
This commit is contained in:
@@ -39,4 +39,22 @@ class StartChatScreenUITests: XCTestCase {
|
||||
XCTAssertEqual(app.collectionViews.firstMatch.cells.count, 1)
|
||||
app.assertScreenshot(.startChat, step: 2)
|
||||
}
|
||||
|
||||
func testSearchExactMatrixID() {
|
||||
let app = Application.launch(.startChatWithSearchResults)
|
||||
let searchField = app.searchFields.firstMatch
|
||||
searchField.clearAndTypeText("@a:b.com")
|
||||
XCTAssertFalse(app.staticTexts[A11yIdentifiers.startChatScreen.searchNoResults].waitForExistence(timeout: 1.0))
|
||||
XCTAssertEqual(app.collectionViews.firstMatch.cells.count, 2)
|
||||
app.assertScreenshot(.startChat, step: 3)
|
||||
}
|
||||
|
||||
func testSearchExactNotExistingMatrixID() {
|
||||
let app = Application.launch(.startChatSearchingInexistingID)
|
||||
let searchField = app.searchFields.firstMatch
|
||||
searchField.clearAndTypeText("@a:b.com")
|
||||
XCTAssertFalse(app.staticTexts[A11yIdentifiers.startChatScreen.searchNoResults].waitForExistence(timeout: 1.0))
|
||||
XCTAssertEqual(app.collectionViews.firstMatch.cells.count, 2)
|
||||
app.assertScreenshot(.startChat, step: 4)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user