mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-25 11:22:20 +00:00
add a failing test for stuff that should be fixed
This commit is contained in:
parent
ec72b49ead
commit
8ea693d92e
1 changed files with 20 additions and 0 deletions
|
@ -545,6 +545,26 @@ class InputLogicTest {
|
|||
assertEquals("hello ", text)
|
||||
}
|
||||
|
||||
@Test fun `autospace in json editor`() {
|
||||
reset()
|
||||
chainInput("{\"label\":\"")
|
||||
assertEquals("{\"label\": \"", text)
|
||||
input('c')
|
||||
assertEquals("{\"label\": \"c", text)
|
||||
}
|
||||
|
||||
// todo: the test fails because assert wants it as it's in app
|
||||
// but actually the "failing text" is the wanted behavior -> how to get it in app?
|
||||
@Test fun `autospace in json editor 2`() {
|
||||
reset()
|
||||
setInputType(InputType.TYPE_CLASS_TEXT and InputType.TYPE_TEXT_FLAG_MULTI_LINE)
|
||||
setText("[\n[\n{ \"label\": \"a\" },\n")
|
||||
chainInput("{\"label\":\"")
|
||||
assertEquals("[\n[\n{ \"label\": \"a\" },\n{\"label\":\"", text)
|
||||
input('c')
|
||||
assertEquals("[\n[\n{ \"label\": \"a\" },\n{\"label\":\" c", text)
|
||||
}
|
||||
|
||||
// ------- helper functions ---------
|
||||
|
||||
// should be called before every test, so the same state is guaranteed
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue