profile
viewpoint

benelliott/highcharts-ng 1

AngularJS directive for Highcharts

benelliott/angular 0

One framework. Mobile & desktop.

benelliott/angular-bootstrap-colorpicker 0

Native AngularJS colorpicker directive. No dependency on jQuery or jQuery plugin is required.

benelliott/angular-fcsa-number 0

An Angular directive that validates numbers and adds commas as thousand separators.

benelliott/angular-http-progress-bar 0

Automatic HTTP progress bar for Angular 2 applications

benelliott/angular.js 0

HTML enhanced for web apps

benelliott/angular2-select 0

A native angular 2 select component (based on select2).

benelliott/angular2webpack2-starter 0

A complete Angular 2 and Webpack 2 starter seed with minimal and full featured branches. Full featured branch includes: Material Design 2, @ngrx, HMR (Hot Module Replacement) and optional use of Universal for server-side rendering - Supports AOT (offline) compilation, sync and lazy loading. Karma/Protractor for e2e and unit tests.

benelliott/angularAMD 0

Facilitate use of RequireJS in AngularJS

benelliott/angularUtils 0

A place where I will collect useful re-usable Angular components that I make

startedangular-component/router

started time in 5 hours

issue commentExCiteS/Sapelli

Key (key, category_id)=(yes-or-no, 1309) already exists

Almost certainly too late to be of help, but I encountered a similar error when trying to upload a project to GeoKey. I found I can avoid the error by ensuring that the content (not just the id) of all text captions used in the project is unique. So unless there's another issue I'm unaware of, I can't display the same text twice in a Sapelli project (which seems crazy).

mjlaws

comment created time in 7 hours

fork paulirish/awesome-chrome-devtools

Awesome tooling and resources in the Chrome DevTools & DevTools Protocol ecosystem

https://github.com/ChromeDevTools/awesome-chrome-devtools#readme

fork in 13 hours

issue commentngneat/spectator

Test failure when using mock ActivatedRoute and spy on Router navigate

Not sure if this will help, but you can use https://github.com/ngneat/spectator#integration-testing-with-routertestingmodule

loriepisicchio

comment created time in a day

startedcartant/eslint-plugin-rxjs-angular

started time in 2 days

startedsnowpackjs/snowpack

started time in 4 days

issue commentngneat/spectator

Overriding Injection Tokens not working for createComponentFactory

@stefanoww you can take it.

Kurtz1993

comment created time in 4 days

issue commentngneat/spectator

Overriding Injection Tokens not working for createComponentFactory

I might take that one if it's still open.

Kurtz1993

comment created time in 4 days

issue commentngneat/spectator

Avoid using `Function` type in custom Matchers where a callback is allowed

I made https://github.com/thw0rted/spectator/tree/patch-1 using the online editor but haven't re-run your build/test to see if it breaks anything yet.

(Also: I didn't quite grok your commit-message rules -- what are "type" and "scope"? Are there specific valid values for those laid out somewhere?)

thw0rted

comment created time in 6 days

issue openedngneat/spectator

Avoid using `Function` type in custom Matchers where a callback is allowed

I'm submitting a...

<pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [X] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Performance issue [ ] Feature request [ ] Documentation issue or request [ ] Support request [ ] Other... Please describe: </code></pre>

Current behavior

The toHaveText / toHaveExactText matchers allow passing of a callback. Typings look like

        toHaveText(text: string | string[] | Function, exact?: boolean): boolean;
        toContainText(text: string | string[] | Function, exact?: boolean): boolean;
        toHaveExactText(text: string | string[] | Function): boolean;

The docs show how to use the callback form as

expect('.zippy__content').toHaveText(text => text.includes('..'));

This results in a TS7006 error, Parameter 'text' implicitly has an 'any' type -- I think only when compiled with the noImplicitAny flag.

Expected behavior

The typings should specify the correct signature for the calback instead of Function. That's probably (value: string) => boolean, if I understand the way it's meant to work.

What is the motivation / use case for changing the behavior?

Callers should be able to declare a callback without explicit typing.

Environment

<pre><code> Angular version: 11.0.4 </code></pre>

created time in 6 days

issue commentngneat/spectator

Custom Matchers enhancement

I don't understand the difference between toHaveText and toContainText, and the docs don't say anything about them.

It would be helpful to provide examples of how each one works, especially cases where would one would true but the other would be false, for the same Element.

kekel87

comment created time in 6 days

issue commentngneat/spectator

Can you please do another release?

Thank you!

stones

comment created time in 7 days

issue closedngneat/spectator

Can you please do another release?

<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->

I'm submitting a...

<!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Performance issue [ ] Feature request [ ] Documentation issue or request [ ] Support request [x ] Other... Please describe: Can we get a release </code></pre>

closed time in 7 days

stones

created tagngneat/spectator

tagv6.1.3

🦊 🚀 A Powerful Tool to Simplify Your Angular Tests

created time in 7 days

push eventngneat/spectator

NetanelBasal

commit sha dc3ee10d9bf36409cace276e4e546a3832550802

chore(release): 6.1.3

view details

push time in 7 days

issue openedngneat/spectator

Can you please do another release?

<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->

I'm submitting a...

<!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Performance issue [ ] Feature request [ ] Documentation issue or request [ ] Support request [x ] Other... Please describe: Can we get a release </code></pre>

created time in 7 days

issue commentngneat/spectator

DOM Query by Custom Attribute

Under the hood, spectator uses the DOM testing library under the hood for queries.

Out of the box it provides [ByTestId](https://testing-library.com/docs/dom-testing-library/api-queries/#bytestid) which uses data-testid="identifier", and you can configure what the test attribute is called using configure({testIdAttribute: 'data-my-test-attribute'})

aaronscribner

comment created time in 8 days

created repositoryaddyosmani/addyosmani

GitHub README

created time in 8 days

created repositoryollyfreeman/udacity-nanodegree-data-engineering

Repository for projects for Udacity Nanodegree in Data Engineering

created time in 10 days

startedtuplo/numberfmt

started time in 12 days

issue openedngneat/spectator

DOM Query by Custom Attribute

I'm submitting a...

<!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Performance issue [X ] Feature request [ ] Documentation issue or request [ ] Support request [ ] Other... Please describe: </code></pre>

Current behavior

We have data-qa attributes on our elements that we already use for Cypress tests and we would like to figure out how to use Spectator to DOM query based on a custom data attribute.

Expected behavior

Would like a simplified way to select by custom attributes on the element.

What is the motivation / use case for changing the behavior?

HTML <input data-qa="password></input>

TS const input = spectator.query(byAttribute('data-qa', 'password')

Environment

<pre><code> Angular version: 11

created time in 13 days

startedaxios/axios

started time in 16 days

startedgrumpygamer/DeloresDev

started time in 19 days

issue closedngneat/spectator

Run only specific tests and skip the rest

<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->

Hi, Looks like when I add f to a describe, like shown below, all other tests in the app still run! Is there a way to only run specific tests, and skip the rest? Thanks! <pre><code> import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component';

fdescribe('AppComponent', () => { const createComponent = createComponentFactory({ component: AppComponent, imports: [ RouterTestingModule ] });

let spectator: Spectator<AppComponent>;

beforeEach(() => spectator = createComponent({detectChanges: false}));

test('should create the root app', () => { const app = spectator.component; expect(app).toBeTruthy(); });

}) </code></pre>

closed time in a month

AhmedAlatawi

issue commentngneat/spectator

Run only specific tests and skip the rest

It doesn't relate to Spectator. You can check jest docs. https://jestjs.io/docs/en/cli

AhmedAlatawi

comment created time in a month

issue openedngneat/spectator

Question about unittesting a directive with HostListener(keydown)

I'm submitting a...

<!-- Check one of the following options with "x" --> <pre><code> [ ] Regression (a behavior that used to work and stopped working in a new release) [ ] Bug report <!-- Please search GitHub for a similar issue or PR before submitting --> [ ] Performance issue [ ] Feature request [ ] Documentation issue or request [x] Support request [ ] Other... Please describe: </code></pre>

Current behavior

I'm not here to report an issue, but I was hoping that someone could point me in the correct direction. At the moment i'm trying to make a unit test for a custom directive which has a Hostlistener(keydown).

So this is a simplified version of the HostListener in my directive.

@HostListener('keydown', ['$event'])
  public onKeyDown(event: KeyboardEvent): void {
   
    if ((event.key === '2' ) 
    { 
       event.preventDefault();
       return; 
   }
}

In my unittest (i'm using jest and ofc specator) i try to do this.

beforeEach(() => {
   spectator = createDirective(`<input type="text" value="0" myDirective>`);
});

it('should allow 1', () => {
   const event = new KeyboardEvent('keydown', { code: '49', key: '1'});
   spectator.directive.onKeyDown(event);
        
   expect(spectator.element).toHaveValue("1");
});

When running the unit test the value of the spectator.element is still the initial value 0. I understand that this hostlistener is not changing the value directly, but I was expecting that when the code didn't hit the event.preventDefault() the value of the input would still change. How would you advice me to test this?

Environment

<pre><code> Angular version: 10.0.2

Browser:

  • [x] Chrome (desktop) version XX

created time in a month

issue openedngneat/spectator

Run only specific tests and skip the rest

<!-- PLEASE HELP US PROCESS GITHUB ISSUES FASTER BY PROVIDING THE FOLLOWING INFORMATION.

ISSUES MISSING IMPORTANT INFORMATION MAY BE CLOSED WITHOUT INVESTIGATION. -->

Hi, Looks like when I add f to a describe, like shown below, all other tests in the app still run! Is there a way to only run specific tests, and skip the rest? Thanks! <pre><code> import { createComponentFactory, Spectator } from '@ngneat/spectator/jest'; import { RouterTestingModule } from '@angular/router/testing'; import { AppComponent } from './app.component';

fdescribe('AppComponent', () => { const createComponent = createComponentFactory({ component: AppComponent, imports: [ RouterTestingModule ] });

let spectator: Spectator<AppComponent>;

beforeEach(() => spectator = createComponent({detectChanges: false}));

test('should create the root app', () => { const app = spectator.component; expect(app).toBeTruthy(); });

}) </code></pre>

created time in a month

more