Skip to content

Commit

Permalink
feat(pie-notification): DSW-1351 updated branch to latest verison
Browse files Browse the repository at this point in the history
  • Loading branch information
thejfreitas committed Mar 20, 2024
2 parents ba8ef9e + b7f3ed6 commit 2fbf7f2
Show file tree
Hide file tree
Showing 67 changed files with 3,675 additions and 4,141 deletions.
5 changes: 5 additions & 0 deletions .changeset/blue-steaks-cheer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@justeattakeaway/pie-components-config": minor
---

[Added] - New `playwright-lit-setup` executable to create necessary files for Playwright components tests.
5 changes: 5 additions & 0 deletions .changeset/good-candles-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pie-monorepo": patch
---

[Fixed] - Issue where `packageManager` property was causing renovate PR's to fail due to `corepack` opt-in.
5 changes: 5 additions & 0 deletions .changeset/quiet-dodos-sit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"pie-storybook": minor
---

[Added] - Sort all component storybook controls alphabetically
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,8 @@ browsers-report/
lit-browsers-report/
visual-report/
lit-visual-report/
react-browsers-report
react-browsers-report/
packages/components/**/playwright/

# TypeScript
compiled/
Expand Down
873 changes: 0 additions & 873 deletions .yarn/releases/yarn-3.5.0.cjs

This file was deleted.

875 changes: 875 additions & 0 deletions .yarn/releases/yarn-3.8.1.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"

yarnPath: .yarn/releases/yarn-3.5.0.cjs
yarnPath: .yarn/releases/yarn-3.8.1.cjs
1 change: 0 additions & 1 deletion apps/pie-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"keywords": [],
"author": "Just Eat Takeaway.com - Design System Team",
"license": "Apache-2.0",
"packageManager": "[email protected]",
"scripts": {
"build": "DEPLOYMENT_ENVIRONMENT='production' eleventy",
"build:dev": "DEPLOYMENT_ENVIRONMENT='development' eleventy",
Expand Down
1 change: 1 addition & 0 deletions apps/pie-storybook/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export default {
} as StoryBackgrounds,
controls: {
expanded: true,
sort: 'alpha',
},
viewport: {
viewports: CUSTOM_VIEWPORTS
Expand Down
1 change: 1 addition & 0 deletions configs/pie-components-config/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
playwright/.cache/
4 changes: 4 additions & 0 deletions configs/pie-components-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
"type": "module",
"author": "Just Eat Takeaway.com - Design System Team",
"description": "Shared configuration files for PIE components",
"bin": {
"playwright-lit-setup": "./scripts/playwright-lit-setup.js"
},
"files": [
"custom-elements-manifest.config.js",
"vite.config.js",
"tsconfig.json",
"playwright/**",
"playwright-lit-config.js",
"playwright-lit-visual-config.js"
],
Expand Down
1 change: 1 addition & 0 deletions configs/pie-components-config/playwright/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
// Despite being an empty file, Playwright component tests are dependant on this file existing.
32 changes: 32 additions & 0 deletions configs/pie-components-config/scripts/playwright-lit-setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/usr/bin/env node
import path from 'path';
import { fileURLToPath } from 'url';
import fs from 'fs/promises';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const destinationDir = path.resolve(process.cwd(), 'playwright');

async function copyPlaywrightFiles () {
try {
try {
await fs.access(destinationDir);
} catch (err) {
await fs.mkdir(destinationDir, { recursive: true });
}

const playwrightFiles = ['index.html', 'index.ts'];
playwrightFiles.forEach(async (file) => {
const sourceFile = path.resolve(__dirname, '..', `playwright/${file}`);
const destinationFile = path.resolve(destinationDir, file);

await fs.copyFile(sourceFile, destinationFile);
console.log(`Playwright ${file} copied successfully.`);
});
} catch (err) {
console.error('Error copying Playwright files.:', err);
}
}

copyPlaywrightFiles();
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"keywords": [],
"author": "Just Eat Takeaway.com - Design System Team",
"license": "Apache-2.0",
"packageManager": "[email protected]",
"private": true,
"engines": {
"node": "^16 || ^18 || ^20"
Expand Down Expand Up @@ -47,6 +46,7 @@
"test:ci": "yarn test:workflows && cross-env-shell turbo run test:ci --filter=!'./apps/examples/*' --filter=!pie-monorepo --token=${TURBO_TOKEN}",
"test:coverage": "turbo run test:coverage --filter=!pie-monorepo",
"test:generate-routes": "turbo run test:generate-routes --filter=!pie-monorepo --token=${TURBO_TOKEN}",
"test:browsers-setup": "turbo run test:browsers-setup --filter=!pie-monorepo --token=${TURBO_TOKEN}",
"test:browsers": "cross-env-shell turbo run test:browsers --filter=!pie-monorepo --token=${TURBO_TOKEN}",
"test:browsers:ci": "cross-env-shell turbo run test:browsers:ci --filter=!pie-monorepo --token=${TURBO_TOKEN}",
"test:visual": "turbo run test:visual --filter=!pie-monorepo",
Expand Down Expand Up @@ -129,7 +129,7 @@
},
"volta": {
"node": "20.9.0",
"yarn": "3.5.0"
"yarn": "3.8.1"
},
"resolutions": {
"@babel/traverse": "7.22.5",
Expand Down
1 change: 1 addition & 0 deletions packages/components/pie-assistive-text/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"watch": "run -T vite build --watch",
"test": "echo \"Error: no test specified\" && exit 0",
"test:ci": "yarn test",
"test:browsers-setup": "npx playwright-lit-setup",
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
"test:browsers:ci": "yarn test:browsers",
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_ASSISTIVE_TEXT} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
Expand Down
1 change: 0 additions & 1 deletion packages/components/pie-assistive-text/playwright/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/components/pie-button/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"watch": "run -T vite build --watch",
"test": "echo \"Error: no test specified\" && exit 0",
"test:ci": "yarn test",
"test:browsers-setup": "npx playwright-lit-setup",
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
"test:browsers:ci": "yarn test:browsers",
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_BUTTON} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
Expand Down
57 changes: 0 additions & 57 deletions packages/components/pie-button/playwright/index.html

This file was deleted.

1 change: 0 additions & 1 deletion packages/components/pie-button/playwright/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/components/pie-card/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"watch": "run -T vite build --watch",
"test": "echo \"Error: no test specified\" && exit 0",
"test:ci": "yarn test",
"test:browsers-setup": "npx playwright-lit-setup",
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
"test:browsers:ci": "yarn test:browsers",
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_CARD} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
Expand Down
57 changes: 0 additions & 57 deletions packages/components/pie-card/playwright/index.html

This file was deleted.

1 change: 0 additions & 1 deletion packages/components/pie-card/playwright/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/components/pie-chip/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"watch": "run -T vite build --watch",
"test": "echo \"Error: no test specified\" && exit 0",
"test:ci": "yarn test",
"test:browsers-setup": "npx playwright-lit-setup",
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
"test:browsers:ci": "yarn test:browsers",
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_CHIP} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
Expand Down
57 changes: 0 additions & 57 deletions packages/components/pie-chip/playwright/index.html

This file was deleted.

1 change: 0 additions & 1 deletion packages/components/pie-chip/playwright/index.ts

This file was deleted.

1 change: 1 addition & 0 deletions packages/components/pie-cookie-banner/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"watch": "run -T vite build --watch",
"test": "run -T vitest run test/unit",
"test:ci": "yarn test",
"test:browsers-setup": "npx playwright-lit-setup",
"test:browsers": "npx playwright test -c ./playwright-lit.config.ts",
"test:browsers:ci": "yarn test:browsers",
"test:visual": "run -T cross-env-shell PERCY_TOKEN=${PERCY_TOKEN_PIE_COOKIE_BANNER} percy exec --allowed-hostname cloudfront.net -- npx playwright test -c ./playwright-lit-visual.config.ts",
Expand Down
Loading

0 comments on commit 2fbf7f2

Please sign in to comment.