lighthouse 8.5.1-dev.20210928 → 8.5.1-dev.20211002

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/flow-report/.eslintrc.cjs +49 -0
  2. package/flow-report/assets/styles.css +1 -0
  3. package/flow-report/jest.config.js +1 -1
  4. package/flow-report/package.json +4 -0
  5. package/flow-report/src/app.tsx +8 -5
  6. package/flow-report/src/header.tsx +5 -1
  7. package/flow-report/src/i18n/i18n.tsx +44 -0
  8. package/flow-report/src/i18n/localized-strings.js +11 -0
  9. package/flow-report/src/i18n/ui-strings.js +40 -0
  10. package/flow-report/src/sidebar/sidebar.tsx +10 -15
  11. package/flow-report/src/summary/category.tsx +21 -13
  12. package/flow-report/src/summary/summary.tsx +24 -10
  13. package/flow-report/src/topbar.tsx +4 -1
  14. package/flow-report/src/util.ts +7 -7
  15. package/flow-report/test/app-test.tsx +1 -12
  16. package/flow-report/test/header-test.tsx +7 -13
  17. package/flow-report/test/sample-flow.ts +17 -0
  18. package/flow-report/test/sidebar/flow-test.tsx +6 -12
  19. package/flow-report/test/sidebar/sidebar-test.tsx +7 -13
  20. package/flow-report/test/summary/category-test.tsx +22 -14
  21. package/flow-report/test/summary/summary-test.tsx +5 -13
  22. package/flow-report/test/util-test.tsx +1 -12
  23. package/flow-report/tsconfig.json +1 -0
  24. package/jest.config.js +0 -15
  25. package/lighthouse-core/fraggle-rock/api.js +10 -0
  26. package/lighthouse-core/fraggle-rock/user-flow.js +27 -3
  27. package/lighthouse-core/lib/i18n/i18n.js +13 -1
  28. package/lighthouse-core/lib/i18n/locales/en-US.json +45 -0
  29. package/lighthouse-core/lib/i18n/locales/en-XL.json +45 -0
  30. package/lighthouse-core/lib/i18n/swap-flow-locale.js +20 -0
  31. package/lighthouse-core/lib/stack-packs.js +1 -13
  32. package/package.json +11 -9
  33. package/readme.md +1 -1
  34. package/report/clients/psi.js +1 -0
  35. package/report/test/clients/psi-test.js +2 -3
  36. package/report/test/renderer/report-renderer-axe-test.js +86 -0
  37. package/report/test/renderer/report-renderer-test.js +0 -55
  38. package/third-party/chromium-synchronization/inspector-issueAdded-types-test.js +5 -3
  39. package/third-party/chromium-synchronization/installability-errors-test.js +2 -1
@@ -233,59 +233,4 @@ describe('ReportRenderer', () => {
233
233
  .querySelectorAll('.lh-audit--notapplicable').length;
234
234
  assert.strictEqual(notApplicableCount, notApplicableElementCount);
235
235
  });
236
-
237
- describe('axe-core', () => {
238
- let axe;
239
-
240
- beforeAll(async () =>{
241
- // Needed by axe-core
242
- // https://github.com/dequelabs/axe-core/blob/581c441c/doc/examples/jsdom/test/a11y.js#L24
243
- global.window = global.self;
244
- global.Node = global.self.Node;
245
- global.Element = global.self.Element;
246
-
247
- // axe-core must be imported after the global polyfills
248
- axe = (await import('axe-core')).default;
249
- });
250
-
251
- afterAll(() => {
252
- global.window = undefined;
253
- global.Node = undefined;
254
- global.Element = undefined;
255
- });
256
-
257
- it('renders without axe violations', () => {
258
- const container = renderer._dom._document.createElement('main');
259
- const output = renderer.renderReport(sampleResults, container);
260
- renderer._dom._document.body.appendChild(container);
261
-
262
- const config = {
263
- rules: {
264
- // Reports may have duplicate ids
265
- // https://github.com/GoogleChrome/lighthouse/issues/9432
266
- 'duplicate-id': {enabled: false},
267
- 'duplicate-id-aria': {enabled: false},
268
- 'landmark-no-duplicate-contentinfo': {enabled: false},
269
- // The following rules are disable for axe-core + jsdom compatibility
270
- // https://github.com/dequelabs/axe-core/tree/b573b1c1/doc/examples/jest_react#to-run-the-example
271
- 'color-contrast': {enabled: false},
272
- 'link-in-text-block': {enabled: false},
273
- // Report has empty links prior to i18n-ing.
274
- 'link-name': {enabled: false},
275
- // May not be a real issue. https://github.com/dequelabs/axe-core/issues/2958
276
- 'nested-interactive': {enabled: false},
277
- },
278
- };
279
-
280
- return new Promise(resolve => {
281
- axe.run(output, config, (error, {violations}) => {
282
- expect(error).toBeNull();
283
- expect(violations).toEqual([]);
284
- resolve();
285
- });
286
- });
287
- // This test takes 40s on fast hardware, and 50-60s on GHA.
288
- // https://github.com/dequelabs/axe-core/tree/b573b1c1/doc/examples/jest_react#timeout-issues
289
- }, /* timeout= */ 100 * 1000);
290
- });
291
236
  });
@@ -7,7 +7,7 @@
7
7
 
8
8
  const fs = require('fs');
9
9
  const fetch = require('node-fetch');
10
- const {LH_ROOT} = require('../../../root.js');
10
+ const {LH_ROOT} = require('../../root.js');
11
11
 
12
12
  const inspectorIssuesGathererPath = LH_ROOT +
13
13
  '/lighthouse-core/gather/gatherers/inspector-issues.js';
@@ -31,7 +31,8 @@ describe('issueAdded types', () => {
31
31
  .sort();
32
32
  });
33
33
 
34
- it('should notify us if something changed', () => {
34
+ // TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
35
+ it.skip('should notify us if something changed', () => {
35
36
  expect(inspectorIssueDetailsTypes).toMatchInlineSnapshot(`
36
37
  Array [
37
38
  "blockedByResponseIssueDetails",
@@ -44,7 +45,8 @@ describe('issueAdded types', () => {
44
45
  `);
45
46
  });
46
47
 
47
- it('are each handled explicitly in the gatherer', () => {
48
+ // TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
49
+ it.skip('are each handled explicitly in the gatherer', () => {
48
50
  // Regex relies on the typecasts
49
51
  const sourceTypeMatches = inspectorIssuesGathererSource.matchAll(
50
52
  /LH\.Crdp\.Audits\.(.*?Details)>/g
@@ -74,7 +74,8 @@ Array [
74
74
  `);
75
75
  });
76
76
 
77
- it('are each handled explicitly in the gatherer', () => {
77
+ // TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
78
+ it.skip('are each handled explicitly in the gatherer', () => {
78
79
  const errorStrings = Object.keys(InstallableManifestAudit.UIStrings)
79
80
  .filter(key => chromiumErrorIds.includes(key))
80
81
  .sort();