question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug(MatButtonHarness): Button events not triggering on Protractor environemnt

See original GitHub issue

Reproduction

MatButtonHarness is not working on Protractor environment, the following code reproduce the error.

const loader = ProtractorHarnessEnvironment.loader(fixture);
const button = await loader.getHarness(MatButtonHarness);
await button.click();

Expected Behavior

When executing button.click() the event should execute.

Actual Behavior

When executing button.click() the event is not executing.

Environment

Angular CLI: 9.0.7 Node: 10.17.0 OS: darwin x64

Angular: 9.0.7 … animations, cli, common, compiler, compiler-cli, core, forms … language-service, platform-browser, platform-browser-dynamic … router Ivy Workspace: Yes

Package Version

@angular-devkit/architect 0.900.7 @angular-devkit/build-angular 0.900.7 @angular-devkit/build-optimizer 0.900.7 @angular-devkit/build-webpack 0.900.7 @angular-devkit/core 9.0.7 @angular-devkit/schematics 9.0.7 @angular/cdk 9.2.0 @angular/material 9.2.0 @ngtools/webpack 9.0.7 @schematics/angular 9.0.7 @schematics/update 0.900.7 rxjs 6.5.4 typescript 3.7.5 webpack 4.41.2

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mmalerbacommented, Apr 29, 2020

It seems to be a regression from https://github.com/angular/components/pull/16688, we’re clicking at 0,0 now which doesn’t seem to trigger the event. I verified that clicking 1,1 does. Will have a fix shortly

1reaction
LayZeeDKcommented, Apr 29, 2020

Do you know if this issue is in the pipeline to be fixed?

@jelbourn @devversion Do you have time to help with a plan?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing with component harnesses
The Angular CDK's component harnesses are designed to work in multiple different test environments. Support currently includes Angular's Testbed environment ...
Read more >
Click button is not working in protractor
Wait untill element is become clickable and then click. You do it by following: EC=protractor.
Read more >
How to use Angular Material harnesses to improve your ...
We want to write a test that selects a value in a dropdown and then make sure that the user selection is dealt...
Read more >
Test your components with Angular Material's ... - Kevin Kreuzer
Let's write a unit test that tests that the radio button filter works. It tests that the correct method is called and the...
Read more >
Create a component harness for your tests with Angular CDK
This gives the consumer a consistent API feel, but also lets the harness environment take care of asynchronous events, timers, and change ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found