App Layout: added space invites in space bottom sheet

- Improved UI tests
This commit is contained in:
Gil Eluard
2022-08-21 11:57:40 +02:00
parent 03fc5676bb
commit a203fc0c06
3 changed files with 13 additions and 7 deletions
@@ -26,10 +26,15 @@ class SpaceSelectorUITests: MockScreenTestCase {
XCTAssertEqual(disclosureButtons.count, MockSpaceSelectorService.defaultSpaceList.filter { $0.hasSubItems }.count)
let notificationBadges = app.staticTexts.matching(identifier: "notificationBadge").allElementsBoundByIndex
let itemsWithNotifications = MockSpaceSelectorService.defaultSpaceList.filter { $0.notificationCount > 0 }
let itemsWithNotifications = MockSpaceSelectorService.defaultSpaceList.filter { $0.notificationCount > 0 || !$0.isJoined }
XCTAssertEqual(notificationBadges.count, itemsWithNotifications.count)
for (index, notificationBadge) in notificationBadges.enumerated() {
XCTAssertEqual("\(itemsWithNotifications[index].notificationCount)", notificationBadge.label)
let item = itemsWithNotifications[index]
if item.isJoined {
XCTAssertEqual("\(item.notificationCount)", notificationBadge.label)
} else {
XCTAssertEqual("! ", notificationBadge.label)
}
}
let spaceItemNameList = app.staticTexts.matching(identifier: "itemName").allElementsBoundByIndex