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

fix(helper): test setup mimics sandbox environment #341

Merged
merged 1 commit into from
Jan 25, 2024

Conversation

BibiSebi
Copy link
Contributor

What?

This PR resolves CI breaking after PR #333 was merged. This error occurred because the origin inside the vitest environment was 'localhost' which is currently not permitted.

Why?

JIRA: EXT-2188

How to test? (optional)

  1. Inside the root run yarn test:react and yarn test:vue3

Remove unused test commands from root
@BibiSebi BibiSebi requested a review from eunjae-lee January 23, 2024 15:05
Copy link

vercel bot commented Jan 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
plugin-sandbox ✅ Ready (Inspect) Visit Preview Jan 23, 2024 3:05pm

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also tried changing the location to the sandbox url inside the location stub but sadly I could not make it work.

  vi.stubGlobal('location', {
    ...window.location,
    search: `?protocol=https%3A&host=plugin-sandbox.storyblok.com&uid=test-uid&preview=1`,
  })

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah the current update seems good :)

Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

thanks for the fix!

@eunjae-lee eunjae-lee changed the title fix(helper): Test setup mimics sandbox environment. fix(helper): test setup mimics sandbox environment Jan 24, 2024
@BibiSebi BibiSebi merged commit 1e8889e into main Jan 25, 2024
13 checks passed
@BibiSebi BibiSebi deleted the EXT-2188-field-plugin-ci-template-tests-breaking branch January 25, 2024 08:59
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