Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ jobs:
path: ./css-coverage

- name: Analyze CSS Code Coverage
run: node scripts/analyze-css-coverage.ts --coverageDir=./css-coverage --minLineCoverage=.8 --minFileLineCoverage=.62 --showUncovered=violations
run: npm run css-coverage
13 changes: 8 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"lint": "oxlint --config oxlintrc.json",
"stylelint": "stylelint \"src/**/*.{css,svelte}\" --ignore-path .gitignore",
"build-css": "cat .svelte-kit/output/client/_app/immutable/assets/*.css > static/all.css"
"css-coverage": "css-coverage --coverage-dir=./css-coverage --min-line-coverage=.8 --min-file-line-coverage=.62 --show-uncovered=all"
},
"dependencies": {
"@bramus/specificity": "^2.4.2",
"@melt-ui/pp": "^0.3.2",
"@melt-ui/svelte": "^0.86.6",
"@oddbird/popover-polyfill": "^0.6.1",
"@projectwallace/css-analyzer": "^7.6.0",
"@projectwallace/css-code-coverage": "^0.2.2",
"@projectwallace/css-code-coverage": "^0.4.1",
"@projectwallace/css-code-quality": "^3.0.2",
"@projectwallace/css-design-tokens": "^0.6.0",
"@projectwallace/css-layer-tree": "^2.0.0",
Expand Down
180 changes: 0 additions & 180 deletions scripts/analyze-css-coverage.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/lib/components/coverage/Coverage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ test.describe('loading example file', () => {
.toHaveAccessibleName('https://www.projectwallace.com/_app/immutable/assets/0.BBE7cspC.css')
await expect.soft(first_row.getByRole('cell').nth(1)).toHaveAccessibleName('38 kB')
await expect.soft(first_row.getByRole('cell').nth(2)).toHaveAccessibleName('2,619')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('74.95%')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('72.28%')

// Elements in correct state:
await expect.soft(table.getByRole('row').nth(1)).toHaveAttribute('aria-selected', 'true')
Expand Down Expand Up @@ -109,7 +109,7 @@ test.describe('loading example file', () => {
.soft(first_row.getByRole('cell').nth(0))
.toHaveAccessibleName('https://www.projectwallace.com/_app/immutable/assets/0.BBE7cspC.css')
await expect.soft(first_row.getByRole('cell').nth(1)).toHaveAccessibleName('38 kB')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('74.95%')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('72.28%')
})

test('sorting by total size', async ({ page }) => {
Expand All @@ -123,7 +123,7 @@ test.describe('loading example file', () => {
.soft(first_row.getByRole('cell').nth(0))
.toHaveAccessibleName('https://www.projectwallace.com/_app/immutable/assets/0.BBE7cspC.css')
await expect.soft(first_row.getByRole('cell').nth(1)).toHaveAccessibleName('38 kB')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('74.95%')
await expect.soft(first_row.getByRole('cell').nth(3)).toHaveAccessibleName('72.28%')
let css_content = await page.getByTestId('pre-css').textContent()
expect.soft(css_content).toContain('.logo.svelte-1jiwtxp {')

Expand Down
Loading