docs: fix typos (#9476)
Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
parent
31ff55cc03
commit
4437bceb6e
@ -21,10 +21,10 @@ class BrowserContext {
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| predicate | (x: [Target](./puppeteer.target.md)) => boolean \| Promise<boolean> | A function to be run for every target |
|
||||
| options | { timeout?: number; } | <i>(Optional)</i> An object of options. Accepts a timout, which is the maximum wait time in milliseconds. Pass <code>0</code> to disable the timeout. Defaults to 30 seconds. |
|
||||
| Parameter | Type | Description |
|
||||
| --------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| predicate | (x: [Target](./puppeteer.target.md)) => boolean \| Promise<boolean> | A function to be run for every target |
|
||||
| options | { timeout?: number; } | <i>(Optional)</i> An object of options. Accepts a timeout, which is the maximum wait time in milliseconds. Pass <code>0</code> to disable the timeout. Defaults to 30 seconds. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
@ -29,10 +29,10 @@ class Frame {
|
||||
|
||||
## Parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| --------- | --------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
||||
| xpath | string | the XPath expression to wait for. |
|
||||
| options | [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | <i>(Optional)</i> options to configure the visiblity of the element and how long to wait before timing out. |
|
||||
| Parameter | Type | Description |
|
||||
| --------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
|
||||
| xpath | string | the XPath expression to wait for. |
|
||||
| options | [WaitForSelectorOptions](./puppeteer.waitforselectoroptions.md) | <i>(Optional)</i> options to configure the visibility of the element and how long to wait before timing out. |
|
||||
|
||||
**Returns:**
|
||||
|
||||
|
@ -4,14 +4,14 @@ Adds Puppeteer-based e2e tests to your Angular project.
|
||||
|
||||
## Usage
|
||||
|
||||
Run the command bellow in an Angular CLI app directory and follow the prompts.
|
||||
Run the command below in an Angular CLI app directory and follow the prompts.
|
||||
_Note this will add the schematic as a dependency to your project._
|
||||
|
||||
```bash
|
||||
ng add @puppeteer/ng-schematics
|
||||
```
|
||||
|
||||
Or you can use the same command followed by the [options](#options) bellow.
|
||||
Or you can use the same command followed by the [options](#options) below.
|
||||
|
||||
Currently, this schematic supports the following test frameworks:
|
||||
|
||||
|
@ -83,7 +83,7 @@ export class BrowserContext extends EventEmitter {
|
||||
* ```
|
||||
*
|
||||
* @param predicate - A function to be run for every target
|
||||
* @param options - An object of options. Accepts a timout,
|
||||
* @param options - An object of options. Accepts a timeout,
|
||||
* which is the maximum wait time in milliseconds.
|
||||
* Pass `0` to disable the timeout. Defaults to 30 seconds.
|
||||
* @returns Promise which resolves to the first target found
|
||||
|
@ -263,7 +263,7 @@ export const enum PageEmittedEvents {
|
||||
* Contains an object with two properties:
|
||||
*
|
||||
* - `title`: the title passed to `console.timeStamp`
|
||||
* - `metrics`: objec containing metrics as key/value pairs. The values will
|
||||
* - `metrics`: object containing metrics as key/value pairs. The values will
|
||||
* be `number`s.
|
||||
*/
|
||||
Metrics = 'metrics',
|
||||
|
@ -623,7 +623,7 @@ export class CDPBrowserContext extends BrowserContext {
|
||||
* ```
|
||||
*
|
||||
* @param predicate - A function to be run for every target
|
||||
* @param options - An object of options. Accepts a timout,
|
||||
* @param options - An object of options. Accepts a timeout,
|
||||
* which is the maximum wait time in milliseconds.
|
||||
* Pass `0` to disable the timeout. Defaults to 30 seconds.
|
||||
* @returns Promise which resolves to the first target found
|
||||
|
@ -629,7 +629,7 @@ export class Frame {
|
||||
* an XPath.
|
||||
*
|
||||
* @param xpath - the XPath expression to wait for.
|
||||
* @param options - options to configure the visiblity of the element and how
|
||||
* @param options - options to configure the visibility of the element and how
|
||||
* long to wait before timing out.
|
||||
*/
|
||||
async waitForXPath(
|
||||
|
@ -474,7 +474,7 @@ export class IsolatedWorld {
|
||||
);
|
||||
} catch (error) {
|
||||
// The WaitTask may already have been resolved by timing out, or the
|
||||
// exection context may have been destroyed.
|
||||
// execution context may have been destroyed.
|
||||
// In both caes, the promises above are rejected with a protocol error.
|
||||
// We can safely ignores these, as the WaitTask is re-installed in
|
||||
// the next execution context if needed.
|
||||
|
@ -26,7 +26,7 @@ export async function connectBidiOverCDP(
|
||||
cdpConnectionAdapter.close();
|
||||
},
|
||||
onmessage(_message: string): void {
|
||||
// The method is overriden by the Connection.
|
||||
// The method is overridden by the Connection.
|
||||
},
|
||||
};
|
||||
transportBiDi.on('bidiResponse', (message: object) => {
|
||||
@ -63,7 +63,7 @@ class CDPConnectionAdapter {
|
||||
getCdpClient(id: string) {
|
||||
const session = this.#cdp.session(id);
|
||||
if (!session) {
|
||||
throw new Error('Unknonw CDP session with id' + id);
|
||||
throw new Error('Unknown CDP session with id' + id);
|
||||
}
|
||||
if (!this.#adapters.has(session)) {
|
||||
const adapter = new CDPClientAdapter(session);
|
||||
@ -82,7 +82,7 @@ class CDPConnectionAdapter {
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper on top of CDPSession/CDPConnection to satisify CDP interface that
|
||||
* Wrapper on top of CDPSession/CDPConnection to satisfy CDP interface that
|
||||
* BidiServer needs.
|
||||
*
|
||||
* @internal
|
||||
|
@ -174,8 +174,8 @@ type FlatmapSplitWithDelemiters<
|
||||
|
||||
type Split<
|
||||
Input extends string,
|
||||
Delemiter extends string,
|
||||
Delimiter extends string,
|
||||
Acc extends string[] = []
|
||||
> = Input extends `${infer Prefix}${Delemiter}${infer Suffix}`
|
||||
? Split<Suffix, Delemiter, [...Acc, Prefix]>
|
||||
> = Input extends `${infer Prefix}${Delimiter}${infer Suffix}`
|
||||
? Split<Suffix, Delimiter, [...Acc, Prefix]>
|
||||
: [...Acc, Input];
|
||||
|
@ -377,7 +377,7 @@ describe('Cookie specs', () => {
|
||||
const [cookie] = await page.cookies(SECURE_URL);
|
||||
expect(cookie!.secure).toBe(true);
|
||||
});
|
||||
it('should be able to set unsecure cookie for HTTP website', async () => {
|
||||
it('should be able to set insecure cookie for HTTP website', async () => {
|
||||
const {page, server} = getTestState();
|
||||
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
|
@ -233,7 +233,7 @@ describeWithDebugLogs('OOPIF', function () {
|
||||
if (!isHeadless || headless === 'new') {
|
||||
// TODO: this test is partially blocked on crbug.com/1334119. Enable test once
|
||||
// the upstream is fixed.
|
||||
// TLDR: when we dispatch events ot the frame the compositor might
|
||||
// TLDR: when we dispatch events to the frame the compositor might
|
||||
// not be up-to-date yet resulting in a misclick (the iframe element
|
||||
// becomes the event target instead of the content inside the iframe).
|
||||
// The solution is to use InsertVisualCallback on the backend but that causes
|
||||
|
@ -33,14 +33,14 @@ function shouldSkipTest(test: Mocha.Test): boolean {
|
||||
const testIdForFileName = getTestId(test.file!);
|
||||
const testIdForTestName = getTestId(test.file!, test.fullTitle());
|
||||
// TODO: more efficient lookup.
|
||||
const defintion = skippedTests.find(skippedTest => {
|
||||
const definition = skippedTests.find(skippedTest => {
|
||||
return (
|
||||
'' === skippedTest.testIdPattern ||
|
||||
testIdForFileName === skippedTest.testIdPattern ||
|
||||
testIdForTestName === skippedTest.testIdPattern
|
||||
);
|
||||
});
|
||||
if (defintion && defintion.skip) {
|
||||
if (definition && definition.skip) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user