Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add keyboard view second row keys UI tests #32

Merged
merged 2 commits into from
May 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,32 @@ class HushKeyboardUiTest {
keyButtonShouldBe("R ")
}

@Test
fun `Second row key should exist, should be enabled, and should have click action`() {
keyButtonShouldBe("M".plus(" "))
fakiis marked this conversation as resolved.
Show resolved Hide resolved
}

@Test
fun `Second row key should show ' notation after clicking counter clockwise button`() {
clickCounterClockwiseButton()
keyButtonShouldBe("M".plus("' "))

clickCounterClockwiseButton()
keyButtonShouldBe("M".plus(" "))
}

@Test
fun `Second row key should show correct turn degree after clicking turn degree button`() {
clickTurnDegreeButton()
keyButtonShouldBe("M".plus("2 "))

clickTurnDegreeButton()
keyButtonShouldBe("M".plus("3 "))

clickTurnDegreeButton()
keyButtonShouldBe("M".plus(" "))
}

private fun keyButtonShouldBe(text: String) {
composeTestRule
.onNodeWithText(text)
Expand Down