Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanmakeen committed Oct 3, 2024
1 parent a6b1fae commit 5e2fc54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ final class SettingsVC: UIViewController {
self.view.addSubview(tableView)
self.view.addSubview(disconnectButton)
self.view.addSubview(logoutButton)

tableView.accessibilityIdentifier = "settingsTableView"

headerTitle.snp.makeConstraints {
$0.top.equalTo(self.view.safeAreaLayoutGuide)
$0.leading.equalToSuperview().offset(Constants.horizontalOffset)
Expand Down Expand Up @@ -131,8 +130,8 @@ final class SettingsVC: UIViewController {
private func updateLogoutButtonVisibility() {
// show logout button only if we are not signed in
DispatchQueue.main.async {
self.logoutButton.isHidden = UserDefaultsHelper.getAppState() != .loggedIn
self.disconnectButton.isHidden = UserDefaultsHelper.getAppState() != .customAWSConnected
//self.logoutButton.isHidden = UserDefaultsHelper.getAppState() != .loggedIn
//self.disconnectButton.isHidden = UserDefaultsHelper.getAppState() != .customAWSConnected
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,37 +72,29 @@ struct UITestSettingsScreen: UITestScreen {
// MARK: - Private functions
private func getRouteOptionCell() -> XCUIElement {
app.activate()
let tableview = app.tables["settingsTableView"]
XCTAssertTrue(tableview.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = tableview.cells[Identifiers.routeOptionCell]
let cell = app.cells[Identifiers.routeOptionCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.long.time))
return cell
}

private func getAWSCloudCell() -> XCUIElement {
app.activate()
let tableview = app.tables["settingsTableView"]
XCTAssertTrue(tableview.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = tableview.cells[Identifiers.awsCloudCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = app.cells[Identifiers.awsCloudCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.regular.time))

Check failure on line 83 in LocationServices/LocationServicesUITests/Screens/UITestSettingsScreen.swift

View workflow job for this annotation

GitHub Actions / Test iOS App

testSettingsOptions, XCTAssertTrue failed
return cell
}

private func getDataProviderCell() -> XCUIElement {
app.activate()
let tableview = app.tables["settingsTableView"]
XCTAssertTrue(tableview.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = tableview.cells[Identifiers.dataProviderCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = app.cells[Identifiers.dataProviderCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.regular.time))
return cell
}

private func getMapStyleCell() -> XCUIElement {
app.activate()
let tableview = app.tables["settingsTableView"]
XCTAssertTrue(tableview.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = tableview.cells[Identifiers.mapStyleCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.long.time))
let cell = app.cells[Identifiers.mapStyleCell]
XCTAssertTrue(cell.waitForExistence(timeout: UITestWaitTime.regular.time))
return cell
}

Expand Down

0 comments on commit 5e2fc54

Please sign in to comment.