{"_id":"playwright-i18next-fixture","name":"playwright-i18next-fixture","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"playwright-i18next-fixture","version":"1.0.0","description":"<div align=\"center\">   <br>   <header>     <img src=\"https://github.com/cubanducko/playwright-i18next-fixture/blob/main/assets/logo.png?raw=true\" height=\"64\" />   </header>   <br>   <h1>playwright-i18next-fixture</h1>   <p> 📝 Use your `i18next` translati","main":"dist/index.js","types":"dist/index.d.ts","typings":"dist/index.d.ts","scripts":{"build":"tsup ./src/index.ts --dts","lint":"eslint ./src","lint:fix":"pnpm lint --fix","lint:types":"tsc --noEmit","test":"playwright test","prepublishOnly":"pnpm build","semantic-release":"semantic-release"},"repository":{"type":"git","url":"git+https://github.com/cubanducko/playwright-i18next-fixture.git"},"author":{"name":"Ricardo Domínguez","email":"rdominguez.alvarez.dev@gmail.com"},"license":"MIT","homepage":"https://github.com/cubanducko/playwright-i18next-fixture#readme","bugs":{"url":"https://github.com/cubanducko/playwright-i18next-fixture/issues"},"keywords":["playwright","fixtures","i18next","i18n","utility"],"devDependencies":{"@playwright/test":"^1.27.1","@semantic-release/changelog":"6.0.1","@semantic-release/git":"10.0.1","@semantic-release/npm":"9.0.1","@types/jest":"29.0.3","@types/node":"^18.11.4","@typescript-eslint/eslint-plugin":"5.38.1","@typescript-eslint/parser":"5.38.1","eslint":"8.24.0","husky":"8.0.1","jest":"29.0.3","lint-staged":"13.0.3","prettier":"2.7.1","semantic-release":"19.0.5","ts-jest":"29.0.2","tsup":"6.2.3","typescript":"4.8.4"},"peerDependencies":{"@playwright/test":"^1.26.0"},"release":{"branches":["main",{"name":"next","prerelease":"rc"}],"verifyConditions":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"],"prepare":["@semantic-release/changelog","@semantic-release/npm","@semantic-release/git"]},"lint-staged":{"src/**/**/*.{ts}":["eslint --fix","git add"]},"dependencies":{"i18next":"^21.10.0"},"gitHead":"f6b6b3ee2b18a394d302f0f7fc6a12f6b86c71ff","_id":"playwright-i18next-fixture@1.0.0","_nodeVersion":"16.13.0","_npmVersion":"8.1.0","dist":{"integrity":"sha512-7YQXB8zNGlu8ThXaM1pfGefcHdS97FE0Y4R/VrSLwi2DqjJrYx60cWR4KgcEjGvOUaaVMgyu7WlbQJDoHXGzAQ==","shasum":"f8862b9794a467a0fc117c3ba98a1aa86088197f","tarball":"https://registry.npmjs.org/playwright-i18next-fixture/-/playwright-i18next-fixture-1.0.0.tgz","fileCount":22,"unpackedSize":238018,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCMj6kcxnajFGQPA358CxQYTQS2deNqpS71x3yI9OVl9wIgWO+e57ifa+iY2LdF/K1Xg67/yDNUHWWsRnQDfkU90Q8="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjVpdwACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpcFA/+L0OOhWKXCCvJ4e2IddzSGt+1FyxEmyC/eGBZ6CmrZHLgtwV4\r\nP3hbClPH4IKgpY/OEh1ofpgodXGQJ6wPDGSYQnDkI1MS8FWXNOR/GRlgJ3/g\r\nPaYGgGjGKMYSIPy/58hSJKN638mcM9FxhLbGKE4jO9a/Sj7YYjxTwu3r6HOO\r\na3OZRWdLLicKnHRzsnG4SwdcR+yNLQd3jVRh4Li5lGhzIZBVWscvI5TilFCo\r\nA5CDfP3IUHxW8DisGzyY2HLmgV7oQ1fst9KguBTMyvtW2Ul82xZYJjOx5X5G\r\nM5RxuBhjh4jcMXP+UQhGb+mY1EJSWfK0AGS0DfYLP0pnruPJ47T/MViL4PMw\r\n6Aps1FD4QUZiKHCjFjDUM14zIVRZu7AdRnf0SSsgqFL4SZpgk8uv3D16Epi4\r\nMvv/V0sohyoJSBLxgv1EWJ/0HXZWjIA0kry1EJW9c6bomn8XvA3JztZm0I3u\r\nqw0ST/yrRU9N8JVmHhLidaBH6FAAjpid+9I5KSSDoqlQ7JBukmwFZ+BnJwSF\r\nvkb/vKaL6G9jB0N5G0APEcSPOO9W9xMe1bMXEskpPB61VRdeVWAS3U1gPT22\r\ndw2N/p5Gkn3Bzz9JT32raPiCn4pSqG8pqe1MVDgT9YTiZxKif0AJJqXO2ZLT\r\nOifwdEKFFNG6Ju5TVwWTaUV0S9UPLRUAVlg=\r\n=el6Y\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"cubanducko","email":"r.dominguez.alvarez.dev@gmail.com"},"directories":{},"maintainers":[{"name":"cubanducko","email":"r.dominguez.alvarez.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/playwright-i18next-fixture_1.0.0_1666619248040_0.009668395807758579"},"_hasShrinkwrap":false}},"time":{"created":"2022-10-24T13:47:28.040Z","1.0.0":"2022-10-24T13:47:28.262Z","modified":"2022-10-24T13:47:28.406Z"},"maintainers":[{"name":"cubanducko","email":"r.dominguez.alvarez.dev@gmail.com"}],"description":"<div align=\"center\">   <br>   <header>     <img src=\"https://github.com/cubanducko/playwright-i18next-fixture/blob/main/assets/logo.png?raw=true\" height=\"64\" />   </header>   <br>   <h1>playwright-i18next-fixture</h1>   <p> 📝 Use your `i18next` translati","homepage":"https://github.com/cubanducko/playwright-i18next-fixture#readme","keywords":["playwright","fixtures","i18next","i18n","utility"],"repository":{"type":"git","url":"git+https://github.com/cubanducko/playwright-i18next-fixture.git"},"author":{"name":"Ricardo Domínguez","email":"rdominguez.alvarez.dev@gmail.com"},"bugs":{"url":"https://github.com/cubanducko/playwright-i18next-fixture/issues"},"license":"MIT","readme":"<div align=\"center\">\n  <br>\n  <header>\n    <img src=\"https://github.com/cubanducko/playwright-i18next-fixture/blob/main/assets/logo.png?raw=true\" height=\"64\" />\n  </header>\n  <br>\n  <h1>playwright-i18next-fixture</h1>\n  <p> 📝 Use your `i18next` translations in <strong>Playwright</strong> to create multi-language selectors</p>\n</div>\n\n<div align=\"center\">\n\n[![Build Status][build-badge]][build-link]\n[![Code Style][prettier-badge]][prettier-link]\n[![Package Version][npm-badge]][npm-link]\n[![MIT License][license-badge]][license-link]\n\n</div>\n\n<br>\n\n## 🚀 Use case\n\n<p>Selecting by text can be a problem with e2e testing. Tying your expectations to text can led to problems with multi-language pages.\n<p>With the power <code>i18next</code> and fixtures we can easily create multi-language selectors by defining keys for our text selectors</p>\n\n<br>\n\n## 🌱 Installation\n\n```bash\n# Yarn\nyarn add --dev playwright-i18next-fixture\n\n# PNPM\npnpm add --D playwright-i18next-fixture\n\n# NPM\nnpm install --save-dev playwright-i18next-fixture\n\n```\n\n<br>\n\n## 📝 Usage\n\nCreate the `i18next` instance as you would in your browser\n\n```ts\nimport { test as base } from \"@playwright/test\";\nimport { createI18nFixture, getI18nInstance } from \"playwright-i18next-fixture\";\n\nconst i18nFixture = createI18nFixture({\n  // i18n plugins\n  plugins: [ ... ]\n  // i18n configuration options\n  options: {\n    lng: 'en',\n    resources: { ... }\n  },\n  // Fetch translations in every test or fetch once\n  // Default: true\n  cache: false\n  // Run as auto fixture to be available through all tests by getI18nInstance()\n  // Default: true\n  auto: true\n})\n\nconst test = base.extend(i18nFixture);\n\n// Context is now shared\ntest(\"my test\", async ({ i18n, t }) => {});\n\n// If auto is enabled, you can also use the manual fn\n// This is useful to inject directly in classes\nclass ExampleClass {\n   readonly i18n: i18n = getI18nInstance()\n}\n```\n\n<br>\n\n## LICENSE\n\nMIT\n\n[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg\n[license-link]: https://opensource.org/licenses/MIT\n[npm-badge]: https://img.shields.io/npm/v/playwright-i18next-fixture\n[npm-link]: https://www.npmjs.com/package/playwright-i18next-fixture\n[prettier-badge]: https://img.shields.io/badge/code_style-prettier-ff69b4.svg?logo=prettier\n[prettier-link]: https://prettierjs.org/en/download/\n[build-badge]: https://github.com/cubanducko/playwright-i18next-fixture/actions/workflows/build.yml/badge.svg\n[build-link]: https://github.com/cubanducko/playwright-i18next-fixture/actions/workflows/build.yml\n","readmeFilename":"README.md"}