mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-12 11:50:22 +03:00
docs: fix imports in auth.md (#23430)
While following instructions steps in the doc, I found some imports were different as I expected. Correct me if I am wrong. :)
This commit is contained in:
parent
972ad89af2
commit
8b18bfcad1
@ -497,7 +497,7 @@ You can introduce fixtures that will provide a page authenticated as each role.
|
||||
Below is an example that [creates fixtures](./test-fixtures.md#creating-a-fixture) for two [Page Object Models](./pom.md) - admin POM and user POM. It assumes `adminStorageState.json` and `userStorageState.json` files were created in the global setup.
|
||||
|
||||
```js title="playwright/fixtures.ts"
|
||||
import { test as base, Page, Browser, Locator } from '@playwright/test';
|
||||
import { test as base, Page, Locator } from '@playwright/test';
|
||||
|
||||
// Page Object Model for the "admin" page.
|
||||
// Here you can add locators and helper methods specific to the admin page.
|
||||
@ -555,7 +555,7 @@ export const test = base.extend<MyFixtures>({
|
||||
|
||||
```js title="tests/example.spec.ts"
|
||||
// Import test with our new fixtures.
|
||||
import { test, expect } from './fixtures';
|
||||
import { test, expect } from '../playwright/fixtures';
|
||||
|
||||
// Use adminPage and userPage fixtures in the test.
|
||||
test('admin and user', async ({ adminPage, userPage }) => {
|
||||
|
Loading…
Reference in New Issue
Block a user