ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - sand4rt/playwright-ct-angular: Playwright Angular component testing.
Playwright Angular component testing. Contribute to sand4rt/playwright-ct-angular development by creating an account on GitHub.
Visit Site

GitHub - sand4rt/playwright-ct-angular: Playwright Angular component testing.

GitHub - sand4rt/playwright-ct-angular: Playwright Angular component testing.

🎭 Playwright Angular component testing

Note The API has been designed to closely resemble Playwright's API wherever applicable. This library is (without guarantee) aimed at facilitating a smooth transition to Playwright once it offers official support for Angular components. It is important to take into account that this library will reach end of life when Playwright has official support for Angular component testing.

To push for official support, feedback in the form of GitHub issues and or stars is appreciated!

This library has reached end of life as it is about to be merged into the Playwright repo: https://github.com/microsoft/playwright/pull/27783. To switch to the in-house Playwright version, just replace the @sand4rt/experimental-ct-angular imports with @playwright/experimental-ct-angular. Thank you all for the support!

Capabilities

  • Run tests fast, in parallel and optionally over multiple machines with sharding or Azure's Testing Service.
  • Run the test headless or headed accross multiple real desktop and/or mobile browser engines.
  • Full support for shadow DOM, multiple origins, (i)frames, browser tabs and contexts.
  • Minimizes flakyness, due to auto waiting, web first assertions and ensures that every test runs in full isolation.
  • Advanced emulation capabilities such as modifying screen size, geolocation, color scheme and the network.
  • Interactions with the components are indistinguishable from real user behavior.
  • Visual regression / screenshot testing.
  • Zero-configuration TypeScript support.

Along with all these ✨ awesome capabilities ✨ that come with Playwright, you will also get:

Usage

Initialize Playwright Angular component testing with PNPM, NPM or Yarn and follow the installation steps:

pnpm create playwright-sand4rt --ct
npm init playwright-sand4rt@latest -- --ct
yarn create playwright-sand4rt --ct

Now you can start creating your tests:

// button.component.ts
import { Component, Input } from '@angular/core';

@Component({
  standalone: true,
  selector: 'button-component',
  template: `<button>{{title}}</button>`,
})
export class ButtonComponent {
  @Input() title!: string;
}
// button.component.test.ts
import { test, expect } from '@sand4rt/experimental-ct-angular';
import { ButtonComponent } from './components/button.component';

test('render props', async ({ mount }) => {
  const component = await mount(ButtonComponent, {
    props: {
      title: 'Submit',
    },
  });
  await expect(component).toContainText('Submit');
});

See the official playwright component testing documentation and the tests for more information on how to use it.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory