mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Move search users into a dedicated service (#789)
* add users provider with test * add ui test for search users * add changelog * Update ElementX/Sources/Services/Users/UsersProvider.swift Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com> * add error handling in usersprovider * remove empty section * add search in invite users * add CancellableTask, add setup App Settings in UnitTest, screenshots * rename of UserDiscoveryService * Update ElementX/Sources/Other/Extensions/Publisher.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * new error management for User Discovery Service * Update ElementX/Sources/Other/CancellableTask.swift Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com> * Update ElementX/Sources/Services/Users/UserDiscoveryService.swift Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com> * fix invite users and start chat errors * use only one task to fetch user profile --------- Co-authored-by: Alfonso Grillo <alfogrillo@gmail.com> Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -26,7 +26,7 @@ class StartChatScreenUITests: XCTestCase {
|
||||
func testSearchWithNoResults() {
|
||||
let app = Application.launch(.startChat)
|
||||
let searchField = app.searchFields.firstMatch
|
||||
searchField.clearAndTypeText("Someone")
|
||||
searchField.clearAndTypeText("None")
|
||||
XCTAssert(app.staticTexts[A11yIdentifiers.startChatScreen.searchNoResults].waitForExistence(timeout: 1.0))
|
||||
app.assertScreenshot(.startChat, step: 1)
|
||||
}
|
||||
@@ -34,27 +34,9 @@ class StartChatScreenUITests: XCTestCase {
|
||||
func testSearchWithResults() {
|
||||
let app = Application.launch(.startChatWithSearchResults)
|
||||
let searchField = app.searchFields.firstMatch
|
||||
searchField.clearAndTypeText("Someone")
|
||||
searchField.clearAndTypeText("Bob")
|
||||
XCTAssertFalse(app.staticTexts[A11yIdentifiers.startChatScreen.searchNoResults].waitForExistence(timeout: 1.0))
|
||||
XCTAssertEqual(app.collectionViews.firstMatch.cells.count, 1)
|
||||
XCTAssertEqual(app.collectionViews.firstMatch.cells.count, 2)
|
||||
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(.startChatSearchingNonexistentID)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6296d533f3cdbe4d5f1045ea1ec6357fd96cb6a1599bd6f73f4b784203d32e46
|
||||
size 108578
|
||||
oid sha256:27f23d7385277433b757e7513bea0c6349c2df2cc1381fdd7ac562d4ae8a2679
|
||||
size 108566
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9941e41387b13e98a9f4ea200015a4df439395fa8284cb0f7786b39d1fb1109a
|
||||
size 100706
|
||||
oid sha256:f627692fab53a50a5cada0b7267d691d17d4dfe18973953ca3f5362f65902dde
|
||||
size 98917
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2576f456ae6a5e10d7df17031c1487a3607492533d4e9a64620fe186e8eacb8d
|
||||
size 136466
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:4cc5da4209e2b62cfd938b8a9c47c3bf59fe07eb8dcde1ad73b7f7ea9498f56c
|
||||
size 151050
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dca25597da470bcaffd8b27e14a3337e3f140a8a52d01bc615ed36fa244d5d56
|
||||
size 109818
|
||||
oid sha256:0ab1b76232611d7689f41a08377cab9602f358107922d36618fe547ddb34f523
|
||||
size 109825
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a69459351362fdce97b948e796bd1238a29d06f017c0ffd9e04dadc647fa4bb9
|
||||
size 133013
|
||||
oid sha256:b488f2fb2041325f0776e027ea202655adba51a0e12bdaf5ff07d8f4484f7b31
|
||||
size 133019
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f1293e87f1cf4c7cae4e836eaebd058393a958a471fd968b74181ed2098f544c
|
||||
size 118210
|
||||
oid sha256:bae5f65a07ef1ba6bc6b573b82f5cda1c4d565ed28c9663ea9a6fd9ffda1c87c
|
||||
size 113345
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:edcf7669efe5e3e0124de8b15bb0e7d12705f534a54ee2bbc7b6d6577fc15be2
|
||||
size 173595
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:130c4c3c1e6fc4b872ab1dff2c728bb90ffe695490ddebed3efd261d8900931a
|
||||
size 193286
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1a9795d7fea514d8e1c5ec71b7365dd6c228853e80c770046685bf1bf7117299
|
||||
size 133821
|
||||
oid sha256:c695db4e372c07c4f0b054673fab92138dbcbb14acf17dcd94541cd67d793ea1
|
||||
size 133816
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:628dbd7758485be17263284d081ac84f6d540a4ca96548ee7033bb1ccbe85418
|
||||
size 111666
|
||||
oid sha256:7e482ce2b580347a2f73657caf4aba77f330097b5edb792c22e75b0bfd4445af
|
||||
size 111217
|
||||
|
||||
+2
-2
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0c5467d6cfc30431e4dfd24844662727d80f21f296121412017b7d7add74f9c4
|
||||
size 104488
|
||||
oid sha256:fc592dbfcaee93de685ad027de94e6426e16fa523293912c7f3f52b4afd9d196
|
||||
size 102328
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:59084649c92cd9450f10cd3c36e6f349eb1c6ae118bdbe3e00c0538ef6e4007b
|
||||
size 137037
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:eb5e31e230afc158c1a8c2de86a34f909bb27e4c42eee5b1b840b397ed5db275
|
||||
size 152584
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:1ba82bedd6c66f99bd94f9942900d4ebe0e0029f83011b79cceee53f0aa102cd
|
||||
size 114137
|
||||
oid sha256:5ee809d18954f64b7376887a323297c66e6a639b2fb004385eb8143d692bd604
|
||||
size 114129
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:71d82d5242965b7f60bc86cef9566e33e869e14d0bf8ac57b3a0b5162c8e4423
|
||||
size 137680
|
||||
oid sha256:4a44592fe680d00de1cf31d1dd0a6c115131f02849b6a75360e81b736edb170d
|
||||
size 137142
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9cf437823d358d36db516b2338c6e65eea2f6ddb8996713b17b4760cfc3c3cfb
|
||||
size 120195
|
||||
oid sha256:69e5995f2ce7e53a5d8912bc95562ca7029c1ff52ce7ec2e439a6b78abe28d3a
|
||||
size 117528
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:968b785eb407bd7ef81eae302508f8e81166e2ab3a3c5226d6886840ee2cefbb
|
||||
size 145486
|
||||
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6742804364719e4bb519d0f04a07ae6b7f9f06cf3e9ae994aef0e184d40cbcda
|
||||
size 167718
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:15d76e811666454d244d211e828af874f8ad69dda2e808505f59296ad4f9cf9d
|
||||
size 140955
|
||||
oid sha256:aba080e7925f3d3cc9593509e6ba183b9e31a8a7ec7da4d7d574e35f192678a1
|
||||
size 140952
|
||||
|
||||
Reference in New Issue
Block a user