core(ct): import paths (#18131)

This commit is contained in:
sand4rt 2022-10-20 04:41:21 +02:00 committed by GitHub
parent d8b037c559
commit 4ed2a01d9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 26 additions and 26 deletions

View File

@ -76,7 +76,7 @@ also link the script called `playwright/index.[tj]s`.
<html lang="en">
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>
```

View File

@ -4,6 +4,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.js"></script>
<script type="module" src="./index.js"></script>
</body>
</html>

View File

@ -24,6 +24,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -7,6 +7,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -8,6 +8,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -7,6 +7,6 @@
</head>
<body>
<div id="root"></div>
<script type="module" src="/playwright/index.ts"></script>
<script type="module" src="./index.ts"></script>
</body>
</html>

View File

@ -21,7 +21,7 @@ test.describe.configure({ mode: 'parallel' });
test('should work with the empty component list', async ({ runInlineTest }, testInfo) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': ``,
'a.test.ts': `
@ -45,7 +45,7 @@ test('should work with the empty component list', async ({ runInlineTest }, test
test('should extract component list', async ({ runInlineTest }, testInfo) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': ``,
'src/button.tsx': `
@ -206,7 +206,7 @@ test('should cache build', async ({ runInlineTest }, testInfo) => {
await test.step('original test', async () => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': ``,
'src/button.tsx': `
@ -273,7 +273,7 @@ test('should cache build', async ({ runInlineTest }, testInfo) => {
test('should not use global config for preview', async ({ runInlineTest }) => {
const result1 = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': ``,
'vite.config.js': `
export default {

View File

@ -18,7 +18,7 @@ import { test, expect } from './playwright-test-fixtures';
test('should work with TSX', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': `
//@no-header
`,
@ -44,7 +44,7 @@ test('should work with TSX', async ({ runInlineTest }) => {
test('should work with JSX', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -72,7 +72,7 @@ test('should work with JSX', async ({ runInlineTest }) => {
test('should work with JSX in JS', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -100,7 +100,7 @@ test('should work with JSX in JS', async ({ runInlineTest }) => {
test('should work with JSX in JS and in JSX', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -140,7 +140,7 @@ test('should work with JSX in JS and in JSX', async ({ runInlineTest }) => {
test('should work with stray TSX import', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': `
//@no-header
`,
@ -174,7 +174,7 @@ test('should work with stray TSX import', async ({ runInlineTest }) => {
test('should work with stray JSX import', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -208,7 +208,7 @@ test('should work with stray JSX import', async ({ runInlineTest }) => {
test.fixme('should work with stray JS import', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -242,7 +242,7 @@ test.fixme('should work with stray JS import', async ({ runInlineTest }) => {
test('should work with JSX in variable', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `
//@no-header
`,
@ -272,7 +272,7 @@ test('should work with JSX in variable', async ({ runInlineTest }) => {
test('should return root locator for fragments', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.js"></script>`,
'playwright/index.html': `<script type="module" src="./index.js"></script>`,
'playwright/index.js': `//@no-header`,
'src/button.jsx': `
@ -299,7 +299,7 @@ test('should return root locator for fragments', async ({ runInlineTest }) => {
test('should respect default property values', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': `//@no-header`,
'src/label.tsx': `//@no-header
export const Label = ({ checked }) => <div>type:{typeof checked} value:{String(checked)}</div>;
@ -323,7 +323,7 @@ test('should respect default property values', async ({ runInlineTest }) => {
test('should bundle public folder', async ({ runInlineTest }) => {
const result = await runInlineTest({
'playwright/index.html': `<script type="module" src="/playwright/index.ts"></script>`,
'playwright/index.html': `<script type="module" src="./index.ts"></script>`,
'playwright/index.ts': `
//@no-header
`,