To have more parity between the CLI and the Extension known breakages section has been added to the CLI which detects libraries like fb-comments, fb-likes, gsi, gis, jetpack-likes, jetpack-comments.
Relevant Technical Choices
Resources from the main frame are collected using Page.on which is available from the puppeteer api.
These resources are passed to the detectSignatures which detect the GSI and GIS based on the scripts and their content.
The functions which detect breakages other than GSI and GIS are injected in the puppeteer opened Page and then they are executed.
The results from detectSignatures and the domQuery functions are sent to the CLI for post processing and then they are used to show the details on the CLI-Dashboard.
Testing Instructions
Clone this branch.
Run the following command on the terminal npm run build-cli
Run the command npm run cli -- -u https://domain-aaa.com/gsi to detect GSI in the CLI-Dashboard.
Open the CLI-dashboard to see known breakages section listing GSI as a breakage.
For Facebook Comments run the cli on https://domain-aaa.com/facebook-comments.
Additional Information:
Screenshot/Screencast
Checklist
[x] I have thoroughly tested this code to the best of my abilities.
[x] I have reviewed the code myself before requesting a review.
~[ ]This code is covered by unit tests to verify that it works as intended.~ NA
[x] The QA of this PR is done by a member of the QA team (to be checked by QA).
Description
To have more parity between the CLI and the Extension known breakages section has been added to the CLI which detects libraries like
fb-comments
,fb-likes
,gsi
,gis
,jetpack-likes
,jetpack-comments
.Relevant Technical Choices
Page.on
which is available from the puppeteer api.detectSignatures
which detect the GSI and GIS based on the scripts and their content.detectSignatures
and the domQuery functions are sent to the CLI for post processing and then they are used to show the details on the CLI-Dashboard.Testing Instructions
npm run build-cli
npm run cli -- -u https://domain-aaa.com/gsi
to detect GSI in the CLI-Dashboard.https://domain-aaa.com/facebook-comments
.Additional Information:
Screenshot/Screencast
Checklist
Related: https://github.com/GoogleChromeLabs/ps-analysis-tool/pull/555 Partially addresses: https://github.com/GoogleChromeLabs/ps-analysis-tool/issues/656