Skip to content

@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

Conversation

shaurabh-tiwari-git
Copy link

What does this PR do?

What issues does this PR fix or reference?

@shaurabh-tiwari-git shaurabh-tiwari-git requested a review from a team as a code owner July 10, 2025 17:02
@@ -18,6 +18,7 @@
"jsdom": "^25.0.0",
"lodash.chunk": "^4.2.0",
"open": "^8.4.2",
"puppeteer": "^24.12.1",

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

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?

@sf-aastha-paruthi
Copy link

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();

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?

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.

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"

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?

Copy link
Collaborator

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

Copy link

@sf-kishore-kurri sf-kishore-kurri left a 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

@snehaljha-sf snehaljha-sf merged commit 7f41b72 into salesforcecli:prerelease/alpha Jul 16, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants