Skip to content

Commit

Permalink
#92 Fix UI tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailgulek committed Jun 26, 2022
1 parent 7704c31 commit 30ce941
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
11 changes: 0 additions & 11 deletions ElementX/Sources/Screens/RoomScreen/View/Style/TimelineStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@ enum TimelineStyle: String, CaseIterable {
}
}

extension TimelineStyle: CustomStringConvertible {
var description: String {
switch self {
case .plain:
return ElementL10n.roomTimelineStylePlainLongDescription
case .bubbled:
return ElementL10n.roomTimelineStyleBubbledLongDescription
}
}
}

// MARK: - Environment

private struct TimelineStyleKey: EnvironmentKey {
Expand Down
12 changes: 12 additions & 0 deletions ElementX/Sources/Screens/Settings/View/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,24 @@ struct Settings: View {
.tag(style)
}
}
.accessibilityIdentifier("timelineStylePicker")
}
.listRowBackground(rowBackgroundColor)
}
}
}

extension TimelineStyle: CustomStringConvertible {
var description: String {
switch self {
case .plain:
return ElementL10n.roomTimelineStylePlainLongDescription
case .bubbled:
return ElementL10n.roomTimelineStyleBubbledLongDescription
}
}
}

// MARK: - Previews

struct Settings_Previews: PreviewProvider {
Expand Down
2 changes: 1 addition & 1 deletion UITests/Sources/SettingsUITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class SettingsUITests: XCTestCase {
XCTAssert(app.navigationBars["Settings"].exists)
XCTAssert(app.buttons["reportBugButton"].exists)
XCTAssertEqual(app.buttons["crashButton"].exists, BuildSettings.settingsCrashButtonVisible)
XCTAssertEqual(app.buttons["timelineStyleButton"].exists, BuildSettings.settingsShowTimelineStyle)
XCTAssertEqual(app.buttons["timelineStylePicker"].exists, BuildSettings.settingsShowTimelineStyle)
XCTAssert(app.buttons["logoutButton"].exists)
}

Expand Down

0 comments on commit 30ce941

Please sign in to comment.