Code Monkey home page Code Monkey logo

ngx-speculoos's People

Contributors

cexbrayat avatar dependabot[bot] avatar jnizet avatar renaudaste avatar renovate-bot avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ngx-speculoos's Issues

chore(docs): trigger a detect changes inside the constructor ?

Hi,

First of all (and like the last time I saw you), thanks for the job done inside the pro pack and for this libs (and valdemort too).

I'm currently writing slides for VoxxedDays Luxembourg and I think this lib is a must have for me in my presentation. But I'm currently trying to replace the default test written by the CLI with some using the ComponentTester

https://github.com/davinkevin/angular42/blob/master/demo/demo-ngx-speculoos/src/app/app.component.spec.ts

But, I think a complete example project is something missing in this repository.
Examples in compodoc are a bit too short and some ... hide things not trivial for everyone.

In my case, I had to use the method detectChanges(). Without this call, the component template doesn't have its text bindings initialised.

So, without this detectChanges(), I have this error:

Expected element to contain text 'Welcome to app!', but had text ' Welcome to '
	    at UserContext.<anonymous> src/app/app.component.spec.ts:39:26)
	    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke node_modules/zone.js/dist/zone.js:388:1)
	    at AsyncTestZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.AsyncTestZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:713:1)
	    at ProxyZoneSpec.push../node_modules/zone.js/dist/zone-testing.js.ProxyZoneSpec.onInvoke node_modules/zone.js/dist/zone-testing.js:285:1)

For a very simple component :

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.css']
})
export class AppComponent {
  title = 'app';
}

With template :

<!--The content below is only a placeholder and can be replaced.-->
<div style="text-align:center">
  <h1>
    Welcome to {{ title }}!
  </h1>
  <img width="300" alt="Angular Logo" src="...">
</div>

So, I would like to know if this is a correct way to use the ComponentTester<T> in this kind of test ?

/cc @Neonox31 @dabbid @Yann29

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): lock file maintenance

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

circleci
.circleci/config.yml
  • browser-tools 1.4.8
  • cimg/node 18.19-browsers
npm
package.json
  • @angular/common 17.3.0
  • @angular/compiler 17.3.0
  • @angular/core 17.3.0
  • @angular/forms 17.3.0
  • @angular/platform-browser 17.3.0
  • @angular/platform-browser-dynamic 17.3.0
  • @angular/router 17.3.0
  • rxjs 7.8.1
  • tslib 2.6.2
  • zone.js 0.14.4
  • @angular-devkit/build-angular 17.3.0
  • @angular-eslint/builder 17.3.0
  • @angular-eslint/eslint-plugin 17.3.0
  • @angular-eslint/eslint-plugin-template 17.3.0
  • @angular-eslint/schematics 17.3.0
  • @angular-eslint/template-parser 17.3.0
  • @angular/cli 17.3.0
  • @angular/compiler-cli 17.3.0
  • @compodoc/compodoc 1.1.23
  • @types/jasmine 5.1.4
  • @typescript-eslint/eslint-plugin 7.3.0
  • @typescript-eslint/parser 7.3.0
  • codecov 3.8.3
  • eslint 8.57.0
  • eslint-config-prettier 9.1.0
  • eslint-plugin-ban 1.6.0
  • eslint-plugin-deprecation 2.0.0
  • eslint-plugin-prettier 5.1.3
  • jasmine-core 5.1.2
  • karma 6.4.3
  • karma-chrome-launcher 3.2.0
  • karma-coverage 2.2.1
  • karma-jasmine 5.1.0
  • karma-jasmine-html-reporter 2.1.0
  • ng-packagr 17.3.0
  • prettier 3.2.5
  • standard-version 9.5.0
  • typescript 5.2.2
projects/ngx-speculoos/package.json
  • tslib 2.6.2
  • @angular/core ^17.0.0
  • @angular/platform-browser ^17.0.0
  • @angular/router ^17.0.0
  • rxjs ^7.8.0

  • Check this box to trigger a request for Renovate to run again on this repository

feat(matchers): provide matchers for jest

Hi,

Like previously exposed (on twitter), I'm working with Jest on Angular. Are you interested in migrating the current matchers for the Jest world?

I will do a PR if you're ok.

Thanks

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: undefined. Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

[Radiobutton group] check won't work if uncheck hasn't been called on other options

My test case: I have a radiobutton group, with two options:
"allStatus" or "inProgressStatus"

The following test will fail

    it('should update criteria model when changing criteria', () => {
      // Given
      loadTester();

      // When
      tester.inProgressStatus.check();
      tester.allStatus.uncheck();

      // Then
      expect(tester.componentInstance.form.getRawValue()).toEqual({
        inProgress: 'true'
      });
    });

while the following (just inverting uncheck/check) will pass

    it('should update criteria model when changing criteria', () => {
      // Given
      loadTester();

      // When
      tester.allStatus.uncheck();
      tester.inProgressStatus.check();

      // Then
      expect(tester.componentInstance.form.getRawValue()).toEqual({
        inProgress: 'true'
      });
    });

(thanks for this great library by the way)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.