Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
restored keyboard based tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Velin92 committed Jul 12, 2024
1 parent c9c9e86 commit 2f6e24b
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions platforms/ios/example/WysiwygUITests/WysiwygUITests+Keyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import XCTest
extension WysiwygUITests {
func testInlinePredictiveText() {
sleep(3)
// app.setupKeyboardLanguage(named: "English (US)")
app.setupKeyboardLanguage(named: "English (US)")

// Sometimes autocorrection can break capitalisation, so we need to make sure the first letter is lowercase
app.keyboards.buttons["shift"].tap()
Expand All @@ -47,7 +47,7 @@ extension WysiwygUITests {

func testInlinePredictiveTextIsIgnoredWhenSending() {
sleep(3)
// app.setupKeyboardLanguage(named: "English (US)")
app.setupKeyboardLanguage(named: "English (US)")

// Sometimes autocorrection can break capitalisation, so we need to make sure the first letter is lowercase
app.keyboards.buttons["shift"].tap()
Expand All @@ -67,7 +67,7 @@ extension WysiwygUITests {

func testInlinePredictiveTextIsIgnoredWhenDeleting() {
sleep(3)
// app.setupKeyboardLanguage(named: "English (US)")
app.setupKeyboardLanguage(named: "English (US)")

// Sometimes autocorrection can break capitalisation, so we need to make sure the first letter is lowercase
app.keyboards.buttons["shift"].tap()
Expand All @@ -88,7 +88,7 @@ extension WysiwygUITests {

func testDoubleSpaceIntoDot() {
sleep(3)
// app.setupKeyboardLanguage(named: "English (US)")
app.setupKeyboardLanguage(named: "English (US)")

// Sometimes autocorrection can break capitalisation, so we need to make sure the first letter is lowercase
app.keyboards.buttons["shift"].tap()
Expand All @@ -105,7 +105,7 @@ extension WysiwygUITests {

func testDotAfterInlinePredictiveText() {
sleep(3)
// app.setupKeyboardLanguage(named: "English (US)")
app.setupKeyboardLanguage(named: "English (US)")

// Sometimes autocorrection can break capitalisation, so we need to make sure the first letter is lowercase
app.keyboards.buttons["shift"].tap()
Expand All @@ -125,21 +125,21 @@ extension WysiwygUITests {
)
}

// func testJapaneseKanaDeletion() {
// sleep(3)
// app.setupKeyboardLanguage(named: "日本語かな")
//
// app.typeTextCharByCharUsingKeyboard("は")
// assertTextViewContent("は")
// assertTreeEquals(
// """
// └>"は"
// """
// )
// app.keys["delete"].tap()
// assertTextViewContent("")
// XCTAssertEqual(staticText(.treeText).label, "\n")
// }
func testJapaneseKanaDeletion() {
sleep(3)
app.setupKeyboardLanguage(named: "日本語かな")

app.typeTextCharByCharUsingKeyboard("")
assertTextViewContent("")
assertTreeEquals(
"""
└>""
"""
)
app.keys["delete"].tap()
assertTextViewContent("")
XCTAssertEqual(staticText(.treeText).label, "\n")
}
}

private extension XCUIApplication {
Expand Down

0 comments on commit 2f6e24b

Please sign in to comment.