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
import{test,expect}from'@playwright/experimental-ct-react';importSomeComponentfrom'../../components/some_component';import{I18nextProvider}from'react-i18next';importi18nfrom'../../i18n/i18n';test.use({viewport: {width: 500,height: 500}});test('should work',async({ mount })=>{constcomponent=awaitmount(<I18nextProvideri18n={i18n}><SomeComponent/></I18nextProvider>);awaitexpect(component).toContainText('some text here');});
Describe the bug
When running a component test using I18nextProvider from react-i18next, I'd expect the provider to be available and translated text to be shown.
playwright test
expected:
• passing test
actual:
Running 1 test using 1 worker
✘ 1 [chromium] › tests/components/component.spec.tsx:9:1 › should work (1s)
1) [chromium] › tests/components/component.spec.tsx:9:1 › should work ======
undefined: Maximum call stack size exceeded
at ../../node_modules/.pnpm/@playwright+test@1.26.1/node_modules/@playwright/test/lib/mount.js:48
46 | }, use) => {
47 | await use(async (component, options) => {
> 48 | const selector = await page._wrapApiCall(async () => {
| ^
49 | return await innerMount(page, component, options);
50 | }, true);
51 | const locator = page.locator(selector);
The text was updated successfully, but these errors were encountered:
Context:
Code Snippet
Describe the bug
When running a component test using
I18nextProvider
fromreact-i18next
, I'd expect the provider to be available and translated text to be shown.expected:
• passing test
actual:
The text was updated successfully, but these errors were encountered: