doc: fix typos (#9476)

<!-- Thanks for submitting a pull request! Please provide enough
information so that others can review your pull request. -->

**What kind of change does this PR introduce?**

Fix typos.

<!-- E.g. a bugfix, feature, refactoring, build related change, etc… -->

**Did you add tests for your changes?**

Nope.

**If relevant, did you update the documentation?**

Yes.

**Summary**

<!-- Explain the **motivation** for making this change. What existing
problem does the pull request solve? -->
<!-- Try to link to an open issue for more information. -->

Fix typos found via `codespell -S package-lock.json -L
currenty,afterall`


**Does this PR introduce a breaking change?**

Nope.

<!-- If this PR introduces a breaking change, please describe the impact
and a migration path for existing applications. -->

**Other information**

Co-authored-by: Alex Rudenko <OrKoN@users.noreply.github.com>
This commit is contained in:
Kian-Meng Ang 2023-01-14 01:03:21 +08:00 committed by GitHub
parent 31ff55cc03
commit 157c883d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 25 additions and 25 deletions

View File

@ -21,10 +21,10 @@ class BrowserContext {
## Parameters
| Parameter | Type | Description |
| --------- | ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| predicate | (x: [Target](./puppeteer.target.md)) =&gt; boolean \| Promise&lt;boolean&gt; | 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)) =&gt; boolean \| Promise&lt;boolean&gt; | 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:**

View File

@ -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:**

View File

@ -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:

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -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(

View File

@ -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.

View File

@ -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

View File

@ -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];

View File

@ -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);

View File

@ -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

View File

@ -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;