Skip to content
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

Custom Components - Child blocks - svelte & svelteKit all examples #3968

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

uttej-vsk
Copy link
Contributor

@uttej-vsk uttej-vsk commented Mar 12, 2025

Description

@samijaber This is part 2 of the Custom Components - Child Blocks ticket-133. It contains Svelte code for all three example snippets. Whenever you have the chance, please review this.

Update: I have pushed svelte and sveltekit to this PR.

@uttej-vsk uttej-vsk requested a review from samijaber March 12, 2025 22:39
Copy link

changeset-bot bot commented Mar 12, 2025

⚠️ No Changeset found

Latest commit: 2bcae8f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

gitguardian bot commented Mar 12, 2025

⚠️ GitGuardian has uncovered 1 secret following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

Since your pull request originates from a forked repository, GitGuardian is not able to associate the secrets uncovered with secret incidents on your GitGuardian dashboard.
Skipping this check run and merging your pull request will create secret incidents on your GitGuardian dashboard.

🔎 Detected hardcoded secret in your pull request
GitGuardian id GitGuardian status Secret Commit Filename
11707119 Triggered Generic High Entropy Secret 6f1165a packages/sdks/snippets/sveltekit/src/routes/editable-region/+page.svelte View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secret safely. Learn here the best practices.
  3. Revoke and rotate this secret.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Copy link

nx-cloud bot commented Mar 12, 2025

View your CI Pipeline Execution ↗ for commit 2bcae8f.

Command Status Duration Result
nx test @e2e/qwik-city ✅ Succeeded 8m 2s View ↗
nx test @e2e/nuxt ✅ Succeeded 7m 39s View ↗
nx test @e2e/nextjs-sdk-next-app ✅ Succeeded 7m 36s View ↗
nx test @e2e/angular-16-ssr ✅ Succeeded 6m 15s View ↗
nx test @e2e/sveltekit ✅ Succeeded 6m 2s View ↗
nx test @e2e/angular-16 ✅ Succeeded 6m 7s View ↗
nx test @e2e/hydrogen ✅ Succeeded 5m 56s View ↗
nx test @e2e/angular-19-ssr ✅ Succeeded 5m 49s View ↗
Additional runs (36) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-03-13 01:59:12 UTC

@@ -66,7 +66,7 @@ export default defineConfig({
/**
* Increase the default timeout for snippet tests because they're not deterministic.
*/
timeout: testType === 'snippet' ? 30000 : 5000,
timeout: testType === 'snippet' ? 60000 : 5000,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious question:
why do we have to ramp up the time for snippets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yash-builder I tried debugging this issue and found this answer in Stackoverflow.

You currently don't specify a timeout when you call toBeVisible(), and your code defaults to 5000ms, which is 5 seconds.
Perhaps it is possible that the page locater is taking longer than 5 seconds to find the logout button.

One solution you can try; from https://playwright.dev/docs/test-timeouts:
await expect(logoutLink).toBeVisible({ timeout: 10000 });
To increase the timeout to a large enough value that it might be able to pick it up.
Await can take a really long time especially looking for elements so I think this would be a good first step.

So i came up with this assumption of increasing the timeout in our playwright.config.ts file like this:

expect: {
/**
* Increase the default timeout for snippet tests because they're not deterministic.
*/
timeout: testType === 'snippet' ? 60000 : 5000,
},

The comments even mentioned that we can increase the default timeout for snippet tests. But we didn't have this issue until the day before yesterday, so we had to change. This is just one assumption.

@uttej-vsk uttej-vsk changed the title Custom Components - Child blocks - svelte all examples Custom Components - Child blocks - svelte & svelteKit all examples Mar 13, 2025
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.

2 participants