From 487de33e4be97a10b111ae748dc9dd7b253b2e20 Mon Sep 17 00:00:00 2001 From: Dmitry Gozman Date: Wed, 31 Aug 2022 13:56:57 -0700 Subject: [PATCH] cherry-pick(#16589): chore(ct): svelte-kit is being a moving target, remove tests for now (#17002) --- tests/components/ct-svelte-kit/.gitignore | 8 -- tests/components/ct-svelte-kit/.npmrc | 1 - tests/components/ct-svelte-kit/README.md | 40 ------- tests/components/ct-svelte-kit/jsconfig.json | 3 - tests/components/ct-svelte-kit/package.json | 21 ---- .../ct-svelte-kit/playwright.config.ts | 44 ------- .../ct-svelte-kit/playwright/index.html | 13 -- .../ct-svelte-kit/playwright/index.ts | 0 tests/components/ct-svelte-kit/src/app.html | 13 -- .../ct-svelte-kit/src/lib/Counter.spec.ts | 49 -------- .../ct-svelte-kit/src/lib/Counter.svelte | 113 ------------------ .../ct-svelte-kit/src/routes/index.svelte | 2 - .../ct-svelte-kit/static/favicon.png | Bin 1571 -> 0 bytes .../components/ct-svelte-kit/svelte.config.js | 10 -- 14 files changed, 317 deletions(-) delete mode 100644 tests/components/ct-svelte-kit/.gitignore delete mode 100644 tests/components/ct-svelte-kit/.npmrc delete mode 100644 tests/components/ct-svelte-kit/README.md delete mode 100644 tests/components/ct-svelte-kit/jsconfig.json delete mode 100644 tests/components/ct-svelte-kit/package.json delete mode 100644 tests/components/ct-svelte-kit/playwright.config.ts delete mode 100644 tests/components/ct-svelte-kit/playwright/index.html delete mode 100644 tests/components/ct-svelte-kit/playwright/index.ts delete mode 100644 tests/components/ct-svelte-kit/src/app.html delete mode 100644 tests/components/ct-svelte-kit/src/lib/Counter.spec.ts delete mode 100644 tests/components/ct-svelte-kit/src/lib/Counter.svelte delete mode 100644 tests/components/ct-svelte-kit/src/routes/index.svelte delete mode 100644 tests/components/ct-svelte-kit/static/favicon.png delete mode 100644 tests/components/ct-svelte-kit/svelte.config.js diff --git a/tests/components/ct-svelte-kit/.gitignore b/tests/components/ct-svelte-kit/.gitignore deleted file mode 100644 index f4401a32d2..0000000000 --- a/tests/components/ct-svelte-kit/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -.DS_Store -node_modules -/build -/.svelte-kit -/package -.env -.env.* -!.env.example diff --git a/tests/components/ct-svelte-kit/.npmrc b/tests/components/ct-svelte-kit/.npmrc deleted file mode 100644 index b6f27f1359..0000000000 --- a/tests/components/ct-svelte-kit/.npmrc +++ /dev/null @@ -1 +0,0 @@ -engine-strict=true diff --git a/tests/components/ct-svelte-kit/README.md b/tests/components/ct-svelte-kit/README.md deleted file mode 100644 index 94a48f5ff8..0000000000 --- a/tests/components/ct-svelte-kit/README.md +++ /dev/null @@ -1,40 +0,0 @@ -# create-svelte - -Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). - -## Creating a project - -If you're seeing this, you've probably already done this step. Congrats! - -```bash -# create a new project in the current directory -npm init svelte@next - -# create a new project in my-app -npm init svelte@next my-app -``` - -> Note: the `@next` is temporary - -## Developing - -Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: - -```bash -npm run dev - -# or start the server and open the app in a new browser tab -npm run dev -- --open -``` - -## Building - -To create a production version of your app: - -```bash -npm run build -``` - -You can preview the production build with `npm run preview`. - -> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. diff --git a/tests/components/ct-svelte-kit/jsconfig.json b/tests/components/ct-svelte-kit/jsconfig.json deleted file mode 100644 index d1deb76043..0000000000 --- a/tests/components/ct-svelte-kit/jsconfig.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "extends": "./.svelte-kit/tsconfig.json" -} diff --git a/tests/components/ct-svelte-kit/package.json b/tests/components/ct-svelte-kit/package.json deleted file mode 100644 index 5923ef872a..0000000000 --- a/tests/components/ct-svelte-kit/package.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "ct-svelte-kit", - "version": "0.0.1", - "scripts": { - "dev": "svelte-kit dev", - "build": "svelte-kit build", - "package": "svelte-kit package", - "preview": "svelte-kit preview", - "prepare": "svelte-kit sync" - }, - "devDependencies": { - "@sveltejs/adapter-auto": "next", - "@sveltejs/kit": "next", - "svelte": "^3.44.0" - }, - "@standaloneDevDependencies": { - "@playwright/experimental-ct-svelte": "^1.22.2", - "@playwright/test": "^1.22.2" - }, - "type": "module" -} \ No newline at end of file diff --git a/tests/components/ct-svelte-kit/playwright.config.ts b/tests/components/ct-svelte-kit/playwright.config.ts deleted file mode 100644 index ce93c2efee..0000000000 --- a/tests/components/ct-svelte-kit/playwright.config.ts +++ /dev/null @@ -1,44 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import type { PlaywrightTestConfig } from '@playwright/experimental-ct-svelte'; -import { devices } from '@playwright/test'; - -const config: PlaywrightTestConfig = { - testDir: 'src', - forbidOnly: !!process.env.CI, - retries: process.env.CI ? 2 : 0, - reporter: 'html', - use: { - trace: 'on-first-retry', - }, - projects: [ - { - name: 'chromium', - use: { ...devices['Desktop Chrome'] }, - }, - { - name: 'firefox', - use: { ...devices['Desktop Firefox'] }, - }, - { - name: 'webkit', - use: { ...devices['Desktop Safari'] }, - }, - ], -}; - -export default config; diff --git a/tests/components/ct-svelte-kit/playwright/index.html b/tests/components/ct-svelte-kit/playwright/index.html deleted file mode 100644 index 9f3d2a65b9..0000000000 --- a/tests/components/ct-svelte-kit/playwright/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - Svelte Test - - -
- - - diff --git a/tests/components/ct-svelte-kit/playwright/index.ts b/tests/components/ct-svelte-kit/playwright/index.ts deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/tests/components/ct-svelte-kit/src/app.html b/tests/components/ct-svelte-kit/src/app.html deleted file mode 100644 index 79e0b2916f..0000000000 --- a/tests/components/ct-svelte-kit/src/app.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - %svelte.head% - - -
%svelte.body%
- - diff --git a/tests/components/ct-svelte-kit/src/lib/Counter.spec.ts b/tests/components/ct-svelte-kit/src/lib/Counter.spec.ts deleted file mode 100644 index 1e863cd250..0000000000 --- a/tests/components/ct-svelte-kit/src/lib/Counter.spec.ts +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Copyright (c) Microsoft Corporation. All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { test, expect } from '@playwright/experimental-ct-svelte'; -import Counter from './Counter.svelte'; - -test.use({ viewport: { width: 500, height: 500 } }); - -test('should work', async ({ mount }) => { - const changes = []; - - const component = await mount(Counter, { - props: { - units: 's', - }, - on: { - changed: c => changes.push(c) - } - }); - - const increment = component.locator('button[aria-label*=Increase]'); - const decrement = component.locator('button[aria-label*=Decrease]'); - await expect(component).toContainText('0s'); - - await increment.click(); - await expect(component).toContainText('1s'); - expect(changes).toEqual([{ count: 1 }]); - - await increment.click(); - await expect(component).toContainText('2s'); - expect(changes).toEqual([{ count: 1 }, { count: 2 }]); - - await decrement.click(); - await expect(component).toContainText('1s'); - expect(changes).toEqual([{ count: 1 }, { count: 2 }, { count: 1 }]); -}); diff --git a/tests/components/ct-svelte-kit/src/lib/Counter.svelte b/tests/components/ct-svelte-kit/src/lib/Counter.svelte deleted file mode 100644 index 9caff6c61d..0000000000 --- a/tests/components/ct-svelte-kit/src/lib/Counter.svelte +++ /dev/null @@ -1,113 +0,0 @@ - - -
- - -
-
- - {Math.floor($displayed_count)}{units} -
-
- - -
- - diff --git a/tests/components/ct-svelte-kit/src/routes/index.svelte b/tests/components/ct-svelte-kit/src/routes/index.svelte deleted file mode 100644 index 5982b0ae37..0000000000 --- a/tests/components/ct-svelte-kit/src/routes/index.svelte +++ /dev/null @@ -1,2 +0,0 @@ -

Welcome to SvelteKit

-

Visit kit.svelte.dev to read the documentation

diff --git a/tests/components/ct-svelte-kit/static/favicon.png b/tests/components/ct-svelte-kit/static/favicon.png deleted file mode 100644 index 825b9e65af7c104cfb07089bb28659393b4f2097..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1571 zcmV+;2Hg3HP)Px)-AP12RCwC$UE6KzI1p6{F2N z1VK2vi|pOpn{~#djwYcWXTI_im_u^TJgMZ4JMOsSj!0ma>B?-(Hr@X&W@|R-$}W@Z zgj#$x=!~7LGqHW?IO8+*oE1MyDp!G=L0#^lUx?;!fXv@l^6SvTnf^ac{5OurzC#ZMYc20lI%HhX816AYVs1T3heS1*WaWH z%;x>)-J}YB5#CLzU@GBR6sXYrD>Vw(Fmt#|JP;+}<#6b63Ike{Fuo!?M{yEffez;| zp!PfsuaC)>h>-AdbnwN13g*1LowNjT5?+lFVd#9$!8Z9HA|$*6dQ8EHLu}U|obW6f z2%uGv?vr=KNq7YYa2Roj;|zooo<)lf=&2yxM@e`kM$CmCR#x>gI>I|*Ubr({5Y^rb zghxQU22N}F51}^yfDSt786oMTc!W&V;d?76)9KXX1 z+6Okem(d}YXmmOiZq$!IPk5t8nnS{%?+vDFz3BevmFNgpIod~R{>@#@5x9zJKEHLHv!gHeK~n)Ld!M8DB|Kfe%~123&Hz1Z(86nU7*G5chmyDe ziV7$pB7pJ=96hpxHv9rCR29%bLOXlKU<_13_M8x)6;P8E1Kz6G<&P?$P^%c!M5`2` zfY2zg;VK5~^>TJGQzc+33-n~gKt{{of8GzUkWmU110IgI0DLxRIM>0US|TsM=L|@F z0Bun8U!cRB7-2apz=y-7*UxOxz@Z0)@QM)9wSGki1AZ38ceG7Q72z5`i;i=J`ILzL z@iUO?SBBG-0cQuo+an4TsLy-g-x;8P4UVwk|D8{W@U1Zi z!M)+jqy@nQ$p?5tsHp-6J304Q={v-B>66$P0IDx&YT(`IcZ~bZfmn11#rXd7<5s}y zBi9eim&zQc0Dk|2>$bs0PnLmDfMP5lcXRY&cvJ=zKxI^f0%-d$tD!`LBf9^jMSYUA zI8U?CWdY@}cRq6{5~y+)#h1!*-HcGW@+gZ4B};0OnC~`xQOyH19z*TA!!BJ%9s0V3F?CAJ{hTd#*tf+ur-W9MOURF-@B77_-OshsY}6 zOXRY=5%C^*26z?l)1=$bz30!so5tfABdSYzO+H=CpV~aaUefmjvfZ3Ttu9W&W3Iu6 zROlh0MFA5h;my}8lB0tAV-Rvc2Zs_CCSJnx@d`**$idgy-iMob4dJWWw|21b4NB=LfsYp0Aeh{Ov)yztQi;eL4y5 zMi>8^SzKqk8~k?UiQK^^-5d8c%bV?$F8%X~czyiaKCI2=UH