Skip to content

Commit

Permalink
Fix TS errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Skalakid committed Jul 5, 2024
1 parent 0580f45 commit 6682c9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions WebExample/__tests__/utils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type {Locator, Page} from '@playwright/test';
import * as TEST_CONST from '../../example/src/testConstants';
import type {MarkdownTextInputElement} from '../../src/MarkdownTextInput.web';

const setupInput = async (page: Page, action?: 'clear' | 'reset') => {
const inputLocator = await page.locator(`div#${TEST_CONST.INPUT_ID}`);
Expand All @@ -12,7 +11,7 @@ const setupInput = async (page: Page, action?: 'clear' | 'reset') => {
};

const getCursorPosition = async (elementHandle: Locator) => {
const inputSelectionHandle = await elementHandle.evaluateHandle((div: MarkdownTextInputElement) => ({start: div.selectionStart, end: div.selectionEnd}));
const inputSelectionHandle = await elementHandle.evaluateHandle((div: HTMLInputElement) => ({start: div.selectionStart, end: div.selectionEnd}));
const selection = await inputSelectionHandle.jsonValue();
return selection;
};
Expand Down Expand Up @@ -54,7 +53,7 @@ const pressCmd = async ({inputLocator, command}: {inputLocator: Locator; command
};

const getElementValue = async (elementHandle: Locator) => {
const inputValueHandle = await elementHandle.evaluateHandle((div: MarkdownTextInputElement) => div.value);
const inputValueHandle = await elementHandle.evaluateHandle((div: HTMLInputElement) => div.value);
const value = await inputValueHandle.jsonValue();
return value;
};
Expand Down

0 comments on commit 6682c9d

Please sign in to comment.