Skip to content

Commit

Permalink
Restructure HTML tests (#5311)
Browse files Browse the repository at this point in the history
* Restructure tests

* Clean up

* Use rootDir

* Fix path

* Port to html2

* Add rootDir and reporters

* Fix snapshots

* Fix snapshots

* Move coverage and reporter to root Jest config

* Add roots

* Pack jest.*.config.js

* Include other Jest files

* Specify other Jest config

* Include HTML2 transformer

* Clean up

* Move maxWorkers to root config

* Add comments
  • Loading branch information
compulim authored Sep 26, 2024
1 parent f3aab8d commit be287d7
Show file tree
Hide file tree
Showing 23 changed files with 150 additions and 121 deletions.
1 change: 1 addition & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ overrides:

- files:
- 'jest.config.js'
- 'jest.*.config.js'

env:
node: true
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/pull-request-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ jobs:
./babel-passthru-transformer.js
./babel.config.json
./docker-compose-wsl2.yml
./html2-test-transformer.js
./jest.config.js
./jest.html2.config.js
./jest.legacy.config.js
./package-lock.json
./package.json
./__tests__/
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/__tests__/__image_snapshots__/**/__diff_output__
/__tests__/html2/**/*.snap-*-diff.png
/.env
/*.tgz
/coverage
Expand Down
5 changes: 0 additions & 5 deletions __tests__/html/fluentTheme/preChatMessageActivity.js

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 0 additions & 5 deletions __tests__/html/fluentTheme/preChatMessageActivity.wide.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@

await pageConditions.numActivitiesShown(1);

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

await pageConditions.numActivitiesShown(1);

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

await pageConditions.numActivitiesShown(1);

await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@
type: 'https://schema.org/Person',
description: 'Ready to explore? Select one of the suggestions below to get started...',
name: 'Onboarding Buddy',
image: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAJIAAACQCAMAAADUbcK3AAAC+lBMVEUAAADxX0TJpYvTsaLPsJn+a0zUuqTQspv4ZEj+XTvMdmP/akr6Wjr/c1TzUzbTtqH/ZUPRtJ3StZ7VuqXPrZTj1Mf/YT//ZkXh0cT8YUP+bUzgzcDRt6P0Vzv+YT/6akz/ZkX/bEzj1Mj/aUnUuKP/YkDh08f+aEjStp//XTv/YD3Rs5z/Xz3QsZrKqY/StaHi1MfaNx//YkL/Y0LMq5LNrJPKp43/b1Di08jTt6D/YkD+aUn8cFLLqY/+Wjzi08bLpoz/cVH/ZkX+bk/3Qyrg0cPUt6LcxrTWvar/eVrqRy//ZEL3QSb/XTrLqpDcxrXUuaP/a0r6Wjv0PiPj1cj1QSbxRCnhz8L+f2LMq5L/e134RSn5NR36e17dybrZwK77TTD6TjPg0cP/fV/QsZnrPif8RCv5KhT8PSTaxLP8RirXvqv5OyHEJRL/bEzJpYr/eVrEJxL9LBb+SS3/f1/8UDDPoYznRSr8JA/fzLzMLBbh08fbx7fXwK7VvKjcybrey7zYw7PWvqvUuqX/aEfezb/fz8HStqHRtZ//YkH/akrg0cXaxbT/bk7/ZUX/bEv/cVLYwrD/c1T/YT7TuKP/ZEP/TjH/b1D/RSv/UzXg0MP/Qyj/NRz/dlj/eFr/Nx7/Xj7/SC3/dVb/Xjv/elz/cFH/YEL/UDP/PSP/aEn/VTnJp43/Sy//QSb/OSD/OyL/XUH/MRnbopLcrZ3YlIPWjn3/WT3/WDn/PyXLqY/PemjPsZrcqJfLq5Lano7ThHL/a07/LhfMrZTTgG/RfWvLbFr/ZUjOr5fTi3nQgG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rRYIIJOOprvpqiCgJHOTzefqnUuHFss0rJ00hw0kOEyeZTfmSRMjo7Gp69aShg20aJX3lI6BMOePQ+jVjcK6HaUrRVHLSBWkikE6ecnZ9Lnn1pLafxEbAkS0TF4yfNI4MP0G3Lb7SWWk2mw1nJYpYVNVUX4MfuorRe/fuPb5y++rJU8g/JkvMUWn0ZpPhTOAJObiIZars+vz5cPr+/fvHjSBBKUaxLUel2r1R/Bqhn0RWqwlpMkhQE2TqrK1XJezaHyJrfCIJdvJVV/9BZDap1CToRU34B5FZn0OCX9LWqxJF8PhFwd83/rZ7ddgisylOTUJQ0qLhizSpAglBMZkSRGhAhEXSkpC0dpF0ESdpUuUkNGVuDDiz0WAihEUKUTHHciXefi7SJAokVE3fmSdtHrFMGWoSuuZvzJMuUulICFu7eKOE28/TKOQklGmzpYr0iTEkpAlRMElao1SIQps8K9sS8ByFXQRTVLbICYniU2UkDAna7E3iJqRelQBRWIpevNNwYcgJ6dSosgQSthJ3Dz2P9JiQ4Sw6c5MlkMhkVWnlJKwJMm3mTsPfRCZ9nCI6rCKOitamZm+C6fd5ZNXHZ2SpAfofybRZmXG7Nxn9V85otOo1qowEhVog/y+oEjIzcuJUKC4uJyM1kXr+e3jx1CqQVqeOIZEiRYoUKVKkSJEiRYoUtL4DkaWZtZT0Fr4AAAAASUVORK5CYII='
}
}
],
Expand Down Expand Up @@ -104,23 +105,25 @@

await pageConditions.numActivitiesShown(1);

await host.snapshot();
await host.snapshot('local');

// WHEN: The first card action button is clicked.
await host.click(
document.querySelector(`[data-testid="${WebChat.testIds.preChatMessageActivityStarterPromptsCardAction}"]`)
);

// THEN: Send box text box should have the value typed for the user.
await host.snapshot();
await host.snapshot('local');

// WHEN: The sixth (last) card action button is clicked.
await host.click(
document.querySelectorAll(`[data-testid="${WebChat.testIds.preChatMessageActivityStarterPromptsCardAction}"]`)[5]
document.querySelectorAll(
`[data-testid="${WebChat.testIds.preChatMessageActivityStarterPromptsCardAction}"]`
)[5]
);

// THEN: Send box text box should be replaced.
await host.snapshot();
await host.snapshot('local');
});
</script>
</body>
Expand Down
1 change: 1 addition & 0 deletions docker-compose-wsl2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ services:
stop_grace_period: 0s
volumes:
- ./__tests__/html/:/var/web/__tests__/html/
- ./__tests__/html2/:/var/web/__tests__/html2/
- ./packages/bundle/dist/:/var/web/packages/bundle/dist/
- ./packages/fluent-theme/dist/:/var/web/packages/fluent-theme/dist/
- ./packages/test/fluent-bundle/dist/:/var/web/packages/test/fluent-bundle/dist/
Expand Down
16 changes: 16 additions & 0 deletions html2-test-transformer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const { relative, resolve } = require('path');

const testRoot = resolve(__dirname, './__tests__/html2/');

module.exports = {
process: (_, sourcePath) => {
const html = relative(testRoot, sourcePath);

return {
code: `
test(${JSON.stringify(html)}, () =>
runHTML(${JSON.stringify(`/__tests__/html2/${html}`)}));
`
};
}
};
Loading

0 comments on commit be287d7

Please sign in to comment.