New App Layout: Added missing empty states in room list and space bottom sheet

This commit is contained in:
Gil Eluard
2022-08-19 17:12:33 +02:00
parent 1e0dfdb7d3
commit 74454d11cb
14 changed files with 355 additions and 16 deletions
@@ -37,6 +37,28 @@ class SpaceSelectorUITests: MockScreenTestCase {
for (index, item) in MockSpaceSelectorService.defaultSpaceList.enumerated() {
XCTAssertEqual(item.displayName, spaceItemNameList[index].label)
}
checkIfEmptyPlaceholder(exists: false)
}
func testEmptyList() {
app.goToScreenWithIdentifier(MockSpaceSelectorScreenState.emptyList.title)
let disclosureButtons = app.buttons.matching(identifier: "disclosureButton").allElementsBoundByIndex
XCTAssertEqual(disclosureButtons.count, 0)
let notificationBadges = app.staticTexts.matching(identifier: "notificationBadge").allElementsBoundByIndex
XCTAssertEqual(notificationBadges.count, 0)
let spaceItemNameList = app.staticTexts.matching(identifier: "itemName").allElementsBoundByIndex
XCTAssertEqual(spaceItemNameList.count, 0)
checkIfEmptyPlaceholder(exists: true)
}
// MARK: - Private methods
private func checkIfEmptyPlaceholder(exists: Bool) {
XCTAssertEqual(app.staticTexts["emptyListPlaceholderTitle"].exists, exists)
XCTAssertEqual(app.staticTexts["emptyListPlaceholderMessage"].exists, exists)
XCTAssertEqual(app.buttons["createSpaceButton"].exists, exists)
}
}