Skip to content

Commit

Permalink
Revert "Test in angular workspace"
Browse files Browse the repository at this point in the history
This reverts commit ff96d9c.
  • Loading branch information
rajsite committed Jan 22, 2024
1 parent ff96d9c commit 7be0f7c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion angular-workspace/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@ni/eslint-config-javascript": "^4.2.0",
"@ni/eslint-config-typescript": "^4.2.0",
"@ni/nimble-tokens": "*",
"@ni/jasmine-parameterized": "*",
"@rollup/plugin-node-resolve": "^15.0.1",
"@types/jasmine": "^4.3.1",
"@types/node": "^18.11.18",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Component, ElementRef, Sanitizer, SecurityContext, ViewChild } from '@angular/core';
import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testing';
import { Router } from '@angular/router';
import { parameterizeSpec } from '@ni/jasmine-parameterized';
import { CommonModule, Location } from '@angular/common';
import { RouterTestingModule } from '@angular/router/testing';
import { processUpdates } from '../../../testing/async-helpers';
Expand Down Expand Up @@ -95,18 +94,18 @@ describe('Nimble anchor menu item RouterLinkWithHrefDirective', () => {
expect(routerNavigateByUrlSpy).not.toHaveBeenCalled();
}));

const secondaryClickTests = [
{ name: 'middle mouse click', clickArgs: { button: 1 } },
{ name: 'Ctrl + left-click', clickArgs: { button: 0, ctrlKey: true } }
] as const;
parameterizeSpec(secondaryClickTests, (spec, name, value) => {
spec(`does not do router navigation for non-primary-mouse link clicks for ${name}`, fakeAsync(() => {
const secondaryClickTests: { testName: string, clickArgs: { [key: string]: unknown } }[] = [
{ testName: 'middle mouse click', clickArgs: { button: 1 } },
{ testName: 'Ctrl + left-click', clickArgs: { button: 0, ctrlKey: true } }
];
secondaryClickTests.forEach(test => {
it(`does not do router navigation for non-primary-mouse link clicks for ${test.testName}`, fakeAsync(() => {
innerAnchor!.dispatchEvent(new MouseEvent('click', {
...{
bubbles: true,
cancelable: true
},
...value.clickArgs
...test.clickArgs
}));
tick();

Expand Down
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7be0f7c

Please sign in to comment.