Skip to content

Commit

Permalink
fix!: delete visibleContent check to remove get-pixels dependency
Browse files Browse the repository at this point in the history
When migration Financial-Times/next-preflight#723 to Tool Kit, the snyk
check failed as the `get-pixels` dependency of `n-test` has a couple of
security advisories open (see link below). Unfortunately the get-pixels
dependency has not been updated in a couple of years and show no sign
of resolving this issue.

https://app.snyk.io/org/customer-products/project/4d2f1c5e-1868-477b-afcf-70879ce6b2d9/pr-check/7ee89281-dbc5-4879-801e-80432000340d

This dependency is only for the `visibleContent` check which isn't
configured in any repository in the Financial-Times org:

https://github.com/search?q=org%3AFinancial-Times%20visibleContent&type=code

Therefore we can remove this functionality. I spoke with Arjun to double
check and he informed me that this was an experimental feature that
never took off which can be removed.
  • Loading branch information
joelcarr committed Feb 1, 2024
1 parent c7a2d6a commit d4e08bb
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 10,486 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ urls: {
content: (content) => {
return content.includes('some-text');
},
visibleContent: {
contentSelector: '.headline, .image, .standfirst'
threshold: 30 // % of viewport that should be visible content
},
performance: true, //checks firstPaint/firstContentfulPaint against baseline. default = 2000, or can specify.
description: 'Each test may have an optional description. It will display when the test result is reported',
}
Expand Down
3 changes: 1 addition & 2 deletions lib/checks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,5 @@ module.exports = {
pageErrors: require('./page-errors'),
performance: require('./performance'),
responseHeaders: require('./response-headers'),
screenshot: require('./screenshot'),
visibleContent: require('./visible-content')
screenshot: require('./screenshot')
};
60 changes: 0 additions & 60 deletions lib/checks/visible-content.js

This file was deleted.

Loading

0 comments on commit d4e08bb

Please sign in to comment.