You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to integrate E2E tests using Playwright in my Remix Shopify app, which is currently set up with Vite and Vitest for component-level testing. I'm using jsdom with React Testing Library for testing frontend components, and Remix Stub for testing actions and loaders.
Here's the current setup:
Vite + Vitest for environment configuration and testing setup
jsdom + React Testing Library for frontend component testing
Remix Stub for testing Remix actions and loaders
Vite's setupFiles for mocking the Shopify app and Polaris provider
Shopify App setup using @shopify/shopify-app-remix for session storage and app configuration
I been getting a few errors such as:
Error: The shopify global is not defined. This likely means the App Bridge script tag was not added correctly to this page
TestingLibraryElementError: Unable to find an element with the text: 🤖 Dev & Testing. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
Do you think it would be possible to create an official guide on setting up end-to-end (E2E) tests with this stack in the future? I understand that many people use different configurations based on their specific needs, but having an official reference configuration would be incredibly beneficial for the community. It could serve as a solid starting point for others looking to implement E2E tests with this setup.
I want to integrate E2E tests using Playwright in my Remix Shopify app, which is currently set up with Vite and Vitest for component-level testing. I'm using jsdom with React Testing Library for testing frontend components, and Remix Stub for testing actions and loaders.
Here's the current setup:
Vite + Vitest for environment configuration and testing setup
jsdom + React Testing Library for frontend component testing
Remix Stub for testing Remix actions and loaders
Vite's setupFiles for mocking the Shopify app and Polaris provider
Shopify App setup using @shopify/shopify-app-remix for session storage and app configuration
I been getting a few errors such as:
Error: The shopify global is not defined. This likely means the App Bridge script tag was not added correctly to this page
TestingLibraryElementError: Unable to find an element with the text: 🤖 Dev & Testing. This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.
I based most of my setup on this pr:
https://github.com/Shopify/shopify-app-js/pull/1207/commits
Do you think it would be possible to create an official guide on setting up end-to-end (E2E) tests with this stack in the future? I understand that many people use different configurations based on their specific needs, but having an official reference configuration would be incredibly beneficial for the community. It could serve as a solid starting point for others looking to implement E2E tests with this setup.
Thanks!
The text was updated successfully, but these errors were encountered: