Comments (3)
Hi @srlee309, really appreciate your feedback, thank you! That's something we were thinking about. I really like how you abstracted the locatorFor
logic. Would you want to create a PR for that? Maybe we can iterate over it, but that's a good starting point. What do you think @yjaaidi ?
from devkit.
Hi @srlee309, thank you for your suggestion.
Actually, you can already use HarnessPredicate
to achieve this.
Cf. https://material.angular.io/cdk/test-harnesses/overview#filtering-harness-instances-with-harnesspredicate
This would look something like:
export class TitleHarness extends ComponentHarness {
...
static with(
options: BaseHarnessFilters
): HarnessPredicate<TitleHarness> {
return new HarnessPredicate(TitleHarness, options);
}
}
...
getHarness(TitleHarness.with({ selector: '...' })
I totally agree that the HarnessPredicate
and ComponentHarness
implementation are not very convenient. Cf. angular/components#20871
The goal of this library is to provide a way of using existing harnesses with Cypress, but we are planning to release another library (in this repo) that will make harness writing easier.
We are still not sure if we will extend ComponentHarness
or provide a completely different approach that could be framework agnostic.
I will close this issue and add a reference to it in a new issue about harness abstraction in general.
from devkit.
I just opened the issue. @srlee309 if you have any suggestions & ideas, we'd be glad to hear them 😊
from devkit.
Related Issues (20)
- Unable to execute integration spec files error thrown when calling cy.visit HOT 2
- setup-ct failing with Angular 13 and Nx v13 HOT 9
- (0 , configs_1.getBrowserConfig) is not a function HOT 1
- Referencing assets like fonts or images inside an scss using url(`...`)
- Access to TestBed for DI of a Service to be able to mock return values
- angular.json not updated when generating a new test setup
- Angular 13 and Nx 13 issue HOT 4
- Can cypress-angular be integrated with cypress-cucumber-preprocessor
- which version of angular supported by @jscutlery/cypress-angular? HOT 2
- Method of harness not always working HOT 1
- Cannot find module '@storybook/angular' or its corresponding type declarations HOT 1
- Angular CLI setup breaks with 'Cannot find module 'nx/src/config/workspaces'
- cypress-harness-integration tests are broken HOT 3
- Add Cypress 10 support
- Release Microwave 0.1.4 on npm?
- it.skip is not a function
- cypress-harness ist not compatible to cypress 12 HOT 2
- Simplify `suspensify()` operator by removing the projector function
- suspensify() should provide a strict mode allowing type narrowing
- Hot can I add playwright-ct-angular to new nx angular project? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from devkit.