Skip to content

Commit

Permalink
Add keyboard view second row keys UI tests (#32)
Browse files Browse the repository at this point in the history
* test: πŸ’ add second row key button test case

add second row key button test case
add turn degree test cases
add second row key counter clockwise button test case

* refactor: πŸ’‘ change input parameter format of key button test

replace plus() by plain text
  • Loading branch information
fakiis authored May 15, 2024
1 parent 36a253e commit 98120af
Showing 1 changed file with 26 additions and 0 deletions.
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 ")
}

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

clickCounterClockwiseButton()
keyButtonShouldBe("M ")
}

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

clickTurnDegreeButton()
keyButtonShouldBe("M3 ")

clickTurnDegreeButton()
keyButtonShouldBe("M ")
}

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

0 comments on commit 98120af

Please sign in to comment.