-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
458 additions
and
482 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,47 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
<head></head> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise((r) => setTimeout(r, 100)); | ||
|
||
<head></head> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise(r => setTimeout(r, 100)) | ||
|
||
import { ApolloClient, InMemoryCache, gql } from "https://cdn.jsdelivr.net/npm/@apollo/client@0.0.0-pr-10915-20230616125401/+esm"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
} | ||
} | ||
`}) | ||
.then(r => { | ||
const main = document.querySelector('main') | ||
const ul = document.createElement('ul') | ||
main.replaceChildren(ul) | ||
r.data.products.forEach(p => { | ||
const li = document.createElement('li') | ||
li.textContent = p.title | ||
ul.appendChild(li) | ||
import { | ||
ApolloClient, | ||
InMemoryCache, | ||
gql, | ||
} from "https://cdn.jsdelivr.net/npm/@apollo/client@0.0.0-pr-10915-20230616125401/+esm"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client | ||
.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
} | ||
} | ||
`, | ||
}) | ||
}) | ||
.catch(console.error) | ||
</script> | ||
|
||
<body> | ||
<h1>https://cdn.jsdelivr.net/npm/@apollo/client/+esm</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
.then((r) => { | ||
const main = document.querySelector("main"); | ||
const ul = document.createElement("ul"); | ||
main.replaceChildren(ul); | ||
r.data.products.forEach((p) => { | ||
const li = document.createElement("li"); | ||
li.textContent = p.title; | ||
ul.appendChild(li); | ||
}); | ||
}) | ||
.catch(console.error); | ||
</script> | ||
|
||
<body> | ||
<h1>https://cdn.jsdelivr.net/npm/@apollo/client/+esm</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,66 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
|
||
<head></head> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@apollo/client": "https://ga.jspm.io/npm:@apollo/client@0.0.0-pr-10915-20230616125401/index.js" | ||
}, | ||
"scopes": { | ||
"https://ga.jspm.io/": { | ||
"@wry/context": "https://ga.jspm.io/npm:@wry/context@0.7.3/lib/index.js", | ||
"@wry/equality": "https://ga.jspm.io/npm:@wry/equality@0.5.6/lib/index.js", | ||
"@wry/trie": "https://ga.jspm.io/npm:@wry/trie@0.4.3/lib/index.js", | ||
"graphql": "https://ga.jspm.io/npm:graphql@16.6.0/index.mjs", | ||
"graphql-tag": "https://ga.jspm.io/npm:graphql-tag@2.12.6/lib/index.js", | ||
"optimism": "https://ga.jspm.io/npm:optimism@0.17.5/lib/index.js", | ||
"react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", | ||
"symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", | ||
"ts-invariant": "https://ga.jspm.io/npm:ts-invariant@0.10.3/lib/invariant.js", | ||
"ts-invariant/process/index.js": "https://ga.jspm.io/npm:ts-invariant@0.10.3/process/index.js", | ||
"tslib": "https://ga.jspm.io/npm:tslib@2.5.3/tslib.es6.mjs", | ||
"zen-observable-ts": "https://ga.jspm.io/npm:zen-observable-ts@1.2.5/module.js" | ||
<head></head> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@apollo/client": "https://ga.jspm.io/npm:@apollo/client@0.0.0-pr-10915-20230616125401/index.js" | ||
}, | ||
"scopes": { | ||
"https://ga.jspm.io/": { | ||
"@wry/context": "https://ga.jspm.io/npm:@wry/context@0.7.3/lib/index.js", | ||
"@wry/equality": "https://ga.jspm.io/npm:@wry/equality@0.5.6/lib/index.js", | ||
"@wry/trie": "https://ga.jspm.io/npm:@wry/trie@0.4.3/lib/index.js", | ||
"graphql": "https://ga.jspm.io/npm:graphql@16.6.0/index.mjs", | ||
"graphql-tag": "https://ga.jspm.io/npm:graphql-tag@2.12.6/lib/index.js", | ||
"optimism": "https://ga.jspm.io/npm:optimism@0.17.5/lib/index.js", | ||
"react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", | ||
"symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", | ||
"ts-invariant": "https://ga.jspm.io/npm:ts-invariant@0.10.3/lib/invariant.js", | ||
"ts-invariant/process/index.js": "https://ga.jspm.io/npm:ts-invariant@0.10.3/process/index.js", | ||
"tslib": "https://ga.jspm.io/npm:tslib@2.5.3/tslib.es6.mjs", | ||
"zen-observable-ts": "https://ga.jspm.io/npm:zen-observable-ts@1.2.5/module.js" | ||
} | ||
} | ||
} | ||
} | ||
</script> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise(r => setTimeout(r, 100)) | ||
</script> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise((r) => setTimeout(r, 100)); | ||
|
||
import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
} | ||
} | ||
`}) | ||
.then(r => { | ||
const main = document.querySelector('main') | ||
const ul = document.createElement('ul') | ||
main.replaceChildren(ul) | ||
r.data.products.forEach(p => { | ||
const li = document.createElement('li') | ||
li.textContent = p.title | ||
ul.appendChild(li) | ||
import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client | ||
.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
} | ||
} | ||
`, | ||
}) | ||
}) | ||
.catch(console.error) | ||
</script> | ||
|
||
<body> | ||
<h1>https://ga.jspm.io/npm:@apollo/client/index.js</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
.then((r) => { | ||
const main = document.querySelector("main"); | ||
const ul = document.createElement("ul"); | ||
main.replaceChildren(ul); | ||
r.data.products.forEach((p) => { | ||
const li = document.createElement("li"); | ||
li.textContent = p.title; | ||
ul.appendChild(li); | ||
}); | ||
}) | ||
.catch(console.error); | ||
</script> | ||
|
||
<body> | ||
<h1>https://ga.jspm.io/npm:@apollo/client/index.js</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
</html> |
112 changes: 56 additions & 56 deletions
112
integration-tests/browser-esm/html/unpkg-unmangled.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
<!DOCTYPE html> | ||
<!doctype html> | ||
<html> | ||
|
||
<head></head> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@apollo/client": "https://unpkg.com/@apollo/client@0.0.0-pr-10915-20230616125401/index.js", | ||
"@wry/context": "https://unpkg.com/@wry/context@0.7.3/lib/index.js", | ||
"@wry/equality": "https://unpkg.com/@wry/equality@0.5.6/lib/index.js", | ||
"@wry/trie": "https://unpkg.com/@wry/trie@0.4.3/lib/index.js", | ||
"graphql": "https://unpkg.com/graphql@16.6.0/index.mjs", | ||
"graphql-tag": "https://unpkg.com/graphql-tag@2.12.6/lib/index.js", | ||
"optimism": "https://unpkg.com/optimism@0.17.5/lib/index.js", | ||
"react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", | ||
"symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", | ||
"ts-invariant": "https://unpkg.com/ts-invariant@0.10.3/lib/invariant.js", | ||
"ts-invariant/process/index.js": "https://unpkg.com/ts-invariant@0.10.3/process/index.js", | ||
"tslib": "https://unpkg.com/tslib@2.5.3/tslib.es6.mjs", | ||
"zen-observable-ts": "https://unpkg.com/zen-observable-ts@1.2.5/module.js" | ||
} | ||
} | ||
</script> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise(r => setTimeout(r, 100)) | ||
|
||
import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
<head></head> | ||
<script type="importmap"> | ||
{ | ||
"imports": { | ||
"@apollo/client": "https://unpkg.com/@apollo/client@0.0.0-pr-10915-20230616125401/index.js", | ||
"@wry/context": "https://unpkg.com/@wry/context@0.7.3/lib/index.js", | ||
"@wry/equality": "https://unpkg.com/@wry/equality@0.5.6/lib/index.js", | ||
"@wry/trie": "https://unpkg.com/@wry/trie@0.4.3/lib/index.js", | ||
"graphql": "https://unpkg.com/graphql@16.6.0/index.mjs", | ||
"graphql-tag": "https://unpkg.com/graphql-tag@2.12.6/lib/index.js", | ||
"optimism": "https://unpkg.com/optimism@0.17.5/lib/index.js", | ||
"react": "https://ga.jspm.io/npm:react@18.2.0/dev.index.js", | ||
"symbol-observable": "https://ga.jspm.io/npm:symbol-observable@4.0.0/lib/index.js", | ||
"ts-invariant": "https://unpkg.com/ts-invariant@0.10.3/lib/invariant.js", | ||
"ts-invariant/process/index.js": "https://unpkg.com/ts-invariant@0.10.3/process/index.js", | ||
"tslib": "https://unpkg.com/tslib@2.5.3/tslib.es6.mjs", | ||
"zen-observable-ts": "https://unpkg.com/zen-observable-ts@1.2.5/module.js" | ||
} | ||
} | ||
`}) | ||
.then(r => { | ||
const main = document.querySelector('main') | ||
const ul = document.createElement('ul') | ||
main.replaceChildren(ul) | ||
r.data.products.forEach(p => { | ||
const li = document.createElement('li') | ||
li.textContent = p.title | ||
ul.appendChild(li) | ||
}) | ||
}) | ||
.catch(console.error) | ||
</script> | ||
</script> | ||
<script type="module"> | ||
// give playwright time to load | ||
await new Promise((r) => setTimeout(r, 100)); | ||
|
||
<body> | ||
<h1>https://unpkg.com/@apollo/client/index.js</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
import { ApolloClient, InMemoryCache, gql } from "@apollo/client"; | ||
const client = new ApolloClient({ | ||
uri: "https://main--hack-the-e-commerce.apollographos.net/graphql", | ||
cache: new InMemoryCache(), | ||
}); | ||
client | ||
.query({ | ||
query: gql` | ||
query { | ||
products { | ||
id | ||
title | ||
} | ||
} | ||
`, | ||
}) | ||
.then((r) => { | ||
const main = document.querySelector("main"); | ||
const ul = document.createElement("ul"); | ||
main.replaceChildren(ul); | ||
r.data.products.forEach((p) => { | ||
const li = document.createElement("li"); | ||
li.textContent = p.title; | ||
ul.appendChild(li); | ||
}); | ||
}) | ||
.catch(console.error); | ||
</script> | ||
|
||
<body> | ||
<h1>https://unpkg.com/@apollo/client/index.js</h1> | ||
<main> | ||
<p>loading</p> | ||
</main> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { baseConfig } from 'shared/playwright.config'; | ||
import { defineConfig } from '@playwright/test'; | ||
import { baseConfig } from "shared/playwright.config"; | ||
import { defineConfig } from "@playwright/test"; | ||
|
||
export default defineConfig(baseConfig); |
14 changes: 7 additions & 7 deletions
14
integration-tests/browser-esm/tests/playwright/jsdeliver-esm.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from 'shared/fixture'; | ||
import { expect } from "@playwright/test"; | ||
import { test } from "shared/fixture"; | ||
|
||
test('Basic Test', async ({ page, withHar }) => { | ||
await page.goto('http://localhost:3000/jsdeliver-esm.html'); | ||
test("Basic Test", async ({ page, withHar }) => { | ||
await page.goto("http://localhost:3000/jsdeliver-esm.html"); | ||
|
||
await expect(page.getByText('loading')).toBeVisible(); | ||
await expect(page.getByText('loading')).not.toBeVisible({ timeout: 10000 }); | ||
await expect(page.getByText('Soft Warm Apollo Beanie')).toBeVisible(); | ||
await expect(page.getByText("loading")).toBeVisible(); | ||
await expect(page.getByText("loading")).not.toBeVisible({ timeout: 10000 }); | ||
await expect(page.getByText("Soft Warm Apollo Beanie")).toBeVisible(); | ||
}); |
14 changes: 7 additions & 7 deletions
14
integration-tests/browser-esm/tests/playwright/jspm-prepared.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import { expect } from '@playwright/test'; | ||
import { test } from 'shared/fixture'; | ||
import { expect } from "@playwright/test"; | ||
import { test } from "shared/fixture"; | ||
|
||
test('Basic Test', async ({ page, withHar }) => { | ||
await page.goto('http://localhost:3000/jspm-prepared.html'); | ||
test("Basic Test", async ({ page, withHar }) => { | ||
await page.goto("http://localhost:3000/jspm-prepared.html"); | ||
|
||
await expect(page.getByText('loading')).toBeVisible(); | ||
await expect(page.getByText('loading')).not.toBeVisible({ timeout: 10000 }); | ||
await expect(page.getByText('Soft Warm Apollo Beanie')).toBeVisible(); | ||
await expect(page.getByText("loading")).toBeVisible(); | ||
await expect(page.getByText("loading")).not.toBeVisible({ timeout: 10000 }); | ||
await expect(page.getByText("Soft Warm Apollo Beanie")).toBeVisible(); | ||
}); |
Oops, something went wrong.