Skip to content

Commit 5716767

Browse files
committed
Add extra comment to highlight what actually needs to be copied in storage state setup section
1 parent 0ea03ce commit 5716767

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎tutorial/stage-1-setup/practical-playwright-setup.mdx‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ Running the tests at the moment will break, since we haven't asked Playwright to
267267

268268
To do this, we need to modify our `playwright.config.ts` file to use the `storageState` option:
269269

270+
<Aside type="tip">
271+
The code below only shows the `storageState` additions. Keep your existing project configurations (like `testMatch`, `testIgnore`, `dependencies`, and device settings) and just add the `storageState` to the `use` object.
272+
</Aside>
273+
270274
```ts
271275
export default defineConfig({
272276
projects: [
@@ -277,6 +281,7 @@ export default defineConfig({
277281
{
278282
name: "chromium",
279283
use: {
284+
// Add this to your existing use configuration
280285
storageState: ".auth/shared-ui-user.json",
281286
},
282287
},
@@ -499,12 +504,17 @@ export default async function globalTeardown(config: FullConfig) {
499504

500505
Don't forget to modify the `playwright.config.ts` file to use the new `storageState` file. Then try running your tests again to make sure everything is working.
501506

507+
<Aside type="tip">
508+
Update the `storageState` path in your existing project configurations. Keep all your other settings (like `testMatch`, `testIgnore`, `dependencies`, and device configurations).
509+
</Aside>
510+
502511
```ts
503512
export default defineConfig({
504513
projects: [
505514
{
506515
name: "chromium",
507516
use: {
517+
// Change the storageState path to use the API-created user
508518
storageState: ".auth/api-user.json",
509519
},
510520
},

0 commit comments

Comments
 (0)