-
Notifications
You must be signed in to change notification settings - Fork 10
@W-18480490 - Call to Action link Validation #328
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
@W-18480490 - Call to Action link Validation #328
Conversation
@@ -18,6 +18,7 @@ | |||
"jsdom": "^25.0.0", | |||
"lodash.chunk": "^4.2.0", | |||
"open": "^8.4.2", | |||
"puppeteer": "^24.12.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the same package need to be added in yarn
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you validate the use case with plugin as well?
LGTM |
// Helper function to make HTTP request and check if URL is accessible | ||
async function checkSalesforceUrlWithPuppeteer(url: string): Promise<boolean> { | ||
const browser = await puppeteer.launch({ headless: true }); // use true instead of 'new' | ||
const page = await browser.newPage(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need puppeteer here, can't we simply use requests http library to hint the link and check for 200 response code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the links are not returning the response as 200, they are returning response 301, for valid as well as invalid URLs. And on the redirected URL the error is not coming directly, javascript rendering is first happening on the UI and then the error is showing up, which can not we captured without a browser environment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shaurabh-tiwari-git as discussed add the title check assertion also
yarn.lock
Outdated
@@ -11,13 +11,13 @@ | |||
|
|||
"@apexdevtools/apex-parser@^4.1.0": | |||
version "4.1.0" | |||
resolved "https://registry.yarnpkg.com/@apexdevtools/apex-parser/-/apex-parser-4.1.0.tgz#f8e801a8e4a65ff0e1fb70629642cda76e60fed3" | |||
resolved "https://registry.npmjs.org/@apexdevtools/apex-parser/-/apex-parser-4.1.0.tgz" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to check-in this file or it will be auto built based on package.json changes? Did you check with @snehaljha-sf about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is alright @sf-kishore-kurri, it'll ensure we have the exact dependency that have been added during development and validated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, but lets check whether we should check-in yarn.lock or not
What does this PR do?
What issues does this PR fix or reference?