Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated visual regression assertions #243

Merged
merged 6 commits into from
Aug 29, 2024
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
5 changes: 5 additions & 0 deletions .changeset/heavy-monkeys-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"docs-app": patch
---

Updated failing assertions
6 changes: 6 additions & 0 deletions .changeset/three-walls-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"docs-app": patch
"test-app": patch
---

Updated development dependencies
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:
NODE_VERSION: 18
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_number }}
PERCY_PARALLEL_TOTAL: 9
PNPM_VERSION: 9

jobs:
lint:
Expand All @@ -29,7 +30,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: 9
# version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
Expand All @@ -56,7 +57,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: 9
# version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
Expand Down Expand Up @@ -121,7 +122,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: 9
# version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
Expand Down Expand Up @@ -164,7 +165,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: 9
# version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
Expand Down Expand Up @@ -205,7 +206,7 @@ jobs:
- name: Set up pnpm
uses: pnpm/action-setup@v4
# with:
# version: 9
# version: ${{ env.PNPM_VERSION }}

- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
Expand Down
8 changes: 4 additions & 4 deletions configs/eslint/ember/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
},
"dependencies": {
"@rushstack/eslint-patch": "^1.10.4",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-ember": "^12.1.1",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-qunit": "^8.1.1",
"eslint-plugin-qunit": "^8.1.2",
"eslint-plugin-simple-import-sort": "^12.1.1",
"eslint-plugin-typescript-sort-keys": "^3.2.0"
},
Expand Down
6 changes: 3 additions & 3 deletions configs/eslint/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
"@babel/core": "^7.25.2",
"@babel/eslint-parser": "7.25.1",
"@rushstack/eslint-patch": "^1.10.4",
"@typescript-eslint/eslint-plugin": "^8.1.0",
"@typescript-eslint/parser": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-import-resolver-typescript": "^3.6.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.2.1",
Expand Down
16 changes: 8 additions & 8 deletions docs-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@glint/environment-ember-loose": "^1.4.0",
"@glint/environment-ember-template-imports": "^1.4.0",
"@glint/template": "^1.4.0",
"@percy/cli": "^1.29.1",
"@percy/cli": "^1.29.2",
"@percy/ember": "^4.2.0",
"@shared-configs/ember-template-lint": "workspace:*",
"@shared-configs/eslint-config-ember": "workspace:*",
Expand All @@ -75,7 +75,7 @@
"d3-scale": "^4.0.2",
"d3-selection": "^3.0.0",
"d3-shape": "^3.2.0",
"ember-a11y-refocus": "^4.1.1",
"ember-a11y-refocus": "^4.1.4",
"ember-a11y-testing": "^6.1.1",
"ember-auto-import": "^2.7.4",
"ember-cli": "~5.10.0",
Expand All @@ -94,23 +94,23 @@
"ember-qunit": "^8.1.0",
"ember-resolver": "^12.0.1",
"ember-source": "~5.10.2",
"ember-svg-jar": "^2.4.9",
"ember-svg-jar": "^2.5.0",
"ember-template-imports": "^4.1.1",
"ember-template-lint": "^6.0.0",
"ember-test-selectors": "^7.0.0",
"ember-truth-helpers": "^4.0.3",
"embroider-css-modules": "^2.0.9",
"embroider-css-modules": "^2.0.10",
"eslint": "^8.57.0",
"loader.js": "^4.7.0",
"postcss": "^8.4.41",
"postcss-loader": "^8.1.1",
"prettier": "^3.3.3",
"qunit": "^2.21.1",
"qunit": "^2.22.0",
"qunit-dom": "^3.2.0",
"stylelint": "^16.8.1",
"type-css-modules": "^1.0.11",
"stylelint": "^16.9.0",
"type-css-modules": "^1.0.13",
"typescript": "^5.5.4",
"webpack": "^5.93.0"
"webpack": "^5.94.0"
},
"engines": {
"node": "18.* || >= 20"
Expand Down
15 changes: 8 additions & 7 deletions docs-app/tests/acceptance/album/visual-regression-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,16 +101,17 @@ module('Acceptance | album', function (hooks) {

test('@w3 @h2 Visual snapshot', async function (assert) {
assert
.dom('[data-test-table="Tracks"]')
.exists('We see the album tracks in a table.');

assert
.dom('[data-test-table="Tracks"] [data-test-row]')
.exists({ count: 11 }, 'We see 11 tracks.');
.dom('[data-test-list="Tracks"]')
.exists('We see the album tracks in a list.')
.hasAttribute(
'data-css-grid',
'4 x 3',
'We see 11 tracks in a 4 x 3 grid.',
);

assert
.dom('[data-test-track-lyrics]')
.exists("We see the current track's lyrics.");
.doesNotExist("We don't see the current track's lyrics.");

await takeSnapshot(assert);
});
Expand Down
30 changes: 6 additions & 24 deletions docs-app/tests/acceptance/dashboard/visual-regression-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,11 @@ module('Acceptance | dashboard', function (hooks) {

assert
.dom('[data-test-widget="2"] [data-test-field="Annual Revenue"]')
.hasText(
'Annual revenue: $2.3 billion',
'We see the annual revenue in correct format.',
);
.hasText('$2.3 billion', 'We see the annual revenue in correct format.');

assert
.dom('[data-test-widget="2"] [data-test-field="Relevant Years"]')
.hasText(
'Relevant years: 1973 - 1982',
'We see the relevant years in correct format.',
);
.hasText('1973 - 1982', 'We see the relevant years in correct format.');

// Widget 3
assert
Expand Down Expand Up @@ -220,17 +214,11 @@ module('Acceptance | dashboard', function (hooks) {

assert
.dom('[data-test-widget="2"] [data-test-field="Annual Revenue"]')
.hasText(
'Annual revenue: $2.3 billion',
'We see the annual revenue in correct format.',
);
.hasText('$2.3 billion', 'We see the annual revenue in correct format.');

assert
.dom('[data-test-widget="2"] [data-test-field="Relevant Years"]')
.hasText(
'Relevant years: 1973 - 1982',
'We see the relevant years in correct format.',
);
.hasText('1973 - 1982', 'We see the relevant years in correct format.');

// Widget 3
assert
Expand Down Expand Up @@ -415,17 +403,11 @@ module('Acceptance | dashboard', function (hooks) {

assert
.dom('[data-test-widget="2"] [data-test-field="Annual Revenue"]')
.hasText(
'Annual revenue: $2.3 billion',
'We see the annual revenue in correct format.',
);
.hasText('$2.3 billion', 'We see the annual revenue in correct format.');

assert
.dom('[data-test-widget="2"] [data-test-field="Relevant Years"]')
.hasText(
'Relevant years: 1973 - 1982',
'We see the relevant years in correct format.',
);
.hasText('1973 - 1982', 'We see the relevant years in correct format.');

// Widget 3
assert
Expand Down
Loading