@angular-wave/angular.ts 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/README.md +1 -2
  2. package/dist/angular-ts.esm.js +1 -1
  3. package/dist/angular-ts.umd.js +1 -1
  4. package/e2e/unit.spec.ts +2 -1
  5. package/index.html +8 -9
  6. package/package.json +1 -1
  7. package/src/core/pubsub.js +329 -0
  8. package/src/router/globals.js +0 -5
  9. package/src/router/hooks/core-resolvables.js +12 -11
  10. package/src/router/hooks/ignored-transition.js +1 -1
  11. package/src/router/hooks/lazy-load.js +40 -41
  12. package/src/router/hooks/redirect-to.js +32 -29
  13. package/src/router/hooks/update-globals.js +1 -1
  14. package/src/router/hooks/url.js +33 -24
  15. package/src/router/hooks/views.js +21 -20
  16. package/src/router/params/param-factory.js +17 -0
  17. package/src/router/params/param-types.js +0 -3
  18. package/src/router/router.js +78 -62
  19. package/src/router/services.js +2 -4
  20. package/src/router/state/state-queue-manager.js +5 -7
  21. package/src/router/state/state-registry.js +8 -10
  22. package/src/router/state/state-service.js +34 -33
  23. package/src/router/transition/hook-builder.js +2 -2
  24. package/src/router/transition/transition-hook.js +3 -9
  25. package/src/router/transition/transition-service.js +12 -30
  26. package/src/router/transition/transition.js +28 -25
  27. package/src/router/url/url-config.js +1 -49
  28. package/src/router/url/url-matcher-factory.js +10 -51
  29. package/src/router/url/url-router.js +27 -17
  30. package/src/router/url/url-rule.js +9 -13
  31. package/src/router/url/url-rules.js +3 -7
  32. package/src/router/url/url-service.js +134 -97
  33. package/src/router/view/view.js +3 -3
  34. package/src/shared/hof.js +1 -1
  35. package/test/angular.spec.js +1 -0
  36. package/test/aria/aria.spec.js +2 -1
  37. package/test/core/interval.spec.js +1 -1
  38. package/test/core/pubsub.spec.js +314 -0
  39. package/test/directive/bind.spec.js +2 -1
  40. package/test/directive/boolean.spec.js +4 -2
  41. package/test/directive/change.spec.js +1 -1
  42. package/test/directive/class.spec.js +1 -0
  43. package/test/directive/click.spec.js +2 -1
  44. package/test/directive/cloak.spec.js +1 -2
  45. package/test/directive/{constoller.spec.js → controller.spec.js} +1 -0
  46. package/test/directive/element-style.spec.js +1 -0
  47. package/test/directive/event.spec.js +1 -1
  48. package/test/directive/href.spec.js +2 -1
  49. package/test/directive/init.spec.js +1 -0
  50. package/test/directive/input.spec.js +200 -285
  51. package/test/directive/list.spec.js +2 -1
  52. package/test/directive/model.spec.js +1 -0
  53. package/test/directive/non-bindable.spec.js +2 -1
  54. package/test/directive/script.spec.js +1 -0
  55. package/test/directive/scrset.spec.js +2 -1
  56. package/test/directive/show-hide.spec.js +1 -0
  57. package/test/directive/src.spec.js +2 -1
  58. package/test/directive/style.spec.js +1 -0
  59. package/test/directive/switch.spec.js +2 -1
  60. package/test/directive/validators.spec.js +1 -1
  61. package/test/router/state-directives.spec.js +72 -72
  62. package/test/router/state.spec.js +5 -5
  63. package/test/router/template-factory.spec.js +2 -2
  64. package/test/router/view-directive.spec.js +65 -65
  65. package/test/router/view-hook.spec.js +13 -13
  66. package/test/router/view-scroll.spec.js +3 -3
  67. package/test/router/view.spec.js +2 -2
  68. package/types/router/core/common/coreservices.d.ts +2 -3
  69. package/types/router/core/globals.d.ts +1 -4
  70. package/types/router/core/interface.d.ts +2 -8
  71. package/types/router/core/params/paramTypes.d.ts +0 -1
  72. package/types/router/core/router.d.ts +2 -3
  73. package/types/router/core/state/stateQueueManager.d.ts +1 -3
  74. package/types/router/core/state/stateRegistry.d.ts +0 -2
  75. package/types/router/core/state/stateService.d.ts +1 -2
  76. package/types/router/core/transition/interface.d.ts +3 -3
  77. package/types/router/core/transition/transitionService.d.ts +1 -2
  78. package/types/router/core/url/urlConfig.d.ts +1 -2
  79. package/types/router/core/url/urlRules.d.ts +1 -2
  80. package/types/router/core/url/urlService.d.ts +1 -2
  81. package/types/router/locationServices.d.ts +0 -1
  82. package/src/router/location-services.js +0 -67
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../../src/jqLite";
1
+ import { dealoc, jqLite } from "../../src/jqLite";
2
2
  import { publishExternalAPI } from "../../src/public";
3
3
  import { createInjector } from "../../src/injector";
4
4
 
@@ -18,6 +18,7 @@ describe("ngList", () => {
18
18
 
19
19
  afterEach(() => {
20
20
  dealoc(element);
21
+ jqLite.CACHE.clear();
21
22
  });
22
23
 
23
24
  function changeInputValue(val) {
@@ -52,6 +52,7 @@ describe("ngModel", () => {
52
52
 
53
53
  afterEach(() => {
54
54
  dealoc(element);
55
+ jqLite.CACHE.clear();
55
56
  });
56
57
 
57
58
  describe("NgModelController", () => {
@@ -1,4 +1,4 @@
1
- import { dealoc } from "../../src/jqLite";
1
+ import { dealoc, jqLite } from "../../src/jqLite";
2
2
  import { publishExternalAPI } from "../../src/public";
3
3
  import { createInjector } from "../../src/injector";
4
4
 
@@ -21,6 +21,7 @@ describe("ngNonBindable", () => {
21
21
 
22
22
  afterEach(() => {
23
23
  dealoc(element);
24
+ jqLite.CACHE.clear();
24
25
  });
25
26
 
26
27
  it("should prevent compilation of the owning element and its children", () => {
@@ -21,6 +21,7 @@ describe("scriptDirective", () => {
21
21
 
22
22
  afterEach(() => {
23
23
  dealoc(element);
24
+ jqLite.CACHE.clear();
24
25
  });
25
26
 
26
27
  it("should populate $templateCache with contents of a ng-template script element", () => {
@@ -1,6 +1,6 @@
1
1
  import { publishExternalAPI } from "../../src/public";
2
2
  import { createInjector } from "../../src/injector";
3
- import { dealoc } from "../../src/jqLite";
3
+ import { dealoc, jqLite } from "../../src/jqLite";
4
4
 
5
5
  describe("ngSrcset", () => {
6
6
  let $scope;
@@ -17,6 +17,7 @@ describe("ngSrcset", () => {
17
17
 
18
18
  afterEach(() => {
19
19
  dealoc(element);
20
+ jqLite.CACHE.clear();
20
21
  });
21
22
 
22
23
  it("should not result empty string in img srcset", () => {
@@ -17,6 +17,7 @@ describe("ngShow / ngHide", () => {
17
17
 
18
18
  afterEach(() => {
19
19
  dealoc(element);
20
+ jqLite.CACHE.clear();
20
21
  });
21
22
 
22
23
  describe("ngShow", () => {
@@ -1,6 +1,6 @@
1
1
  import { publishExternalAPI } from "../../src/public";
2
2
  import { createInjector } from "../../src/injector";
3
- import { dealoc } from "../../src/jqLite";
3
+ import { dealoc, jqLite } from "../../src/jqLite";
4
4
 
5
5
  describe("ngSrc", () => {
6
6
  let $scope;
@@ -17,6 +17,7 @@ describe("ngSrc", () => {
17
17
 
18
18
  afterEach(() => {
19
19
  dealoc(element);
20
+ jqLite.CACHE.clear();
20
21
  });
21
22
 
22
23
  describe("img[ng-src]", () => {
@@ -17,6 +17,7 @@ describe("ng-style", () => {
17
17
 
18
18
  afterEach(() => {
19
19
  dealoc(element);
20
+ jqLite.CACHE.clear();
20
21
  });
21
22
 
22
23
  it("should set", () => {
@@ -1,6 +1,6 @@
1
1
  import { publishExternalAPI } from "../../src/public";
2
2
  import { createInjector } from "../../src/injector";
3
- import { dealoc } from "../../src/jqLite";
3
+ import { dealoc, jqLite } from "../../src/jqLite";
4
4
 
5
5
  describe("ngSwitch", () => {
6
6
  let $scope;
@@ -19,6 +19,7 @@ describe("ngSwitch", () => {
19
19
 
20
20
  afterEach(() => {
21
21
  dealoc(element);
22
+ jqLite.CACHE.clear();
22
23
  });
23
24
 
24
25
  it("should switch on value change", () => {
@@ -1,6 +1,6 @@
1
1
  import { publishExternalAPI } from "../../src/public";
2
2
  import { createInjector } from "../../src/injector";
3
- import { dealoc } from "../../src/jqLite";
3
+ import { dealoc, jqLite } from "../../src/jqLite";
4
4
 
5
5
  describe("validators", () => {
6
6
  let $rootScope;
@@ -122,7 +122,7 @@ describe("uiStateRef", () => {
122
122
 
123
123
  it("should transition states when left-clicked", async () => {
124
124
  browserTrigger(el, "click");
125
- await wait(100);
125
+ await wait(200);
126
126
  expect($state.current.name).toEqual("contacts.item.detail");
127
127
  expect($stateParams.id).toEqual(5);
128
128
  });
@@ -135,7 +135,7 @@ describe("uiStateRef", () => {
135
135
  cancelable: true,
136
136
  }),
137
137
  );
138
- await wait(100);
138
+ await wait(200);
139
139
  expect($state.current.name).toEqual("top");
140
140
  expect($stateParams.id).toBeUndefined();
141
141
  });
@@ -281,7 +281,7 @@ describe("uiStateRef", () => {
281
281
 
282
282
  // triggerClick(el2);
283
283
  // timeoutFlush();
284
- // await wait(10);
284
+ // await wait(100);
285
285
 
286
286
  // expect($state.current.name).toEqual('top');
287
287
  // expect(obj($stateParams)).toEqual({});
@@ -324,31 +324,31 @@ describe("uiStateRef", () => {
324
324
 
325
325
  $state.go("contacts");
326
326
  scope.$digest();
327
- await wait(10);
327
+ await wait(100);
328
328
  expect(template[0].className).toContain("active activeeq");
329
329
 
330
330
  scope.state = "contacts.item";
331
331
  scope.params = { id: 5 };
332
332
  scope.$digest();
333
- await wait(10);
333
+ await wait(100);
334
334
  expect(template[0].className).not.toContain("active");
335
335
  expect(template[0].className).not.toContain("activeeq");
336
336
 
337
337
  $state.go("contacts.item", { id: -5 });
338
338
  scope.$digest();
339
- await wait(10);
339
+ await wait(100);
340
340
  expect(template[0].className).not.toContain("active");
341
341
  expect(template[0].className).not.toContain("activeeq");
342
342
 
343
343
  $state.go("contacts.item", { id: 5 });
344
344
  scope.$digest();
345
- await wait(10);
345
+ await wait(100);
346
346
  expect(template[0].className).toContain("active activeeq");
347
347
 
348
348
  scope.state = "contacts";
349
349
  scope.params = {};
350
350
  scope.$digest();
351
- await wait(10);
351
+ await wait(100);
352
352
  expect(template[0].className).toContain("active");
353
353
  expect(template[0].className).not.toContain("activeeq");
354
354
  });
@@ -375,7 +375,7 @@ describe("uiStateRef", () => {
375
375
  expect(el.attr("href")).toBe("#/other/def");
376
376
 
377
377
  browserTrigger(el, "click");
378
- await wait(10);
378
+ await wait(100);
379
379
 
380
380
  expect($state.current.name).toBe("other");
381
381
  expect($state.params.id).toEqual("def");
@@ -390,7 +390,7 @@ describe("uiStateRef", () => {
390
390
  expect(el.attr("href")).toBe("#/other/ghi/detail");
391
391
 
392
392
  browserTrigger(el, "click");
393
- await wait(10);
393
+ await wait(100);
394
394
 
395
395
  expect($state.current.name).toBe("other.detail");
396
396
  expect($state.params.id).toEqual("ghi");
@@ -469,7 +469,7 @@ describe("uiStateRef", () => {
469
469
  });
470
470
 
471
471
  browserTrigger(template, "click");
472
- await wait(10);
472
+ await wait(100);
473
473
 
474
474
  expect(transitionOptions.reload).toEqual(true);
475
475
  expect(transitionOptions.absolute).toBeUndefined();
@@ -487,7 +487,7 @@ describe("uiStateRef", () => {
487
487
  scope.$digest();
488
488
 
489
489
  browserTrigger(el, "click");
490
- await wait(10);
490
+ await wait(100);
491
491
 
492
492
  expect($state.current.name).toBe("contacts");
493
493
  });
@@ -504,7 +504,7 @@ describe("uiStateRef", () => {
504
504
  scope.$digest();
505
505
 
506
506
  browserTrigger(el, "change");
507
- await wait(10);
507
+ await wait(100);
508
508
 
509
509
  expect($state.current.name).toEqual("contacts");
510
510
  });
@@ -521,7 +521,7 @@ describe("uiStateRef", () => {
521
521
  scope.$digest();
522
522
 
523
523
  browserTrigger(el, "change");
524
- await wait(10);
524
+ await wait(100);
525
525
  expect($state.current.name).toEqual("contacts");
526
526
 
527
527
  $state.go("top");
@@ -530,7 +530,7 @@ describe("uiStateRef", () => {
530
530
  expect($state.current.name).toEqual("top");
531
531
 
532
532
  browserTrigger(el, "blur");
533
- await wait(10);
533
+ await wait(100);
534
534
 
535
535
  expect($state.current.name).toEqual("contacts");
536
536
  });
@@ -547,7 +547,7 @@ describe("uiStateRef", () => {
547
547
  scope.$digest();
548
548
 
549
549
  browserTrigger(el, "mouseover");
550
- await wait(10);
550
+ await wait(100);
551
551
  expect($state.current.name).toEqual("contacts");
552
552
 
553
553
  $state.go("top");
@@ -556,7 +556,7 @@ describe("uiStateRef", () => {
556
556
  expect($state.current.name).toEqual("top");
557
557
 
558
558
  browserTrigger(el, "mousedown");
559
- await wait(10);
559
+ await wait(100);
560
560
  expect($state.current.name).toEqual("contacts");
561
561
  });
562
562
  });
@@ -596,7 +596,7 @@ describe("uiStateRef", () => {
596
596
 
597
597
  it("should work", async () => {
598
598
  browserTrigger(el, "click");
599
- await wait(10);
599
+ await wait(100);
600
600
 
601
601
  expect($state.$current.name).toBe("contacts.item.detail");
602
602
  expect($state.params.id).toEqual(5);
@@ -607,7 +607,7 @@ describe("uiStateRef", () => {
607
607
 
608
608
  const parentToChild = jqLite(template[0].querySelector("a.item"));
609
609
  browserTrigger(parentToChild, "click");
610
- await wait(10);
610
+ await wait(100);
611
611
 
612
612
  expect($state.$current.name).toBe("contacts.item");
613
613
 
@@ -617,7 +617,7 @@ describe("uiStateRef", () => {
617
617
  const childToParent = jqLite(template[0].querySelector("a.item-parent"));
618
618
 
619
619
  browserTrigger(childToGrandchild, "click");
620
- await wait(10);
620
+ await wait(100);
621
621
 
622
622
  const grandchildToParent = jqLite(
623
623
  template[0].querySelector("a.item-parent2"),
@@ -625,13 +625,13 @@ describe("uiStateRef", () => {
625
625
  expect($state.$current.name).toBe("contacts.item.detail");
626
626
 
627
627
  browserTrigger(grandchildToParent, "click");
628
- await wait(10);
628
+ await wait(100);
629
629
 
630
630
  expect($state.$current.name).toBe("contacts.item");
631
631
 
632
632
  $state.transitionTo("contacts.item.detail", { id: 3 });
633
633
  browserTrigger(childToParent, "click");
634
- await wait(10);
634
+ await wait(100);
635
635
  expect($state.$current.name).toBe("contacts");
636
636
  });
637
637
  });
@@ -646,7 +646,7 @@ describe("uiStateRef", () => {
646
646
  expect($state.current.name).toEqual("top");
647
647
 
648
648
  browserTrigger(el, "click");
649
- await wait(10);
649
+ await wait(100);
650
650
 
651
651
  expect($state.current.name).toEqual("contacts");
652
652
  });
@@ -661,7 +661,7 @@ describe("uiStateRef", () => {
661
661
  expect($state.current.name).toEqual("top");
662
662
 
663
663
  browserTrigger(el, "change");
664
- await wait(10);
664
+ await wait(100);
665
665
 
666
666
  expect($state.current.name).toEqual("contacts");
667
667
  });
@@ -676,7 +676,7 @@ describe("uiStateRef", () => {
676
676
  expect($state.current.name).toEqual("top");
677
677
 
678
678
  browserTrigger(el, "change");
679
- await wait(10);
679
+ await wait(100);
680
680
  expect($state.current.name).toEqual("contacts");
681
681
 
682
682
  $state.go("top");
@@ -685,7 +685,7 @@ describe("uiStateRef", () => {
685
685
  expect($state.current.name).toEqual("top");
686
686
 
687
687
  browserTrigger(el, "blur");
688
- await wait(10);
688
+ await wait(100);
689
689
  expect($state.current.name).toEqual("contacts");
690
690
  });
691
691
 
@@ -699,7 +699,7 @@ describe("uiStateRef", () => {
699
699
  expect($state.current.name).toEqual("top");
700
700
 
701
701
  browserTrigger(el, "mouseover");
702
- await wait(10);
702
+ await wait(100);
703
703
  expect($state.current.name).toEqual("contacts");
704
704
 
705
705
  $state.go("top");
@@ -708,7 +708,7 @@ describe("uiStateRef", () => {
708
708
  expect($state.current.name).toEqual("top");
709
709
 
710
710
  browserTrigger(el, "mousedown");
711
- await wait(10);
711
+ await wait(100);
712
712
  expect($state.current.name).toEqual("contacts");
713
713
  });
714
714
  });
@@ -785,11 +785,11 @@ describe("uiSrefActive", () => {
785
785
 
786
786
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
787
787
  $state.transitionTo("contacts.item", { id: 1 });
788
- await wait(10);
788
+ await wait(100);
789
789
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
790
790
 
791
791
  $state.transitionTo("contacts.item", { id: 2 });
792
- await wait(10);
792
+ await wait(100);
793
793
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
794
794
  });
795
795
 
@@ -802,11 +802,11 @@ describe("uiSrefActive", () => {
802
802
 
803
803
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
804
804
  $state.transitionTo("contacts.item.detail", { id: 5, foo: "bar" });
805
- await wait(10);
805
+ await wait(100);
806
806
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
807
807
 
808
808
  $state.transitionTo("contacts.item.detail", { id: 5, foo: "baz" });
809
- await wait(10);
809
+ await wait(100);
810
810
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
811
811
  });
812
812
 
@@ -821,15 +821,15 @@ describe("uiSrefActive", () => {
821
821
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
822
822
 
823
823
  $state.transitionTo("arrayparam", { foo: [1, 2, 3] });
824
- await wait(10);
824
+ await wait(100);
825
825
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
826
826
 
827
827
  $state.transitionTo("arrayparam", { foo: [1, 2, 3], bar: "asdf" });
828
- await wait(10);
828
+ await wait(100);
829
829
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
830
830
 
831
831
  $state.transitionTo("arrayparam", { foo: [1, 2] });
832
- await wait(10);
832
+ await wait(100);
833
833
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
834
834
  });
835
835
 
@@ -844,15 +844,15 @@ describe("uiSrefActive", () => {
844
844
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
845
845
 
846
846
  $state.transitionTo("arrayparam", { foo: [1, 2, 3] });
847
- await wait(10);
847
+ await wait(100);
848
848
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
849
849
 
850
850
  $state.transitionTo("arrayparam", { foo: [1, 2, 3], bar: "asdf" });
851
- await wait(10);
851
+ await wait(100);
852
852
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
853
853
 
854
854
  $state.transitionTo("arrayparam", { foo: [1, 2] });
855
- await wait(10);
855
+ await wait(100);
856
856
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
857
857
  });
858
858
 
@@ -866,12 +866,12 @@ describe("uiSrefActive", () => {
866
866
 
867
867
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
868
868
  $state.transitionTo("contacts.item.detail", { id: 5, foo: "bar" });
869
- await wait(10);
869
+ await wait(100);
870
870
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
871
871
 
872
872
  $rootScope.fooId = "baz";
873
873
  $rootScope.$digest();
874
- await wait(10);
874
+ await wait(100);
875
875
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
876
876
  });
877
877
 
@@ -883,12 +883,12 @@ describe("uiSrefActive", () => {
883
883
  const a = jqLite(template[0].getElementsByTagName("a")[0]);
884
884
 
885
885
  $state.transitionTo("contacts.item.edit", { id: 1 });
886
- await wait(10);
886
+ await wait(100);
887
887
  expect($state.params.id).toBe("1");
888
888
  expect(a.attr("class")).toMatch(/active/);
889
889
 
890
890
  $state.transitionTo("contacts.item.edit", { id: 4 });
891
- await wait(10);
891
+ await wait(100);
892
892
  expect($state.params.id).toBe("4");
893
893
  expect(a.attr("class")).not.toMatch(/active/);
894
894
  });
@@ -901,11 +901,11 @@ describe("uiSrefActive", () => {
901
901
  const a = jqLite(template[0].getElementsByTagName("a")[0]);
902
902
 
903
903
  $state.transitionTo("contacts.item", { id: 1 });
904
- await wait(10);
904
+ await wait(100);
905
905
  expect(a.attr("class")).toMatch(/active/);
906
906
 
907
907
  $state.transitionTo("contacts.item.edit", { id: 1 });
908
- await wait(10);
908
+ await wait(100);
909
909
  expect(a.attr("class")).not.toMatch(/active/);
910
910
  });
911
911
 
@@ -917,12 +917,12 @@ describe("uiSrefActive", () => {
917
917
  const a = jqLite(template[0].getElementsByTagName("a")[0]);
918
918
 
919
919
  $state.transitionTo("contacts.item", { id: 1 });
920
- await wait(10);
920
+ await wait(100);
921
921
  expect(a.attr("class")).toMatch(/active/);
922
922
  expect(a.attr("class")).toMatch(/active-eq/);
923
923
 
924
924
  $state.transitionTo("contacts.item.edit", { id: 1 });
925
- await wait(10);
925
+ await wait(100);
926
926
  expect(a.attr("class")).toMatch(/active/);
927
927
  expect(a.attr("class")).not.toMatch(/active-eq/);
928
928
  });
@@ -933,17 +933,17 @@ describe("uiSrefActive", () => {
933
933
  $rootScope.$digest();
934
934
 
935
935
  $state.transitionTo("contacts");
936
- await wait(10);
936
+ await wait(100);
937
937
  expect(
938
938
  jqLite(template[0].querySelector("a")).attr("class"),
939
939
  ).toBeUndefined();
940
940
 
941
941
  $state.transitionTo("contacts.item", { id: 6 });
942
- await wait(10);
942
+ await wait(100);
943
943
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
944
944
 
945
945
  $state.transitionTo("contacts.item", { id: 5 });
946
- await wait(10);
946
+ await wait(100);
947
947
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("");
948
948
  });
949
949
 
@@ -957,11 +957,11 @@ describe("uiSrefActive", () => {
957
957
  expect(jqLite(template[0]).attr("class")).toBeUndefined();
958
958
 
959
959
  $state.transitionTo("contacts.item", { id: 1 });
960
- await wait(10);
960
+ await wait(100);
961
961
  expect(jqLite(template[0]).attr("class")).toBe("active");
962
962
 
963
963
  $state.transitionTo("contacts.item", { id: 2 });
964
- await wait(10);
964
+ await wait(100);
965
965
  expect(jqLite(template[0]).attr("class")).toBe("active");
966
966
  });
967
967
 
@@ -970,7 +970,7 @@ describe("uiSrefActive", () => {
970
970
  '<div><a ui-sref="contacts.lazy" ui-sref-active="active">Lazy Contact</a></div>',
971
971
  );
972
972
  template = $compile(el)($rootScope);
973
- await wait(10);
973
+ await wait(100);
974
974
 
975
975
  _stateProvider.onInvalid(function ($to$) {
976
976
  if ($to$.name() === "contacts.lazy") {
@@ -980,11 +980,11 @@ describe("uiSrefActive", () => {
980
980
  });
981
981
 
982
982
  $state.transitionTo("contacts.item", { id: 1 });
983
- await wait(10);
983
+ await wait(100);
984
984
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
985
985
 
986
986
  $state.transitionTo("contacts.lazy");
987
- await wait(10);
987
+ await wait(100);
988
988
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
989
989
  });
990
990
 
@@ -993,7 +993,7 @@ describe("uiSrefActive", () => {
993
993
  '<div><a ui-sref="contacts.lazy" ui-sref-active-eq="active">Lazy Contact</a></div>',
994
994
  );
995
995
  template = $compile(el)($rootScope);
996
- await wait(10);
996
+ await wait(100);
997
997
 
998
998
  _stateProvider.onInvalid(function ($to$) {
999
999
  if ($to$.name() === "contacts.lazy") {
@@ -1003,11 +1003,11 @@ describe("uiSrefActive", () => {
1003
1003
  });
1004
1004
 
1005
1005
  $state.transitionTo("contacts.item", { id: 1 });
1006
- await wait(10);
1006
+ await wait(100);
1007
1007
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBeFalsy();
1008
1008
 
1009
1009
  $state.transitionTo("contacts.lazy");
1010
- await wait(10);
1010
+ await wait(100);
1011
1011
  expect(jqLite(template[0].querySelector("a")).attr("class")).toBe("active");
1012
1012
  });
1013
1013
 
@@ -1019,7 +1019,7 @@ describe("uiSrefActive", () => {
1019
1019
  const a = jqLite(template[0].getElementsByTagName("a")[0]);
1020
1020
 
1021
1021
  $state.transitionTo("contacts.item.edit", { id: 1 });
1022
- await wait(10);
1022
+ await wait(100);
1023
1023
  expect(a.attr("class")).toMatch(/active also-active/);
1024
1024
  });
1025
1025
 
@@ -1042,7 +1042,7 @@ describe("uiSrefActive", () => {
1042
1042
  )($rootScope);
1043
1043
  $rootScope.$digest();
1044
1044
  $state.transitionTo("contacts.lazy.s1");
1045
- await wait(10);
1045
+ await wait(100);
1046
1046
 
1047
1047
  expect(template.eq(0)[0].hasClass("active")).toBeTruthy();
1048
1048
  //expect(template.eq(1).hasClass("active")).toBeFalsy();
@@ -1055,7 +1055,7 @@ describe("uiSrefActive", () => {
1055
1055
  '<div ui-sref-active="{active: \'admin.*\'}"><a ui-sref-active="active" ui-sref="admin.roles">Roles</a></div>',
1056
1056
  )($rootScope);
1057
1057
  $state.transitionTo("admin.roles");
1058
- await wait(10);
1058
+ await wait(100);
1059
1059
  const abstractParent = el[0];
1060
1060
  expect(abstractParent.className).toMatch(/active/);
1061
1061
  const child = el[0].querySelector("a");
@@ -1067,7 +1067,7 @@ describe("uiSrefActive", () => {
1067
1067
  "<div ui-sref-active=\"{active: 'admin.roles({page: 1})'}\"></div>",
1068
1068
  )($rootScope);
1069
1069
  $state.transitionTo("admin.roles", { page: 1 });
1070
- await wait(10);
1070
+ await wait(100);
1071
1071
  expect(el[0].className).toMatch(/active/);
1072
1072
  });
1073
1073
 
@@ -1076,10 +1076,10 @@ describe("uiSrefActive", () => {
1076
1076
  '<div ui-sref-active="{active: \'admin.roles({page: 1})\'}"><a ui-sref="admin.roles"></a></div>',
1077
1077
  )($rootScope);
1078
1078
  $state.transitionTo("admin.roles");
1079
- await wait(10);
1079
+ await wait(100);
1080
1080
  expect(el[0].className).not.toMatch(/active/);
1081
1081
  $state.transitionTo("admin.roles", { page: 1 });
1082
- await wait(10);
1082
+ await wait(100);
1083
1083
  expect(el[0].className).toMatch(/active/);
1084
1084
  });
1085
1085
 
@@ -1088,18 +1088,18 @@ describe("uiSrefActive", () => {
1088
1088
  "<div ui-sref-active=\"{contacts: 'contacts.**', admin: 'admin.roles({page: 1})'}\"></div>",
1089
1089
  )($rootScope);
1090
1090
  $state.transitionTo("contacts");
1091
- await wait(10);
1091
+ await wait(100);
1092
1092
  expect(el[0].className).toMatch(/contacts/);
1093
1093
  expect(el[0].className).not.toMatch(/admin/);
1094
1094
  $state.transitionTo("admin.roles", { page: 1 });
1095
- await wait(10);
1095
+ await wait(100);
1096
1096
  expect(el[0].className).toMatch(/admin/);
1097
1097
  expect(el[0].className).not.toMatch(/contacts/);
1098
1098
  });
1099
1099
 
1100
1100
  it("should update the active classes when compiled", async () => {
1101
1101
  $state.transitionTo("admin.roles");
1102
- await wait(10);
1102
+ await wait(100);
1103
1103
  el = $compile("<div ui-sref-active=\"{active: 'admin.roles'}\"/>")(
1104
1104
  $rootScope,
1105
1105
  );
@@ -1126,7 +1126,7 @@ describe("uiSrefActive", () => {
1126
1126
  )($rootScope);
1127
1127
  $rootScope.$digest();
1128
1128
  $state.transitionTo("contacts.lazy.s1");
1129
- await wait(10);
1129
+ await wait(100);
1130
1130
  expect(template.eq(0).hasClass("active")).toBeTruthy();
1131
1131
  expect(template.eq(1).hasClass("active")).toBeFalsy();
1132
1132
  });
@@ -1138,7 +1138,7 @@ describe("uiSrefActive", () => {
1138
1138
  '<div ui-sref-active="{active: [\'randomState.**\', \'admin.roles\']}"><a ui-sref-active="active" ui-sref="admin.roles">Roles</a></div>',
1139
1139
  )($rootScope);
1140
1140
  $state.transitionTo("admin.roles");
1141
- await wait(10);
1141
+ await wait(100);
1142
1142
  const abstractParent = el[0];
1143
1143
  expect(abstractParent.className).toMatch(/active/);
1144
1144
  const child = el[0].querySelector("a");
@@ -1150,7 +1150,7 @@ describe("uiSrefActive", () => {
1150
1150
  "<div ui-sref-active=\"{active: ['admin.roles({page: 1})']}\"></div>",
1151
1151
  )($rootScope);
1152
1152
  $state.transitionTo("admin.roles", { page: 1 });
1153
- await wait(10);
1153
+ await wait(100);
1154
1154
  expect(el[0].className).toMatch(/active/);
1155
1155
  });
1156
1156
 
@@ -1159,18 +1159,18 @@ describe("uiSrefActive", () => {
1159
1159
  "<div ui-sref-active=\"{contacts: ['contacts.item', 'contacts.item.detail'], admin: 'admin.roles({page: 1})'}\"></div>",
1160
1160
  )($rootScope);
1161
1161
  $state.transitionTo("contacts.item.detail", { id: 1, foo: "bar" });
1162
- await wait(10);
1162
+ await wait(100);
1163
1163
  expect(el[0].className).toMatch(/contacts/);
1164
1164
  expect(el[0].className).not.toMatch(/admin/);
1165
1165
  $state.transitionTo("admin.roles", { page: 1 });
1166
- await wait(10);
1166
+ await wait(100);
1167
1167
  expect(el[0].className).toMatch(/admin/);
1168
1168
  expect(el[0].className).not.toMatch(/contacts/);
1169
1169
  });
1170
1170
 
1171
1171
  it("should update the active classes when compiled", async () => {
1172
1172
  $state.transitionTo("admin.roles");
1173
- await wait(10);
1173
+ await wait(100);
1174
1174
  el = $compile(
1175
1175
  "<div ui-sref-active=\"{active: ['admin.roles', 'admin.someOtherState']}\"/>",
1176
1176
  )($rootScope);