From 297379355b1a4fb328dfbf98aff78b397d92a5ac Mon Sep 17 00:00:00 2001 From: Tomek Zawadzki Date: Thu, 27 Jun 2024 13:29:49 +0200 Subject: [PATCH] Fix missing `TEST_CONST` import in example app (#402) --- WebExample/__tests__/input.spec.ts | 2 +- WebExample/__tests__/styles.spec.ts | 2 +- WebExample/__tests__/textManipulation.spec.ts | 2 +- WebExample/__tests__/utils.ts | 2 +- WebExample/playwright.config.ts | 2 +- WebExample/tsconfig.json | 2 +- example/src/App.tsx | 2 +- {WebExample/__tests__ => example/src}/testConstants.ts | 0 example/tsconfig.json | 2 +- 9 files changed, 8 insertions(+), 8 deletions(-) rename {WebExample/__tests__ => example/src}/testConstants.ts (100%) diff --git a/WebExample/__tests__/input.spec.ts b/WebExample/__tests__/input.spec.ts index 7854dcb42..f3accc266 100644 --- a/WebExample/__tests__/input.spec.ts +++ b/WebExample/__tests__/input.spec.ts @@ -1,5 +1,5 @@ import {test, expect} from '@playwright/test'; -import * as TEST_CONST from './testConstants'; +import * as TEST_CONST from '../../example/src/testConstants'; import {checkCursorPosition, setupInput} from './utils'; test.beforeEach(async ({page}) => { diff --git a/WebExample/__tests__/styles.spec.ts b/WebExample/__tests__/styles.spec.ts index 2fc87dc58..665957f18 100644 --- a/WebExample/__tests__/styles.spec.ts +++ b/WebExample/__tests__/styles.spec.ts @@ -1,6 +1,6 @@ import {test, expect} from '@playwright/test'; import type {Page} from '@playwright/test'; -import * as TEST_CONST from './testConstants'; +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}) => { diff --git a/WebExample/__tests__/textManipulation.spec.ts b/WebExample/__tests__/textManipulation.spec.ts index d117da397..5c83e3b47 100644 --- a/WebExample/__tests__/textManipulation.spec.ts +++ b/WebExample/__tests__/textManipulation.spec.ts @@ -1,6 +1,6 @@ import {test, expect} from '@playwright/test'; import type {Locator, Page} from '@playwright/test'; -import * as TEST_CONST from './testConstants'; +import * as TEST_CONST from '../../example/src/testConstants'; import {checkCursorPosition, setupInput, getElementStyle, pressCmd} from './utils'; const pasteContent = async ({text, page, inputLocator}: {text: string; page: Page; inputLocator: Locator}) => { diff --git a/WebExample/__tests__/utils.ts b/WebExample/__tests__/utils.ts index f50e6684a..8b5883485 100644 --- a/WebExample/__tests__/utils.ts +++ b/WebExample/__tests__/utils.ts @@ -1,5 +1,5 @@ import type {Locator, Page} from '@playwright/test'; -import * as TEST_CONST from './testConstants'; +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}`); diff --git a/WebExample/playwright.config.ts b/WebExample/playwright.config.ts index 0cf53a251..b8905830a 100644 --- a/WebExample/playwright.config.ts +++ b/WebExample/playwright.config.ts @@ -1,5 +1,5 @@ import {defineConfig, devices} from '@playwright/test'; -import * as TEST_CONST from './__tests__/testConstants'; +import * as TEST_CONST from '../example/src/testConstants'; export default defineConfig({ testDir: './__tests__', diff --git a/WebExample/tsconfig.json b/WebExample/tsconfig.json index 5ede51867..713db2f58 100644 --- a/WebExample/tsconfig.json +++ b/WebExample/tsconfig.json @@ -3,6 +3,6 @@ "compilerOptions": { "strict": true }, - "include": ["App.tsx", "**/*.ts", "__tests__/testConstants.ts"], + "include": ["App.tsx", "**/*.ts"], "exclude": ["node_modules"] } diff --git a/example/src/App.tsx b/example/src/App.tsx index 71648f563..aae9b063a 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -4,7 +4,7 @@ import {Button, Platform, StyleSheet, Text, View} from 'react-native'; import {MarkdownTextInput} from '@expensify/react-native-live-markdown'; import type {TextInput} from 'react-native'; -import * as TEST_CONST from '../../WebExample/__tests__/testConstants'; +import * as TEST_CONST from './testConstants'; function isWeb() { return Platform.OS === 'web'; diff --git a/WebExample/__tests__/testConstants.ts b/example/src/testConstants.ts similarity index 100% rename from WebExample/__tests__/testConstants.ts rename to example/src/testConstants.ts diff --git a/example/tsconfig.json b/example/tsconfig.json index 77ef13fc0..0e875a5aa 100644 --- a/example/tsconfig.json +++ b/example/tsconfig.json @@ -3,6 +3,6 @@ "compilerOptions": { "strict": true }, - "include": ["src/App.tsx", "./index.ts"], + "include": ["src/App.tsx", "src/testConstants.ts", "./index.ts"], "exclude": ["node_modules"] }