Skip to content

Commit bc838a1

Browse files
committed
docs: improve installation
1 parent 24103cd commit bc838a1

File tree

2 files changed

+16
-26
lines changed

2 files changed

+16
-26
lines changed

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,16 @@
77
88
## Usage
99

10-
First, install playwright and initialize component testing, then install the Angular adapter.
10+
Initialize Playwright Angular component testing with PNPM, NPM or Yarn and follow the installation steps:
1111

1212
```sh
13-
npm init playwright@latest -- --ct
14-
npm install -D @sand4rt/experimental-ct-angular
13+
pnpm dlx create-playwright-sand4rt --ct
1514
```
16-
17-
After installing the config needs to be modified:
18-
19-
```ts
20-
import { defineConfig } from '@sand4rt/experimental-ct-angular';
21-
22-
export default defineConfig({
23-
// ...Your config
24-
});
15+
```sh
16+
npm init playwright-sand4rt@latest -- --ct
17+
```
18+
```sh
19+
yarn create playwright-sand4rt --ct
2520
```
2621

2722
Now you can start adding your first test:
@@ -55,4 +50,4 @@ test('render props', async ({ mount }) => {
5550
});
5651
```
5752

58-
See the official [playwright component testing documentation](https://playwright.dev/docs/test-components) and the [tests](ct-angular/tests) for more information on how to use it.
53+
See the official [playwright component testing documentation](https://playwright.dev/docs/test-components) and the [tests](https://github.com/sand4rt/playwright-ct-angular/tree/main/ct-angular/tests) for more information on how to use it.

playwright-ct-angular/README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,16 @@
77
88
## Usage
99

10-
First, install playwright and initialize component testing, then install the Angular adapter.
10+
Initialize Playwright Angular component testing with PNPM, NPM or Yarn and follow the installation steps:
1111

1212
```sh
13-
npm init playwright@latest -- --ct
14-
npm install -D @sand4rt/experimental-ct-angular
13+
pnpm dlx create-playwright-sand4rt --ct
1514
```
16-
17-
After installing the config needs to be modified:
18-
19-
```ts
20-
import { defineConfig } from '@sand4rt/experimental-ct-angular';
21-
22-
export default defineConfig({
23-
// ...Your config
24-
});
15+
```sh
16+
npm init playwright-sand4rt@latest -- --ct
17+
```
18+
```sh
19+
yarn create playwright-sand4rt --ct
2520
```
2621

2722
Now you can start adding your first test:
@@ -41,7 +36,7 @@ export class ButtonComponent {
4136
```
4237

4338
```jsx
44-
// Button.test.ts
39+
// button.component.test.ts
4540
import { test, expect } from '@sand4rt/experimental-ct-angular';
4641
import { ButtonComponent } from './components/button.component';
4742

0 commit comments

Comments
 (0)