Skip to content

Commit

Permalink
fix web tests imports
Browse files Browse the repository at this point in the history
  • Loading branch information
SzymczakJ committed Nov 6, 2024
1 parent 00fad49 commit 3d3af34
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion WebExample/__tests__/input.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {test, expect} from '@playwright/test';
import * as TEST_CONST from '@expensify/react-native-live-markdown-example/src/testConstants';
// eslint-disable-next-line import/no-relative-packages
import * as TEST_CONST from '../../example/src/testConstants';
import {getCursorPosition, getElementValue, setupInput} from './utils';

test.beforeEach(async ({page}) => {
Expand Down
3 changes: 2 additions & 1 deletion WebExample/__tests__/styles.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {test, expect} from '@playwright/test';
import type {Page} from '@playwright/test';
import * as TEST_CONST from '@expensify/react-native-live-markdown-example/src/testConstants';
// eslint-disable-next-line import/no-relative-packages
import * as TEST_CONST from '../../example/src/testConstants';
import {setupInput, getElementStyle} from './utils';

const testMarkdownContentStyle = async ({testContent, style, page}: {testContent: string; style: string; page: Page}) => {
Expand Down
3 changes: 2 additions & 1 deletion WebExample/__tests__/textManipulation.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {test, expect} from '@playwright/test';
import type {Locator, Page} from '@playwright/test';
import * as TEST_CONST from '@expensify/react-native-live-markdown-example/src/testConstants';
// eslint-disable-next-line import/no-relative-packages
import * as TEST_CONST from '../../example/src/testConstants';
import {getCursorPosition, setupInput, getElementStyle, pressCmd, getElementValue} from './utils';

const pasteContent = async ({text, page, inputLocator}: {text: string; page: Page; inputLocator: Locator}) => {
Expand Down
3 changes: 2 additions & 1 deletion WebExample/__tests__/utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type {Locator, Page} from '@playwright/test';
import * as TEST_CONST from '@expensify/react-native-live-markdown-example/src/testConstants';
// eslint-disable-next-line import/no-relative-packages
import * as TEST_CONST from '../../example/src/testConstants';

const setupInput = async (page: Page, action?: 'clear' | 'reset') => {
const inputLocator = await page.locator(`div#${TEST_CONST.INPUT_ID}`);
Expand Down
3 changes: 2 additions & 1 deletion WebExample/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {defineConfig, devices} from '@playwright/test';
import * as TEST_CONST from '@expensify/react-native-live-markdown-example/src/testConstants';
// eslint-disable-next-line import/no-relative-packages
import * as TEST_CONST from '../example/src/testConstants';

export default defineConfig({
testDir: './__tests__',
Expand Down

0 comments on commit 3d3af34

Please sign in to comment.