Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress component testing does not support angular input signals #30192

Open
Marbulinek opened this issue Sep 5, 2024 · 0 comments
Open

Cypress component testing does not support angular input signals #30192

Marbulinek opened this issue Sep 5, 2024 · 0 comments
Labels
CT Issue related to component testing type: enhancement Requested enhancement of existing feature

Comments

@Marbulinek
Copy link

Current behavior

Nowadays,
cypress for angular component testing supports signals, but it does not support input signals.

import { mount } from 'cypress/angular-signals';

describe('TestComponent signal input test', () => {

  const myInputSignalArray = [0,1,2,3];

    beforeEach(() => {
        mount(TestComponent, {
          imports: [TestComponent],
          providers: [provideHttpClient(), provideAnimationsAsync()],
          componentProperties: {
            myInputSignalProperty: myInputSignalArray 
          },
        });
    });

Component should looks like:

import { Component, input} from '@angular/core';
...
@Component({
  selector: 'test-component',
  standalone: true,
  imports: [],
  templateUrl: './test.component.html',
  styleUrl: './test.component.scss'
})
export class TestComponent{
myInputSignalProperty = input<number[]>();
...

Desired behavior

I should be able to setup also input signal properties

Test code to reproduce

Just write simple angular component with signal input property. And in cypress try to fill this signal input property with some starting mock data.

Cypress Version

13.14.2

Node version

v22.2.0

Operating System

win11

Debug Logs

No response

Other

No response

@jennifer-shehane jennifer-shehane added CT Issue related to component testing type: enhancement Requested enhancement of existing feature labels Sep 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CT Issue related to component testing type: enhancement Requested enhancement of existing feature
Projects
None yet
Development

No branches or pull requests

2 participants