mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: fix failed POM test example (#17552)
This commit is contained in:
parent
04f77f2319
commit
080cf29191
@ -26,7 +26,7 @@ exports.PlaywrightDevPage = class PlaywrightDevPage {
|
|||||||
this.page = page;
|
this.page = page;
|
||||||
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
||||||
this.gettingStartedHeader = page.locator('h1', { hasText: 'Installation' });
|
this.gettingStartedHeader = page.locator('h1', { hasText: 'Installation' });
|
||||||
this.pomLink = page.locator('li', { hasText: 'Writing Tests' }).locator('a', { hasText: 'Page Object Model' });
|
this.pomLink = page.locator('li', { hasText: 'Guides' }).locator('a', { hasText: 'Page Object Model' });
|
||||||
this.tocList = page.locator('article div.markdown ul > li > a');
|
this.tocList = page.locator('article div.markdown ul > li > a');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ export class PlaywrightDevPage {
|
|||||||
this.page = page;
|
this.page = page;
|
||||||
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
this.getStartedLink = page.locator('a', { hasText: 'Get started' });
|
||||||
this.gettingStartedHeader = page.locator('h1', { hasText: 'Installation' });
|
this.gettingStartedHeader = page.locator('h1', { hasText: 'Installation' });
|
||||||
this.pomLink = page.locator('li', { hasText: 'Playwright Test' }).locator('a', { hasText: 'Page Object Model' });
|
this.pomLink = page.locator('li', { hasText: 'Guides' }).locator('a', { hasText: 'Page Object Model' });
|
||||||
this.tocList = page.locator('article div.markdown ul > li > a');
|
this.tocList = page.locator('article div.markdown ul > li > a');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,16 +176,14 @@ const page = await browser.newPage();
|
|||||||
await playwrightDev.goto();
|
await playwrightDev.goto();
|
||||||
await playwrightDev.getStarted();
|
await playwrightDev.getStarted();
|
||||||
await expect(playwrightDev.tocList).toHaveText([
|
await expect(playwrightDev.tocList).toHaveText([
|
||||||
'Installation',
|
`How to install Playwright`,
|
||||||
'First test',
|
`What's Installed`,
|
||||||
'Configuration file',
|
`How to run the example test`,
|
||||||
'Writing assertions',
|
`How to open the HTML test report`,
|
||||||
'Using test fixtures',
|
`Write tests using web first assertions, page fixtures and locators`,
|
||||||
'Using test hooks',
|
`Run single tests, multiple tests, headed mode`,
|
||||||
'VS Code extension',
|
`Generate tests with Codegen`,
|
||||||
'Command line',
|
`See a trace of your tests`
|
||||||
'Configure NPM scripts',
|
|
||||||
'Release notes'
|
|
||||||
]);
|
]);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user