Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: failing test
  • Loading branch information
timdeschryver committed Sep 13, 2020
commit e1a2aa3ab67fb217f557f51578503cf8888160c8
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test('is possible to fill in a form and verify error messages (with the help of

const nameControl = screen.getByLabelText(/name/i);
const scoreControl = screen.getByRole('spinbutton', { name: /score/i });
const colorControl = screen.getByRole('listbox', { name: /color/i });
const colorControl = screen.getByRole('combobox', { name: /color/i });
const errors = screen.getByRole('alert');

expect(errors).toContainElement(screen.queryByText('name is required'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ test('works with provideMockStore', async () => {
const store = TestBed.inject(MockStore);
store.dispatch = jest.fn();

fireEvent.click(screen.getByRole('listitem', { name: /seven/i }));
fireEvent.click(screen.getByText(/seven/i));

expect(store.dispatch).toBeCalledWith({ type: '[Item List] send', item: 'Seven' });
});
2 changes: 1 addition & 1 deletion apps/example-app/app/examples/07-with-ngrx-mock-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const selectItems = createSelector(
selector: 'app-fixture',
template: `
<ul>
<li *ngFor="let item of items | async" (click)="send(item)" [attr.aria-label]="item">{{ item }}</li>
<li *ngFor="let item of items | async" (click)="send(item)">{{ item }}</li>
</ul>
`,
})
Expand Down