Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,15 @@ jobs:
# - nextjs
- stencil-component-starter
- ionic-react
include:
- exampleDir: angular-typescript-vite
nodeVersion: 24
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: ${{ matrix.nodeVersion || 18 }}
- name: Install
run: npm install
working-directory: ${{ matrix.exampleDir }}
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# WebdriverIO Component Testing Examples [![Test](https://github.com/webdriverio/component-testing-examples/actions/workflows/test.yaml/badge.svg)](https://github.com/webdriverio/component-testing-examples/actions/workflows/test.yaml)

This repository contains several examples for testing web components using WebdriverIO. They are using different frameworks and set-ups and we will continue to add more examples as we improve support for more environments. All examples use WebdriverIO v8 and the `@wdio/browser-runner` to run tests within the browser environment.
This repository contains several examples for testing web components using WebdriverIO. They are using different frameworks and set-ups and we will continue to add more examples as we improve support for more environments. The examples use the `@wdio/browser-runner` to run tests within the browser environment.

Current examples are:

- [`angular-typescript-vite`](./angular-typescript-vite): [Angular](https://angular.dev/) + TypeScript with Angular TestBed
- [`lit-typescript-vite`](https://github.com/webdriverio/component-testing-examples/tree/main/lit-typescript-vite): [Lit](https://lit.dev/) + [TypeScript](https://www.typescriptlang.org/) compiled with [Vite](https://vitejs.dev/)
- [`preact-typescript-vite`](https://github.com/webdriverio/component-testing-examples/tree/main/preact-typescript-vite): [Preact](https://preactjs.com/) + [TypeScript](https://www.typescriptlang.org/) compiled with [Vite](https://vitejs.dev/)
- [`react-typescript-vite`](https://github.com/webdriverio/component-testing-examples/tree/main/react-typescript-vite): [React](https://reactjs.org/) + [TypeScript](https://www.typescriptlang.org/) compiled with [Vite](https://vitejs.dev/)
Expand Down
12 changes: 12 additions & 0 deletions angular-typescript-vite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Testing an Angular component with WebdriverIO

Use Node.js 24.22.1 or later in the 24.x series and run these commands from this directory:

```sh
npm ci
npm run wdio
```

WebdriverIO launches headless Chrome. The test imports a standalone Angular counter, renders it with `TestBed.createComponent`, and clicks its button to check the updated count. The component uses an inline template. Angular's JIT compiler loads in the test and Vite handles the TypeScript decorators, so this example needs no Angular-specific WebdriverIO preset.

Run `npm run typecheck` to check the config, component, and test with TypeScript.
Loading