mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-30 01:37:50 +00:00
chore: Revert "chore: remove kmx-specific keyboard tests"
This reverts commit 29618fb943.
This commit is contained in:
parent
182fc3de61
commit
ee2321180f
1 changed files with 31 additions and 0 deletions
|
|
@ -3,6 +3,37 @@
|
|||
*/
|
||||
import { test, expect, type Page, type Locator } from '@playwright/test';
|
||||
|
||||
test.describe('KMX keyboards', function () {
|
||||
let textarea: Locator;
|
||||
const beforeEach = async (page: Page) => {
|
||||
await page.goto('http://localhost:3000/src/test/manual/web/kmxkeyboard.html?type=kmx');
|
||||
await page.evaluate(async () => { await window.KmwLoaded; });
|
||||
textarea = page.locator('#inputarea');
|
||||
await textarea.click();
|
||||
// we don't have a OSK yet, so don't wait for it to appear
|
||||
}
|
||||
|
||||
test('can type on a (simulated) hardware keyboard', async ({ page }) => {
|
||||
await beforeEach(page);
|
||||
await page.keyboard.press('x');
|
||||
await page.keyboard.press('j');
|
||||
await page.keyboard.press('m');
|
||||
await page.keyboard.press('Shift+e');
|
||||
await page.keyboard.press('r');
|
||||
await expect(textarea).toHaveValue('ខ្មែរ', { timeout: 500 });
|
||||
});
|
||||
|
||||
test('can type on a (simulated) hardware keyboard with reordering', async ({ page }) => {
|
||||
await beforeEach(page);
|
||||
await page.keyboard.press('x');
|
||||
await page.keyboard.press('Shift+e');
|
||||
await page.keyboard.press('j');
|
||||
await page.keyboard.press('m');
|
||||
await page.keyboard.press('r');
|
||||
await expect(textarea).toHaveValue('ខ្មែរ', { timeout: 500 });
|
||||
});
|
||||
});
|
||||
|
||||
test.describe('JS keyboards', function () {
|
||||
let textarea: Locator;
|
||||
const beforeEach = async (page: Page) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue