@skyux/modals 7.18.0 → 7.20.0
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.
- package/documentation.json +529 -2
- package/esm2020/testing/modal/modal-harness-filters.mjs +2 -0
- package/esm2020/testing/modal/modal-harness.mjs +73 -0
- package/esm2020/testing/public-api.mjs +3 -1
- package/fesm2015/skyux-modals-testing.mjs +84 -1
- package/fesm2015/skyux-modals-testing.mjs.map +1 -1
- package/fesm2020/skyux-modals-testing.mjs +72 -1
- package/fesm2020/skyux-modals-testing.mjs.map +1 -1
- package/package.json +5 -5
- package/testing/modal/modal-harness-filters.d.ts +6 -0
- package/testing/modal/modal-harness.d.ts +42 -0
- package/testing/public-api.d.ts +2 -0
package/documentation.json
CHANGED
|
@@ -20,7 +20,9 @@
|
|
|
20
20
|
"SkyModalConfigurationInterface": "interface-skymodalconfigurationinterface",
|
|
21
21
|
"SkyConfirmButtonStyleType": "type-alias-skyconfirmbuttonstyletype",
|
|
22
22
|
"SkyConfirmHarness": "class-skyconfirmharness",
|
|
23
|
-
"
|
|
23
|
+
"SkyModalHarness": "class-skymodalharness",
|
|
24
|
+
"SkyConfirmButtonHarnessFilters": "interface-skyconfirmbuttonharnessfilters",
|
|
25
|
+
"SkyModalHarnessFilters": "interface-skymodalharnessfilters"
|
|
24
26
|
},
|
|
25
27
|
"typedoc": {
|
|
26
28
|
"id": 0,
|
|
@@ -3553,6 +3555,398 @@
|
|
|
3553
3555
|
}
|
|
3554
3556
|
]
|
|
3555
3557
|
},
|
|
3558
|
+
{
|
|
3559
|
+
"id": 377,
|
|
3560
|
+
"name": "SkyModalHarness",
|
|
3561
|
+
"kind": 128,
|
|
3562
|
+
"kindString": "Class",
|
|
3563
|
+
"flags": {},
|
|
3564
|
+
"comment": {
|
|
3565
|
+
"shortText": "Harness for interacting with a modal component in tests."
|
|
3566
|
+
},
|
|
3567
|
+
"children": [
|
|
3568
|
+
{
|
|
3569
|
+
"id": 392,
|
|
3570
|
+
"name": "getAriaDescribedBy",
|
|
3571
|
+
"kind": 2048,
|
|
3572
|
+
"kindString": "Method",
|
|
3573
|
+
"flags": {
|
|
3574
|
+
"isPublic": true
|
|
3575
|
+
},
|
|
3576
|
+
"sources": [
|
|
3577
|
+
{
|
|
3578
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3579
|
+
"line": 31,
|
|
3580
|
+
"character": 15
|
|
3581
|
+
}
|
|
3582
|
+
],
|
|
3583
|
+
"signatures": [
|
|
3584
|
+
{
|
|
3585
|
+
"id": 393,
|
|
3586
|
+
"name": "getAriaDescribedBy",
|
|
3587
|
+
"kind": 4096,
|
|
3588
|
+
"kindString": "Call signature",
|
|
3589
|
+
"flags": {},
|
|
3590
|
+
"comment": {
|
|
3591
|
+
"shortText": "Gets the aria-describedBy property of the modal"
|
|
3592
|
+
},
|
|
3593
|
+
"type": {
|
|
3594
|
+
"type": "reference",
|
|
3595
|
+
"typeArguments": [
|
|
3596
|
+
{
|
|
3597
|
+
"type": "intrinsic",
|
|
3598
|
+
"name": "string"
|
|
3599
|
+
}
|
|
3600
|
+
],
|
|
3601
|
+
"qualifiedName": "Promise",
|
|
3602
|
+
"package": "typescript",
|
|
3603
|
+
"name": "Promise"
|
|
3604
|
+
}
|
|
3605
|
+
}
|
|
3606
|
+
]
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
"id": 394,
|
|
3610
|
+
"name": "getAriaLabelledBy",
|
|
3611
|
+
"kind": 2048,
|
|
3612
|
+
"kindString": "Method",
|
|
3613
|
+
"flags": {
|
|
3614
|
+
"isPublic": true
|
|
3615
|
+
},
|
|
3616
|
+
"sources": [
|
|
3617
|
+
{
|
|
3618
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3619
|
+
"line": 38,
|
|
3620
|
+
"character": 15
|
|
3621
|
+
}
|
|
3622
|
+
],
|
|
3623
|
+
"signatures": [
|
|
3624
|
+
{
|
|
3625
|
+
"id": 395,
|
|
3626
|
+
"name": "getAriaLabelledBy",
|
|
3627
|
+
"kind": 4096,
|
|
3628
|
+
"kindString": "Call signature",
|
|
3629
|
+
"flags": {},
|
|
3630
|
+
"comment": {
|
|
3631
|
+
"shortText": "Gets the aria-labelledBy property of the modal"
|
|
3632
|
+
},
|
|
3633
|
+
"type": {
|
|
3634
|
+
"type": "reference",
|
|
3635
|
+
"typeArguments": [
|
|
3636
|
+
{
|
|
3637
|
+
"type": "intrinsic",
|
|
3638
|
+
"name": "string"
|
|
3639
|
+
}
|
|
3640
|
+
],
|
|
3641
|
+
"qualifiedName": "Promise",
|
|
3642
|
+
"package": "typescript",
|
|
3643
|
+
"name": "Promise"
|
|
3644
|
+
}
|
|
3645
|
+
}
|
|
3646
|
+
]
|
|
3647
|
+
},
|
|
3648
|
+
{
|
|
3649
|
+
"id": 396,
|
|
3650
|
+
"name": "getAriaRole",
|
|
3651
|
+
"kind": 2048,
|
|
3652
|
+
"kindString": "Method",
|
|
3653
|
+
"flags": {
|
|
3654
|
+
"isPublic": true
|
|
3655
|
+
},
|
|
3656
|
+
"sources": [
|
|
3657
|
+
{
|
|
3658
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3659
|
+
"line": 45,
|
|
3660
|
+
"character": 15
|
|
3661
|
+
}
|
|
3662
|
+
],
|
|
3663
|
+
"signatures": [
|
|
3664
|
+
{
|
|
3665
|
+
"id": 397,
|
|
3666
|
+
"name": "getAriaRole",
|
|
3667
|
+
"kind": 4096,
|
|
3668
|
+
"kindString": "Call signature",
|
|
3669
|
+
"flags": {},
|
|
3670
|
+
"comment": {
|
|
3671
|
+
"shortText": "Gets the role of the modal."
|
|
3672
|
+
},
|
|
3673
|
+
"type": {
|
|
3674
|
+
"type": "reference",
|
|
3675
|
+
"typeArguments": [
|
|
3676
|
+
{
|
|
3677
|
+
"type": "intrinsic",
|
|
3678
|
+
"name": "string"
|
|
3679
|
+
}
|
|
3680
|
+
],
|
|
3681
|
+
"qualifiedName": "Promise",
|
|
3682
|
+
"package": "typescript",
|
|
3683
|
+
"name": "Promise"
|
|
3684
|
+
}
|
|
3685
|
+
}
|
|
3686
|
+
]
|
|
3687
|
+
},
|
|
3688
|
+
{
|
|
3689
|
+
"id": 398,
|
|
3690
|
+
"name": "getSize",
|
|
3691
|
+
"kind": 2048,
|
|
3692
|
+
"kindString": "Method",
|
|
3693
|
+
"flags": {
|
|
3694
|
+
"isPublic": true
|
|
3695
|
+
},
|
|
3696
|
+
"sources": [
|
|
3697
|
+
{
|
|
3698
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3699
|
+
"line": 52,
|
|
3700
|
+
"character": 15
|
|
3701
|
+
}
|
|
3702
|
+
],
|
|
3703
|
+
"signatures": [
|
|
3704
|
+
{
|
|
3705
|
+
"id": 399,
|
|
3706
|
+
"name": "getSize",
|
|
3707
|
+
"kind": 4096,
|
|
3708
|
+
"kindString": "Call signature",
|
|
3709
|
+
"flags": {},
|
|
3710
|
+
"comment": {
|
|
3711
|
+
"shortText": "Gets the modal size."
|
|
3712
|
+
},
|
|
3713
|
+
"type": {
|
|
3714
|
+
"type": "reference",
|
|
3715
|
+
"typeArguments": [
|
|
3716
|
+
{
|
|
3717
|
+
"type": "intrinsic",
|
|
3718
|
+
"name": "string"
|
|
3719
|
+
}
|
|
3720
|
+
],
|
|
3721
|
+
"qualifiedName": "Promise",
|
|
3722
|
+
"package": "typescript",
|
|
3723
|
+
"name": "Promise"
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
]
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
"id": 400,
|
|
3730
|
+
"name": "getWrapperClass",
|
|
3731
|
+
"kind": 2048,
|
|
3732
|
+
"kindString": "Method",
|
|
3733
|
+
"flags": {
|
|
3734
|
+
"isPublic": true
|
|
3735
|
+
},
|
|
3736
|
+
"sources": [
|
|
3737
|
+
{
|
|
3738
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3739
|
+
"line": 75,
|
|
3740
|
+
"character": 15
|
|
3741
|
+
}
|
|
3742
|
+
],
|
|
3743
|
+
"signatures": [
|
|
3744
|
+
{
|
|
3745
|
+
"id": 401,
|
|
3746
|
+
"name": "getWrapperClass",
|
|
3747
|
+
"kind": 4096,
|
|
3748
|
+
"kindString": "Call signature",
|
|
3749
|
+
"flags": {},
|
|
3750
|
+
"comment": {
|
|
3751
|
+
"shortText": "Gets the wrapper class of the modal."
|
|
3752
|
+
},
|
|
3753
|
+
"type": {
|
|
3754
|
+
"type": "reference",
|
|
3755
|
+
"typeArguments": [
|
|
3756
|
+
{
|
|
3757
|
+
"type": "intrinsic",
|
|
3758
|
+
"name": "string"
|
|
3759
|
+
}
|
|
3760
|
+
],
|
|
3761
|
+
"qualifiedName": "Promise",
|
|
3762
|
+
"package": "typescript",
|
|
3763
|
+
"name": "Promise"
|
|
3764
|
+
}
|
|
3765
|
+
}
|
|
3766
|
+
]
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
"id": 407,
|
|
3770
|
+
"name": "host",
|
|
3771
|
+
"kind": 2048,
|
|
3772
|
+
"kindString": "Method",
|
|
3773
|
+
"flags": {},
|
|
3774
|
+
"sources": [
|
|
3775
|
+
{
|
|
3776
|
+
"fileName": "node_modules/@angular/cdk/testing/index.d.ts",
|
|
3777
|
+
"line": 40,
|
|
3778
|
+
"character": 4
|
|
3779
|
+
}
|
|
3780
|
+
],
|
|
3781
|
+
"signatures": [
|
|
3782
|
+
{
|
|
3783
|
+
"id": 408,
|
|
3784
|
+
"name": "host",
|
|
3785
|
+
"kind": 4096,
|
|
3786
|
+
"kindString": "Call signature",
|
|
3787
|
+
"flags": {},
|
|
3788
|
+
"comment": {
|
|
3789
|
+
"shortText": "Gets a `Promise` for the `TestElement` representing the host element of the component."
|
|
3790
|
+
},
|
|
3791
|
+
"type": {
|
|
3792
|
+
"type": "reference",
|
|
3793
|
+
"typeArguments": [
|
|
3794
|
+
{
|
|
3795
|
+
"type": "reference",
|
|
3796
|
+
"qualifiedName": "TestElement",
|
|
3797
|
+
"package": "@angular/cdk",
|
|
3798
|
+
"name": "TestElement"
|
|
3799
|
+
}
|
|
3800
|
+
],
|
|
3801
|
+
"qualifiedName": "Promise",
|
|
3802
|
+
"package": "typescript",
|
|
3803
|
+
"name": "Promise"
|
|
3804
|
+
},
|
|
3805
|
+
"inheritedFrom": {
|
|
3806
|
+
"type": "reference",
|
|
3807
|
+
"name": "SkyComponentHarness.host"
|
|
3808
|
+
}
|
|
3809
|
+
}
|
|
3810
|
+
],
|
|
3811
|
+
"inheritedFrom": {
|
|
3812
|
+
"type": "reference",
|
|
3813
|
+
"name": "SkyComponentHarness.host"
|
|
3814
|
+
}
|
|
3815
|
+
},
|
|
3816
|
+
{
|
|
3817
|
+
"id": 402,
|
|
3818
|
+
"name": "isFullPage",
|
|
3819
|
+
"kind": 2048,
|
|
3820
|
+
"kindString": "Method",
|
|
3821
|
+
"flags": {
|
|
3822
|
+
"isPublic": true
|
|
3823
|
+
},
|
|
3824
|
+
"sources": [
|
|
3825
|
+
{
|
|
3826
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3827
|
+
"line": 82,
|
|
3828
|
+
"character": 15
|
|
3829
|
+
}
|
|
3830
|
+
],
|
|
3831
|
+
"signatures": [
|
|
3832
|
+
{
|
|
3833
|
+
"id": 403,
|
|
3834
|
+
"name": "isFullPage",
|
|
3835
|
+
"kind": 4096,
|
|
3836
|
+
"kindString": "Call signature",
|
|
3837
|
+
"flags": {},
|
|
3838
|
+
"comment": {
|
|
3839
|
+
"shortText": "Whether the modal is full page."
|
|
3840
|
+
},
|
|
3841
|
+
"type": {
|
|
3842
|
+
"type": "reference",
|
|
3843
|
+
"typeArguments": [
|
|
3844
|
+
{
|
|
3845
|
+
"type": "intrinsic",
|
|
3846
|
+
"name": "boolean"
|
|
3847
|
+
}
|
|
3848
|
+
],
|
|
3849
|
+
"qualifiedName": "Promise",
|
|
3850
|
+
"package": "typescript",
|
|
3851
|
+
"name": "Promise"
|
|
3852
|
+
}
|
|
3853
|
+
}
|
|
3854
|
+
]
|
|
3855
|
+
},
|
|
3856
|
+
{
|
|
3857
|
+
"id": 379,
|
|
3858
|
+
"name": "with",
|
|
3859
|
+
"kind": 2048,
|
|
3860
|
+
"kindString": "Method",
|
|
3861
|
+
"flags": {
|
|
3862
|
+
"isPublic": true,
|
|
3863
|
+
"isStatic": true
|
|
3864
|
+
},
|
|
3865
|
+
"sources": [
|
|
3866
|
+
{
|
|
3867
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3868
|
+
"line": 22,
|
|
3869
|
+
"character": 16
|
|
3870
|
+
}
|
|
3871
|
+
],
|
|
3872
|
+
"signatures": [
|
|
3873
|
+
{
|
|
3874
|
+
"id": 380,
|
|
3875
|
+
"name": "with",
|
|
3876
|
+
"kind": 4096,
|
|
3877
|
+
"kindString": "Call signature",
|
|
3878
|
+
"flags": {},
|
|
3879
|
+
"comment": {
|
|
3880
|
+
"shortText": "Gets a `HarnessPredicate` that can be used to search for a\n`SkyModalHarness` that meets certain criteria"
|
|
3881
|
+
},
|
|
3882
|
+
"parameters": [
|
|
3883
|
+
{
|
|
3884
|
+
"id": 381,
|
|
3885
|
+
"name": "filters",
|
|
3886
|
+
"kind": 32768,
|
|
3887
|
+
"kindString": "Parameter",
|
|
3888
|
+
"flags": {},
|
|
3889
|
+
"type": {
|
|
3890
|
+
"type": "reference",
|
|
3891
|
+
"id": 427,
|
|
3892
|
+
"name": "SkyModalHarnessFilters"
|
|
3893
|
+
}
|
|
3894
|
+
}
|
|
3895
|
+
],
|
|
3896
|
+
"type": {
|
|
3897
|
+
"type": "reference",
|
|
3898
|
+
"typeArguments": [
|
|
3899
|
+
{
|
|
3900
|
+
"type": "reference",
|
|
3901
|
+
"id": 377,
|
|
3902
|
+
"name": "SkyModalHarness"
|
|
3903
|
+
}
|
|
3904
|
+
],
|
|
3905
|
+
"qualifiedName": "HarnessPredicate",
|
|
3906
|
+
"package": "@angular/cdk",
|
|
3907
|
+
"name": "HarnessPredicate"
|
|
3908
|
+
}
|
|
3909
|
+
}
|
|
3910
|
+
]
|
|
3911
|
+
}
|
|
3912
|
+
],
|
|
3913
|
+
"groups": [
|
|
3914
|
+
{
|
|
3915
|
+
"title": "Constructors",
|
|
3916
|
+
"kind": 512,
|
|
3917
|
+
"children": [
|
|
3918
|
+
387
|
|
3919
|
+
]
|
|
3920
|
+
},
|
|
3921
|
+
{
|
|
3922
|
+
"title": "Methods",
|
|
3923
|
+
"kind": 2048,
|
|
3924
|
+
"children": [
|
|
3925
|
+
392,
|
|
3926
|
+
394,
|
|
3927
|
+
396,
|
|
3928
|
+
398,
|
|
3929
|
+
400,
|
|
3930
|
+
407,
|
|
3931
|
+
402,
|
|
3932
|
+
379
|
|
3933
|
+
]
|
|
3934
|
+
}
|
|
3935
|
+
],
|
|
3936
|
+
"sources": [
|
|
3937
|
+
{
|
|
3938
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness.ts",
|
|
3939
|
+
"line": 9,
|
|
3940
|
+
"character": 13
|
|
3941
|
+
}
|
|
3942
|
+
],
|
|
3943
|
+
"extendedTypes": [
|
|
3944
|
+
{
|
|
3945
|
+
"type": "reference",
|
|
3946
|
+
"name": "SkyComponentHarness"
|
|
3947
|
+
}
|
|
3948
|
+
]
|
|
3949
|
+
},
|
|
3556
3950
|
{
|
|
3557
3951
|
"id": 373,
|
|
3558
3952
|
"name": "SkyConfirmButtonHarnessFilters",
|
|
@@ -3686,6 +4080,134 @@
|
|
|
3686
4080
|
"name": "Omit"
|
|
3687
4081
|
}
|
|
3688
4082
|
]
|
|
4083
|
+
},
|
|
4084
|
+
{
|
|
4085
|
+
"id": 427,
|
|
4086
|
+
"name": "SkyModalHarnessFilters",
|
|
4087
|
+
"kind": 256,
|
|
4088
|
+
"kindString": "Interface",
|
|
4089
|
+
"flags": {},
|
|
4090
|
+
"comment": {
|
|
4091
|
+
"shortText": "A set of criteria that can be used to filter a list of SkyModalHarness instances."
|
|
4092
|
+
},
|
|
4093
|
+
"children": [
|
|
4094
|
+
{
|
|
4095
|
+
"id": 430,
|
|
4096
|
+
"name": "ancestor",
|
|
4097
|
+
"kind": 1024,
|
|
4098
|
+
"kindString": "Property",
|
|
4099
|
+
"flags": {
|
|
4100
|
+
"isOptional": true
|
|
4101
|
+
},
|
|
4102
|
+
"comment": {
|
|
4103
|
+
"shortText": "Only find instances that are nested under an element with the given selector."
|
|
4104
|
+
},
|
|
4105
|
+
"sources": [
|
|
4106
|
+
{
|
|
4107
|
+
"fileName": "node_modules/@angular/cdk/testing/index.d.ts",
|
|
4108
|
+
"line": 28,
|
|
4109
|
+
"character": 4
|
|
4110
|
+
}
|
|
4111
|
+
],
|
|
4112
|
+
"type": {
|
|
4113
|
+
"type": "intrinsic",
|
|
4114
|
+
"name": "string"
|
|
4115
|
+
},
|
|
4116
|
+
"inheritedFrom": {
|
|
4117
|
+
"type": "reference",
|
|
4118
|
+
"name": "SkyHarnessFilters.ancestor"
|
|
4119
|
+
}
|
|
4120
|
+
},
|
|
4121
|
+
{
|
|
4122
|
+
"id": 428,
|
|
4123
|
+
"name": "dataSkyId",
|
|
4124
|
+
"kind": 1024,
|
|
4125
|
+
"kindString": "Property",
|
|
4126
|
+
"flags": {
|
|
4127
|
+
"isOptional": true
|
|
4128
|
+
},
|
|
4129
|
+
"comment": {
|
|
4130
|
+
"shortText": "Only find instances whose `data-sky-id` attribute matches the given value."
|
|
4131
|
+
},
|
|
4132
|
+
"sources": [
|
|
4133
|
+
{
|
|
4134
|
+
"fileName": "libs/components/core/testing/src/shared/harness-filters.ts",
|
|
4135
|
+
"line": 11,
|
|
4136
|
+
"character": 2
|
|
4137
|
+
}
|
|
4138
|
+
],
|
|
4139
|
+
"type": {
|
|
4140
|
+
"type": "union",
|
|
4141
|
+
"types": [
|
|
4142
|
+
{
|
|
4143
|
+
"type": "intrinsic",
|
|
4144
|
+
"name": "string"
|
|
4145
|
+
},
|
|
4146
|
+
{
|
|
4147
|
+
"type": "reference",
|
|
4148
|
+
"qualifiedName": "RegExp",
|
|
4149
|
+
"package": "typescript",
|
|
4150
|
+
"name": "RegExp"
|
|
4151
|
+
}
|
|
4152
|
+
]
|
|
4153
|
+
},
|
|
4154
|
+
"inheritedFrom": {
|
|
4155
|
+
"type": "reference",
|
|
4156
|
+
"name": "SkyHarnessFilters.dataSkyId"
|
|
4157
|
+
}
|
|
4158
|
+
},
|
|
4159
|
+
{
|
|
4160
|
+
"id": 429,
|
|
4161
|
+
"name": "selector",
|
|
4162
|
+
"kind": 1024,
|
|
4163
|
+
"kindString": "Property",
|
|
4164
|
+
"flags": {
|
|
4165
|
+
"isOptional": true
|
|
4166
|
+
},
|
|
4167
|
+
"comment": {
|
|
4168
|
+
"shortText": "Only find instances whose host element matches the given selector."
|
|
4169
|
+
},
|
|
4170
|
+
"sources": [
|
|
4171
|
+
{
|
|
4172
|
+
"fileName": "node_modules/@angular/cdk/testing/index.d.ts",
|
|
4173
|
+
"line": 26,
|
|
4174
|
+
"character": 4
|
|
4175
|
+
}
|
|
4176
|
+
],
|
|
4177
|
+
"type": {
|
|
4178
|
+
"type": "intrinsic",
|
|
4179
|
+
"name": "string"
|
|
4180
|
+
},
|
|
4181
|
+
"inheritedFrom": {
|
|
4182
|
+
"type": "reference",
|
|
4183
|
+
"name": "SkyHarnessFilters.selector"
|
|
4184
|
+
}
|
|
4185
|
+
}
|
|
4186
|
+
],
|
|
4187
|
+
"groups": [
|
|
4188
|
+
{
|
|
4189
|
+
"title": "Properties",
|
|
4190
|
+
"kind": 1024,
|
|
4191
|
+
"children": [
|
|
4192
|
+
430,
|
|
4193
|
+
428,
|
|
4194
|
+
429
|
|
4195
|
+
]
|
|
4196
|
+
}
|
|
4197
|
+
],
|
|
4198
|
+
"sources": [
|
|
4199
|
+
{
|
|
4200
|
+
"fileName": "projects/modals/src/testing/modal/modal-harness-filters.ts",
|
|
4201
|
+
"line": 7,
|
|
4202
|
+
"character": 17
|
|
4203
|
+
}
|
|
4204
|
+
],
|
|
4205
|
+
"extendedTypes": [
|
|
4206
|
+
{
|
|
4207
|
+
"type": "reference",
|
|
4208
|
+
"name": "SkyHarnessFilters"
|
|
4209
|
+
}
|
|
4210
|
+
]
|
|
3689
4211
|
}
|
|
3690
4212
|
],
|
|
3691
4213
|
"groups": [
|
|
@@ -3778,7 +4300,7 @@
|
|
|
3778
4300
|
{
|
|
3779
4301
|
"fileName": "modal-demo-modal.component.html",
|
|
3780
4302
|
"filePath": "/projects/modals/documentation/code-examples/modal/modal-demo-modal.component.html",
|
|
3781
|
-
"rawContents": "<form [formGroup]=\"demoForm\" (submit)=\"saveForm()\">\n <sky-modal>\n <sky-modal-header> Modal title </sky-modal-header>\n <sky-modal-content>\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myInput.id\">\n An input inside a modal\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"value1\"\n type=\"text\"\n skyId\n #myInput=\"skyId\"\n />\n </sky-input-box>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-sm\"\n type=\"submit\"\n >\n Save\n </button>\n <button class=\"sky-btn sky-btn-link\" type=\"button\" (click)=\"cancelForm()\">\n Cancel\n </button>\n </sky-modal-footer>\n </sky-modal>\n</form>\n"
|
|
4303
|
+
"rawContents": "<form [formGroup]=\"demoForm\" (submit)=\"saveForm()\">\n <sky-modal data-sky-id=\"modal-demo\">\n <sky-modal-header> Modal title </sky-modal-header>\n <sky-modal-content>\n <sky-input-box>\n <label class=\"sky-control-label\" [for]=\"myInput.id\">\n An input inside a modal\n </label>\n <input\n class=\"sky-form-control\"\n formControlName=\"value1\"\n type=\"text\"\n skyId\n #myInput=\"skyId\"\n />\n </sky-input-box>\n </sky-modal-content>\n <sky-modal-footer>\n <button\n class=\"sky-btn sky-btn-primary sky-margin-inline-sm\"\n type=\"submit\"\n >\n Save\n </button>\n <button class=\"sky-btn sky-btn-link\" type=\"button\" (click)=\"cancelForm()\">\n Cancel\n </button>\n </sky-modal-footer>\n </sky-modal>\n</form>\n"
|
|
3782
4304
|
},
|
|
3783
4305
|
{
|
|
3784
4306
|
"fileName": "modal-demo-modal.component.ts",
|
|
@@ -3790,6 +4312,11 @@
|
|
|
3790
4312
|
"filePath": "/projects/modals/documentation/code-examples/modal/modal-demo.component.html",
|
|
3791
4313
|
"rawContents": "<button\n class=\"sky-btn sky-btn-default\"\n type=\"button\"\n (click)=\"onOpenModalClick()\"\n>\n Open modal demo\n</button>\n<div *ngIf=\"demoValue\">The user entered {{ demoValue }}</div>\n"
|
|
3792
4314
|
},
|
|
4315
|
+
{
|
|
4316
|
+
"fileName": "modal-demo.component.spec.ts",
|
|
4317
|
+
"filePath": "/projects/modals/documentation/code-examples/modal/modal-demo.component.spec.ts",
|
|
4318
|
+
"rawContents": "import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';\nimport { ComponentFixture, TestBed } from '@angular/core/testing';\nimport { SkyWaitService } from '@skyux/indicators';\nimport { SkyModalService } from '@skyux/modals';\nimport { SkyModalHarness } from '@skyux/modals/testing';\n\nimport { Observable, of } from 'rxjs';\n\nimport { ModalDemoDataService } from './modal-demo-data.service';\nimport { ModalDemoComponent } from './modal-demo.component';\nimport { ModalDemoModule } from './modal-demo.module';\n\nclass mockWaitSvc {\n public blockingWrap(data: unknown): Observable<unknown> {\n return of(data);\n }\n}\n\ndescribe('Basic modal', async () => {\n async function setupTest(): Promise<{\n modalHarness: SkyModalHarness;\n fixture: ComponentFixture<ModalDemoComponent>;\n }> {\n const fixture = TestBed.createComponent(ModalDemoComponent);\n fixture.componentInstance.onOpenModalClick();\n fixture.detectChanges();\n\n const loader = TestbedHarnessEnvironment.documentRootLoader(fixture);\n const modalHarness = await loader.getHarness(\n SkyModalHarness.with({\n dataSkyId: 'modal-demo',\n })\n );\n\n return { modalHarness, fixture };\n }\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n imports: [ModalDemoModule],\n providers: [\n SkyModalService,\n { provide: SkyWaitService, useClass: mockWaitSvc },\n ModalDemoDataService,\n ],\n });\n });\n\n it('should open the correct modal', async () => {\n const { modalHarness, fixture } = await setupTest();\n\n fixture.detectChanges();\n\n await expectAsync(modalHarness.getAriaRole()).toBeResolvedTo('dialog');\n await expectAsync(modalHarness.getSize()).toBeResolvedTo('medium');\n await expectAsync(modalHarness.isFullPage()).toBeResolvedTo(false);\n });\n});\n"
|
|
4319
|
+
},
|
|
3793
4320
|
{
|
|
3794
4321
|
"fileName": "modal-demo.component.ts",
|
|
3795
4322
|
"filePath": "/projects/modals/documentation/code-examples/modal/modal-demo.component.ts",
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export {};
|
|
2
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtaGFybmVzcy1maWx0ZXJzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL21vZGFscy90ZXN0aW5nL3NyYy9tb2RhbC9tb2RhbC1oYXJuZXNzLWZpbHRlcnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFNreUhhcm5lc3NGaWx0ZXJzIH0gZnJvbSAnQHNreXV4L2NvcmUvdGVzdGluZyc7XG5cbi8qKlxuICogQSBzZXQgb2YgY3JpdGVyaWEgdGhhdCBjYW4gYmUgdXNlZCB0byBmaWx0ZXIgYSBsaXN0IG9mIFNreU1vZGFsSGFybmVzcyBpbnN0YW5jZXMuXG4gKi9cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBAdHlwZXNjcmlwdC1lc2xpbnQvbm8tZW1wdHktaW50ZXJmYWNlXG5leHBvcnQgaW50ZXJmYWNlIFNreU1vZGFsSGFybmVzc0ZpbHRlcnMgZXh0ZW5kcyBTa3lIYXJuZXNzRmlsdGVycyB7fVxuIl19
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
var _SkyModalHarness_getModal, _SkyModalHarness_getModalDialog;
|
|
2
|
+
import { __classPrivateFieldGet } from "tslib";
|
|
3
|
+
import { SkyComponentHarness } from '@skyux/core/testing';
|
|
4
|
+
/**
|
|
5
|
+
* Harness for interacting with a modal component in tests.
|
|
6
|
+
*/
|
|
7
|
+
export class SkyModalHarness extends SkyComponentHarness {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
_SkyModalHarness_getModal.set(this, this.locatorFor('.sky-modal'));
|
|
11
|
+
_SkyModalHarness_getModalDialog.set(this, this.locatorFor('.sky-modal-dialog'));
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
15
|
+
* `SkyModalHarness` that meets certain criteria
|
|
16
|
+
*/
|
|
17
|
+
static with(filters) {
|
|
18
|
+
return SkyModalHarness.getDataSkyIdPredicate(filters);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Gets the aria-describedBy property of the modal
|
|
22
|
+
*/
|
|
23
|
+
async getAriaDescribedBy() {
|
|
24
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-describedby');
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Gets the aria-labelledBy property of the modal
|
|
28
|
+
*/
|
|
29
|
+
async getAriaLabelledBy() {
|
|
30
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-labelledby');
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Gets the role of the modal.
|
|
34
|
+
*/
|
|
35
|
+
async getAriaRole() {
|
|
36
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('role');
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Gets the modal size.
|
|
40
|
+
*/
|
|
41
|
+
async getSize() {
|
|
42
|
+
if (await this.isFullPage()) {
|
|
43
|
+
throw new Error('Size cannot be determined because size property is overridden when modal is full page');
|
|
44
|
+
}
|
|
45
|
+
const modal = await __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
46
|
+
if (await modal.hasClass('sky-modal-small')) {
|
|
47
|
+
return 'small';
|
|
48
|
+
}
|
|
49
|
+
if (await modal.hasClass('sky-modal-large')) {
|
|
50
|
+
return 'large';
|
|
51
|
+
}
|
|
52
|
+
return 'medium';
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Gets the wrapper class of the modal.
|
|
56
|
+
*/
|
|
57
|
+
async getWrapperClass() {
|
|
58
|
+
return await (await this.host()).getProperty('className');
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Whether the modal is full page.
|
|
62
|
+
*/
|
|
63
|
+
async isFullPage() {
|
|
64
|
+
const modal = __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
65
|
+
return (await modal).hasClass('sky-modal-full-page');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
_SkyModalHarness_getModal = new WeakMap(), _SkyModalHarness_getModalDialog = new WeakMap();
|
|
69
|
+
/**
|
|
70
|
+
* @internal
|
|
71
|
+
*/
|
|
72
|
+
SkyModalHarness.hostSelector = 'sky-modal';
|
|
73
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtaGFybmVzcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9tb2RhbHMvdGVzdGluZy9zcmMvbW9kYWwvbW9kYWwtaGFybmVzcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUNBLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSx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HJldHVybiAnc21hbGwnO1xuICAgIH1cblxuICAgIGlmIChhd2FpdCBtb2RhbC5oYXNDbGFzcygnc2t5LW1vZGFsLWxhcmdlJykpIHtcbiAgICAgIHJldHVybiAnbGFyZ2UnO1xuICAgIH1cblxuICAgIHJldHVybiAnbWVkaXVtJztcbiAgfVxuXG4gIC8qKlxuICAgKiBHZXRzIHRoZSB3cmFwcGVyIGNsYXNzIG9mIHRoZSBtb2RhbC5cbiAgICovXG4gIHB1YmxpYyBhc3luYyBnZXRXcmFwcGVyQ2xhc3MoKTogUHJvbWlzZTxzdHJpbmcgfCB1bmRlZmluZWQ+IHtcbiAgICByZXR1cm4gYXdhaXQgKGF3YWl0IHRoaXMuaG9zdCgpKS5nZXRQcm9wZXJ0eSgnY2xhc3NOYW1lJyk7XG4gIH1cblxuICAvKipcbiAgICogV2hldGhlciB0aGUgbW9kYWwgaXMgZnVsbCBwYWdlLlxuICAgKi9cbiAgcHVibGljIGFzeW5jIGlzRnVsbFBhZ2UoKTogUHJvbWlzZTxib29sZWFuPiB7XG4gICAgY29uc3QgbW9kYWwgPSB0aGlzLiNnZXRNb2RhbCgpO1xuICAgIHJldHVybiAoYXdhaXQgbW9kYWwpLmhhc0NsYXNzKCdza3ktbW9kYWwtZnVsbC1wYWdlJyk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -2,4 +2,6 @@ export * from './modal-fixture';
|
|
|
2
2
|
export * from './confirm/confirm-harness';
|
|
3
3
|
export * from './confirm/confirm-button-harness';
|
|
4
4
|
export * from './confirm/confirm-button-harness-filters';
|
|
5
|
-
|
|
5
|
+
export * from './modal/modal-harness';
|
|
6
|
+
export * from './modal/modal-harness-filters';
|
|
7
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29tcG9uZW50cy9tb2RhbHMvdGVzdGluZy9zcmMvcHVibGljLWFwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlCQUFpQixDQUFDO0FBRWhDLGNBQWMsMkJBQTJCLENBQUM7QUFDMUMsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLDBDQUEwQyxDQUFDO0FBRXpELGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYywrQkFBK0IsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vbW9kYWwtZml4dHVyZSc7XG5cbmV4cG9ydCAqIGZyb20gJy4vY29uZmlybS9jb25maXJtLWhhcm5lc3MnO1xuZXhwb3J0ICogZnJvbSAnLi9jb25maXJtL2NvbmZpcm0tYnV0dG9uLWhhcm5lc3MnO1xuZXhwb3J0ICogZnJvbSAnLi9jb25maXJtL2NvbmZpcm0tYnV0dG9uLWhhcm5lc3MtZmlsdGVycyc7XG5cbmV4cG9ydCAqIGZyb20gJy4vbW9kYWwvbW9kYWwtaGFybmVzcyc7XG5leHBvcnQgKiBmcm9tICcuL21vZGFsL21vZGFsLWhhcm5lc3MtZmlsdGVycyc7XG4iXX0=
|
|
@@ -308,9 +308,92 @@ _SkyConfirmHarness_getBodyEl = new WeakMap(), _SkyConfirmHarness_getButtons = ne
|
|
|
308
308
|
};
|
|
309
309
|
SkyConfirmHarness.hostSelector = 'sky-confirm';
|
|
310
310
|
|
|
311
|
+
var _SkyModalHarness_getModal, _SkyModalHarness_getModalDialog;
|
|
312
|
+
/**
|
|
313
|
+
* Harness for interacting with a modal component in tests.
|
|
314
|
+
*/
|
|
315
|
+
class SkyModalHarness extends SkyComponentHarness {
|
|
316
|
+
constructor() {
|
|
317
|
+
super(...arguments);
|
|
318
|
+
_SkyModalHarness_getModal.set(this, this.locatorFor('.sky-modal'));
|
|
319
|
+
_SkyModalHarness_getModalDialog.set(this, this.locatorFor('.sky-modal-dialog'));
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
323
|
+
* `SkyModalHarness` that meets certain criteria
|
|
324
|
+
*/
|
|
325
|
+
static with(filters) {
|
|
326
|
+
return SkyModalHarness.getDataSkyIdPredicate(filters);
|
|
327
|
+
}
|
|
328
|
+
/**
|
|
329
|
+
* Gets the aria-describedBy property of the modal
|
|
330
|
+
*/
|
|
331
|
+
getAriaDescribedBy() {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
333
|
+
return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-describedby');
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
/**
|
|
337
|
+
* Gets the aria-labelledBy property of the modal
|
|
338
|
+
*/
|
|
339
|
+
getAriaLabelledBy() {
|
|
340
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
341
|
+
return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-labelledby');
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Gets the role of the modal.
|
|
346
|
+
*/
|
|
347
|
+
getAriaRole() {
|
|
348
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
349
|
+
return (yield __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('role');
|
|
350
|
+
});
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Gets the modal size.
|
|
354
|
+
*/
|
|
355
|
+
getSize() {
|
|
356
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
357
|
+
if (yield this.isFullPage()) {
|
|
358
|
+
throw new Error('Size cannot be determined because size property is overridden when modal is full page');
|
|
359
|
+
}
|
|
360
|
+
const modal = yield __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
361
|
+
if (yield modal.hasClass('sky-modal-small')) {
|
|
362
|
+
return 'small';
|
|
363
|
+
}
|
|
364
|
+
if (yield modal.hasClass('sky-modal-large')) {
|
|
365
|
+
return 'large';
|
|
366
|
+
}
|
|
367
|
+
return 'medium';
|
|
368
|
+
});
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Gets the wrapper class of the modal.
|
|
372
|
+
*/
|
|
373
|
+
getWrapperClass() {
|
|
374
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
375
|
+
return yield (yield this.host()).getProperty('className');
|
|
376
|
+
});
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* Whether the modal is full page.
|
|
380
|
+
*/
|
|
381
|
+
isFullPage() {
|
|
382
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
383
|
+
const modal = __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
384
|
+
return (yield modal).hasClass('sky-modal-full-page');
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
_SkyModalHarness_getModal = new WeakMap(), _SkyModalHarness_getModalDialog = new WeakMap();
|
|
389
|
+
/**
|
|
390
|
+
* @internal
|
|
391
|
+
*/
|
|
392
|
+
SkyModalHarness.hostSelector = 'sky-modal';
|
|
393
|
+
|
|
311
394
|
/**
|
|
312
395
|
* Generated bundle index. Do not edit.
|
|
313
396
|
*/
|
|
314
397
|
|
|
315
|
-
export { SkyConfirmButtonHarness, SkyConfirmHarness, SkyModalFixture };
|
|
398
|
+
export { SkyConfirmButtonHarness, SkyConfirmHarness, SkyModalFixture, SkyModalHarness };
|
|
316
399
|
//# sourceMappingURL=skyux-modals-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-modals-testing.mjs","sources":["../../../../../libs/components/modals/testing/src/modal-fixture.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-button-harness.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-harness.ts","../../../../../libs/components/modals/testing/src/skyux-modals-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\n/**\n * Allows interaction with a SKY UX modal component.\n * @internal\n */\nexport class SkyModalFixture {\n #modalElement: HTMLElement;\n\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n const modalElement = document.querySelector(\n 'sky-modal[data-sky-id=\"' + skyTestId + '\"]'\n ) as HTMLElement;\n\n if (!modalElement) {\n throw new Error(\n `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`\n );\n }\n\n this.#modalElement = modalElement;\n }\n\n /**\n * The modal component's ARIA describedby attribute.\n */\n public get ariaDescribedBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const describedByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-describedby')!;\n return describedByAttribute;\n }\n\n /**\n * The modal component's ARIA labelledby attribute.\n */\n public get ariaLabelledBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const labelledByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-labelledby')!;\n\n return labelledByAttribute;\n }\n\n /**\n * The modal component's role attribute.\n */\n public get ariaRole(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const roleAttribute = modalDialogElement.getAttribute('role')!;\n return roleAttribute;\n }\n\n /**\n * Whether or not the modal is a full page modal.\n */\n public get fullPage(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-full-page');\n }\n\n /**\n * The size of the modal.\n */\n public get size(): string | undefined {\n const modalDivElement = this.getModalDiv();\n const possibleSizes = ['small', 'medium', 'large'];\n\n for (const size of possibleSizes) {\n if (modalDivElement.classList.contains('sky-modal-' + size)) {\n return size;\n }\n }\n\n return;\n }\n\n /**\n * Whether or not the modal is set up for tiled content.\n */\n public get tiledBody(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-tiled');\n }\n\n /**\n * Clicks the modal header's \"close\" button.\n */\n public clickHeaderCloseButton(): void {\n this.#checkModalElement();\n const closeButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-btn-close'\n );\n\n if (\n closeButton &&\n window.getComputedStyle(closeButton).display !== 'none'\n ) {\n closeButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No header close button exists.`);\n }\n }\n\n /**\n * Clicks the modal header's \"help\" button.\n */\n public clickHelpButton(): void {\n this.#checkModalElement();\n const helpButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-header-buttons button[name=\"help-button\"]'\n );\n\n if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {\n helpButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No help button exists.`);\n }\n }\n\n /**\n * Returns the main modal element.\n */\n public getModalDiv(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal');\n }\n\n /**\n * Returns the modal's content element.\n */\n public getModalContentEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-content');\n }\n\n /**\n * Returns the modal's footer element.\n */\n public getModalFooterEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-footer');\n }\n\n /**\n * Returns the modal's header element.\n */\n public getModalHeaderEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-header');\n }\n\n #checkModalElement(): void {\n if (!document.contains(this.#modalElement)) {\n throw new Error('Modal element no longer exists. Was the modal closed?');\n }\n }\n\n #getModalDialogElement(): HTMLElement {\n this.#checkModalElement();\n // We can always know that the dialog element will exist if the modal is open and exists.\n return this.#modalElement.querySelector('.sky-modal-dialog')!;\n }\n}\n","import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyConfirmButtonStyleType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n * @internal\n */\nexport class SkyConfirmButtonHarness extends ComponentHarness {\n public static hostSelector = '.sky-confirm-buttons .sky-btn';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyConfirmButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyConfirmButtonHarnessFilters\n ): HarnessPredicate<SkyConfirmButtonHarness> {\n return new HarnessPredicate(SkyConfirmButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.getText(), text)\n )\n .addOption('styleType', filters.styleType, async (harness, styleType) =>\n HarnessPredicate.stringMatches(await harness.getStyleType(), styleType)\n );\n }\n\n /**\n * Clicks the confirm button.\n */\n public async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Gets the button style of the confirm button.\n */\n public async getStyleType(): Promise<SkyConfirmButtonStyleType> {\n const hostEl = await this.host();\n\n if (await hostEl.hasClass('sky-btn-primary')) {\n return 'primary';\n } else if (await hostEl.hasClass('sky-btn-link')) {\n return 'link';\n } else if (await hostEl.hasClass('sky-btn-danger')) {\n return 'danger';\n }\n return 'default';\n }\n\n /**\n * Gets the text content of the confirm button.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { ComponentHarness, HarnessQuery } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyConfirmType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarness } from './confirm-button-harness';\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n */\nexport class SkyConfirmHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-confirm';\n\n #getBodyEl = this.locatorForOptional('.sky-confirm-body');\n #getButtons = this.locatorForAll(SkyConfirmButtonHarness);\n #getConfirmEl = this.locatorFor('.sky-confirm');\n #getMessageEl = this.locatorFor('.sky-confirm-message');\n\n /**\n * Clicks a confirm button.\n */\n public async clickCustomButton(\n filters: SkyConfirmButtonHarnessFilters\n ): Promise<void> {\n const buttons = await this.getCustomButtons(filters);\n\n if (buttons.length > 1) {\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n throw new Error(\n `More than one button matches the filter(s): ${JSON.stringify(\n filters\n )}.`\n );\n }\n await buttons[0].click();\n }\n\n /**\n * Clicks a confirm button.\n */\n public async clickOkButton(): Promise<void> {\n const type = await this.getType();\n\n if (type === SkyConfirmType.Custom) {\n throw new Error('Cannot click OK button on a confirm of type custom.');\n }\n const buttons = await this.#getButtons();\n await buttons[0].click();\n }\n\n /**\n * Gets the body of the confirm component.\n */\n public async getBodyText(): Promise<string | undefined> {\n return (await this.#getBodyEl())?.text();\n }\n\n /**\n * Gets the confirm component's custom buttons.\n */\n public async getCustomButtons(\n filters?: SkyConfirmButtonHarnessFilters\n ): Promise<SkyConfirmButtonHarness[]> {\n const confirmType = await this.getType();\n\n if (confirmType === SkyConfirmType.OK) {\n throw new Error('Cannot get custom buttons for confirm of type OK.');\n }\n\n const harnesses = await this.#queryHarnesses(\n SkyConfirmButtonHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n\n throw new Error(\n `Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Gets the message of the confirm component.\n */\n public async getMessageText(): Promise<string> {\n return (await this.#getMessageEl()).text();\n }\n\n /**\n * Gets the type of the confirm component.\n */\n public async getType(): Promise<SkyConfirmType> {\n const confirmEl = await this.#getConfirmEl();\n if (await confirmEl.hasClass('sky-confirm-type-ok')) {\n return SkyConfirmType.OK;\n }\n\n return SkyConfirmType.Custom;\n }\n\n /**\n * Whether the whitespace is preserved on the confirm component.\n */\n public async isWhiteSpacePreserved(): Promise<boolean> {\n return (await this.#getMessageEl()).hasClass(\n 'sky-confirm-preserve-white-space'\n );\n }\n\n /**\n * Returns child harnesses.\n */\n async #queryHarnesses<T extends ComponentHarness>(\n harness: HarnessQuery<T>\n ): Promise<T[]> {\n return this.locatorForAll(harness)();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAGlC,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,IAAI,KAAK,CACb,yDAAyD,SAAS,CAAA,EAAA,CAAI,CACvE,CAAC;AACH,SAAA;QAED,sBAAA,CAAA,IAAI,EAAA,6BAAA,EAAiB,YAAY,EAAA,GAAA,CAAA,CAAC;KACnC;AAED;;AAEG;AACH,IAAA,IAAW,eAAe,GAAA;AACxB,QAAA,MAAM,kBAAkB,GAAG,sBAAA,CAAA,IAAI,0EAAuB,CAA3B,IAAA,CAAA,IAAI,CAAyB,CAAC;;AAEzD,QAAA,MAAM,oBAAoB;;AAExB,QAAA,kBAAkB,CAAC,YAAY,CAAC,kBAAkB,CAAE,CAAC;AACvD,QAAA,OAAO,oBAAoB,CAAC;KAC7B;AAED;;AAEG;AACH,IAAA,IA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,MAAM,sBAAA,CAAA,IAAI,uCAAc,CAAlB,IAAA,CAAA,IAAI,CAAgB,EAAE,QAAQ,CAC1C,kCAAkC,CACnC,CAAC;SACH,CAAA,CAAA;AAAA,KAAA;;;AAED;;AAEG;IACH,2CACE,OAAwB,EAAA;;AAExB,YAAA,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;SACtC,CAAA,CAAA;KAAA,CAAA;AAjHa,iBAAY,CAAA,YAAA,GAAG,aAAa;;ACX5C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-modals-testing.mjs","sources":["../../../../../libs/components/modals/testing/src/modal-fixture.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-button-harness.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-harness.ts","../../../../../libs/components/modals/testing/src/modal/modal-harness.ts","../../../../../libs/components/modals/testing/src/skyux-modals-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\n/**\n * Allows interaction with a SKY UX modal component.\n * @internal\n */\nexport class SkyModalFixture {\n #modalElement: HTMLElement;\n\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n const modalElement = document.querySelector(\n 'sky-modal[data-sky-id=\"' + skyTestId + '\"]'\n ) as HTMLElement;\n\n if (!modalElement) {\n throw new Error(\n `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`\n );\n }\n\n this.#modalElement = modalElement;\n }\n\n /**\n * The modal component's ARIA describedby attribute.\n */\n public get ariaDescribedBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const describedByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-describedby')!;\n return describedByAttribute;\n }\n\n /**\n * The modal component's ARIA labelledby attribute.\n */\n public get ariaLabelledBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const labelledByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-labelledby')!;\n\n return labelledByAttribute;\n }\n\n /**\n * The modal component's role attribute.\n */\n public get ariaRole(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const roleAttribute = modalDialogElement.getAttribute('role')!;\n return roleAttribute;\n }\n\n /**\n * Whether or not the modal is a full page modal.\n */\n public get fullPage(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-full-page');\n }\n\n /**\n * The size of the modal.\n */\n public get size(): string | undefined {\n const modalDivElement = this.getModalDiv();\n const possibleSizes = ['small', 'medium', 'large'];\n\n for (const size of possibleSizes) {\n if (modalDivElement.classList.contains('sky-modal-' + size)) {\n return size;\n }\n }\n\n return;\n }\n\n /**\n * Whether or not the modal is set up for tiled content.\n */\n public get tiledBody(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-tiled');\n }\n\n /**\n * Clicks the modal header's \"close\" button.\n */\n public clickHeaderCloseButton(): void {\n this.#checkModalElement();\n const closeButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-btn-close'\n );\n\n if (\n closeButton &&\n window.getComputedStyle(closeButton).display !== 'none'\n ) {\n closeButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No header close button exists.`);\n }\n }\n\n /**\n * Clicks the modal header's \"help\" button.\n */\n public clickHelpButton(): void {\n this.#checkModalElement();\n const helpButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-header-buttons button[name=\"help-button\"]'\n );\n\n if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {\n helpButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No help button exists.`);\n }\n }\n\n /**\n * Returns the main modal element.\n */\n public getModalDiv(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal');\n }\n\n /**\n * Returns the modal's content element.\n */\n public getModalContentEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-content');\n }\n\n /**\n * Returns the modal's footer element.\n */\n public getModalFooterEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-footer');\n }\n\n /**\n * Returns the modal's header element.\n */\n public getModalHeaderEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-header');\n }\n\n #checkModalElement(): void {\n if (!document.contains(this.#modalElement)) {\n throw new Error('Modal element no longer exists. Was the modal closed?');\n }\n }\n\n #getModalDialogElement(): HTMLElement {\n this.#checkModalElement();\n // We can always know that the dialog element will exist if the modal is open and exists.\n return this.#modalElement.querySelector('.sky-modal-dialog')!;\n }\n}\n","import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyConfirmButtonStyleType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n * @internal\n */\nexport class SkyConfirmButtonHarness extends ComponentHarness {\n public static hostSelector = '.sky-confirm-buttons .sky-btn';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyConfirmButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyConfirmButtonHarnessFilters\n ): HarnessPredicate<SkyConfirmButtonHarness> {\n return new HarnessPredicate(SkyConfirmButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.getText(), text)\n )\n .addOption('styleType', filters.styleType, async (harness, styleType) =>\n HarnessPredicate.stringMatches(await harness.getStyleType(), styleType)\n );\n }\n\n /**\n * Clicks the confirm button.\n */\n public async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Gets the button style of the confirm button.\n */\n public async getStyleType(): Promise<SkyConfirmButtonStyleType> {\n const hostEl = await this.host();\n\n if (await hostEl.hasClass('sky-btn-primary')) {\n return 'primary';\n } else if (await hostEl.hasClass('sky-btn-link')) {\n return 'link';\n } else if (await hostEl.hasClass('sky-btn-danger')) {\n return 'danger';\n }\n return 'default';\n }\n\n /**\n * Gets the text content of the confirm button.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { ComponentHarness, HarnessQuery } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyConfirmType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarness } from './confirm-button-harness';\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n */\nexport class SkyConfirmHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-confirm';\n\n #getBodyEl = this.locatorForOptional('.sky-confirm-body');\n #getButtons = this.locatorForAll(SkyConfirmButtonHarness);\n #getConfirmEl = this.locatorFor('.sky-confirm');\n #getMessageEl = this.locatorFor('.sky-confirm-message');\n\n /**\n * Clicks a confirm button.\n */\n public async clickCustomButton(\n filters: SkyConfirmButtonHarnessFilters\n ): Promise<void> {\n const buttons = await this.getCustomButtons(filters);\n\n if (buttons.length > 1) {\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n throw new Error(\n `More than one button matches the filter(s): ${JSON.stringify(\n filters\n )}.`\n );\n }\n await buttons[0].click();\n }\n\n /**\n * Clicks a confirm button.\n */\n public async clickOkButton(): Promise<void> {\n const type = await this.getType();\n\n if (type === SkyConfirmType.Custom) {\n throw new Error('Cannot click OK button on a confirm of type custom.');\n }\n const buttons = await this.#getButtons();\n await buttons[0].click();\n }\n\n /**\n * Gets the body of the confirm component.\n */\n public async getBodyText(): Promise<string | undefined> {\n return (await this.#getBodyEl())?.text();\n }\n\n /**\n * Gets the confirm component's custom buttons.\n */\n public async getCustomButtons(\n filters?: SkyConfirmButtonHarnessFilters\n ): Promise<SkyConfirmButtonHarness[]> {\n const confirmType = await this.getType();\n\n if (confirmType === SkyConfirmType.OK) {\n throw new Error('Cannot get custom buttons for confirm of type OK.');\n }\n\n const harnesses = await this.#queryHarnesses(\n SkyConfirmButtonHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n\n throw new Error(\n `Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Gets the message of the confirm component.\n */\n public async getMessageText(): Promise<string> {\n return (await this.#getMessageEl()).text();\n }\n\n /**\n * Gets the type of the confirm component.\n */\n public async getType(): Promise<SkyConfirmType> {\n const confirmEl = await this.#getConfirmEl();\n if (await confirmEl.hasClass('sky-confirm-type-ok')) {\n return SkyConfirmType.OK;\n }\n\n return SkyConfirmType.Custom;\n }\n\n /**\n * Whether the whitespace is preserved on the confirm component.\n */\n public async isWhiteSpacePreserved(): Promise<boolean> {\n return (await this.#getMessageEl()).hasClass(\n 'sky-confirm-preserve-white-space'\n );\n }\n\n /**\n * Returns child harnesses.\n */\n async #queryHarnesses<T extends ComponentHarness>(\n harness: HarnessQuery<T>\n ): Promise<T[]> {\n return this.locatorForAll(harness)();\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyModalHarnessFilters } from './modal-harness-filters';\n\n/**\n * Harness for interacting with a modal component in tests.\n */\nexport class SkyModalHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-modal';\n\n #getModal = this.locatorFor('.sky-modal');\n #getModalDialog = this.locatorFor('.sky-modal-dialog');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyModalHarness` that meets certain criteria\n */\n public static with(\n filters: SkyModalHarnessFilters\n ): HarnessPredicate<SkyModalHarness> {\n return SkyModalHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the aria-describedBy property of the modal\n */\n public async getAriaDescribedBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-describedby');\n }\n\n /**\n * Gets the aria-labelledBy property of the modal\n */\n public async getAriaLabelledBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-labelledby');\n }\n\n /**\n * Gets the role of the modal.\n */\n public async getAriaRole(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('role');\n }\n\n /**\n * Gets the modal size.\n */\n public async getSize(): Promise<string> {\n if (await this.isFullPage()) {\n throw new Error(\n 'Size cannot be determined because size property is overridden when modal is full page'\n );\n }\n\n const modal = await this.#getModal();\n\n if (await modal.hasClass('sky-modal-small')) {\n return 'small';\n }\n\n if (await modal.hasClass('sky-modal-large')) {\n return 'large';\n }\n\n return 'medium';\n }\n\n /**\n * Gets the wrapper class of the modal.\n */\n public async getWrapperClass(): Promise<string | undefined> {\n return await (await this.host()).getProperty('className');\n }\n\n /**\n * Whether the modal is full page.\n */\n public async isFullPage(): Promise<boolean> {\n const modal = this.#getModal();\n return (await modal).hasClass('sky-modal-full-page');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAGlC,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI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AAA,KAAA;AAED;;AAEG;IACU,UAAU,GAAA;;AACrB,YAAA,MAAM,KAAK,GAAG,sBAAA,CAAA,IAAI,iCAAU,CAAd,IAAA,CAAA,IAAI,CAAY,CAAC;YAC/B,OAAO,CAAC,MAAM,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;SACtD,CAAA,CAAA;AAAA,KAAA;;;AA3ED;;AAEG;AACW,eAAY,CAAA,YAAA,GAAG,WAAW;;ACZ1C;;AAEG;;;;"}
|
|
@@ -285,9 +285,80 @@ async function _SkyConfirmHarness_queryHarnesses(harness) {
|
|
|
285
285
|
};
|
|
286
286
|
SkyConfirmHarness.hostSelector = 'sky-confirm';
|
|
287
287
|
|
|
288
|
+
var _SkyModalHarness_getModal, _SkyModalHarness_getModalDialog;
|
|
289
|
+
/**
|
|
290
|
+
* Harness for interacting with a modal component in tests.
|
|
291
|
+
*/
|
|
292
|
+
class SkyModalHarness extends SkyComponentHarness {
|
|
293
|
+
constructor() {
|
|
294
|
+
super(...arguments);
|
|
295
|
+
_SkyModalHarness_getModal.set(this, this.locatorFor('.sky-modal'));
|
|
296
|
+
_SkyModalHarness_getModalDialog.set(this, this.locatorFor('.sky-modal-dialog'));
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
300
|
+
* `SkyModalHarness` that meets certain criteria
|
|
301
|
+
*/
|
|
302
|
+
static with(filters) {
|
|
303
|
+
return SkyModalHarness.getDataSkyIdPredicate(filters);
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Gets the aria-describedBy property of the modal
|
|
307
|
+
*/
|
|
308
|
+
async getAriaDescribedBy() {
|
|
309
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-describedby');
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Gets the aria-labelledBy property of the modal
|
|
313
|
+
*/
|
|
314
|
+
async getAriaLabelledBy() {
|
|
315
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('aria-labelledby');
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
* Gets the role of the modal.
|
|
319
|
+
*/
|
|
320
|
+
async getAriaRole() {
|
|
321
|
+
return (await __classPrivateFieldGet(this, _SkyModalHarness_getModalDialog, "f").call(this)).getAttribute('role');
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Gets the modal size.
|
|
325
|
+
*/
|
|
326
|
+
async getSize() {
|
|
327
|
+
if (await this.isFullPage()) {
|
|
328
|
+
throw new Error('Size cannot be determined because size property is overridden when modal is full page');
|
|
329
|
+
}
|
|
330
|
+
const modal = await __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
331
|
+
if (await modal.hasClass('sky-modal-small')) {
|
|
332
|
+
return 'small';
|
|
333
|
+
}
|
|
334
|
+
if (await modal.hasClass('sky-modal-large')) {
|
|
335
|
+
return 'large';
|
|
336
|
+
}
|
|
337
|
+
return 'medium';
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* Gets the wrapper class of the modal.
|
|
341
|
+
*/
|
|
342
|
+
async getWrapperClass() {
|
|
343
|
+
return await (await this.host()).getProperty('className');
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Whether the modal is full page.
|
|
347
|
+
*/
|
|
348
|
+
async isFullPage() {
|
|
349
|
+
const modal = __classPrivateFieldGet(this, _SkyModalHarness_getModal, "f").call(this);
|
|
350
|
+
return (await modal).hasClass('sky-modal-full-page');
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
_SkyModalHarness_getModal = new WeakMap(), _SkyModalHarness_getModalDialog = new WeakMap();
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
SkyModalHarness.hostSelector = 'sky-modal';
|
|
358
|
+
|
|
288
359
|
/**
|
|
289
360
|
* Generated bundle index. Do not edit.
|
|
290
361
|
*/
|
|
291
362
|
|
|
292
|
-
export { SkyConfirmButtonHarness, SkyConfirmHarness, SkyModalFixture };
|
|
363
|
+
export { SkyConfirmButtonHarness, SkyConfirmHarness, SkyModalFixture, SkyModalHarness };
|
|
293
364
|
//# sourceMappingURL=skyux-modals-testing.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skyux-modals-testing.mjs","sources":["../../../../../libs/components/modals/testing/src/modal-fixture.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-button-harness.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-harness.ts","../../../../../libs/components/modals/testing/src/skyux-modals-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\n/**\n * Allows interaction with a SKY UX modal component.\n * @internal\n */\nexport class SkyModalFixture {\n #modalElement: HTMLElement;\n\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n const modalElement = document.querySelector(\n 'sky-modal[data-sky-id=\"' + skyTestId + '\"]'\n ) as HTMLElement;\n\n if (!modalElement) {\n throw new Error(\n `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`\n );\n }\n\n this.#modalElement = modalElement;\n }\n\n /**\n * The modal component's ARIA describedby attribute.\n */\n public get ariaDescribedBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const describedByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-describedby')!;\n return describedByAttribute;\n }\n\n /**\n * The modal component's ARIA labelledby attribute.\n */\n public get ariaLabelledBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const labelledByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-labelledby')!;\n\n return labelledByAttribute;\n }\n\n /**\n * The modal component's role attribute.\n */\n public get ariaRole(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const roleAttribute = modalDialogElement.getAttribute('role')!;\n return roleAttribute;\n }\n\n /**\n * Whether or not the modal is a full page modal.\n */\n public get fullPage(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-full-page');\n }\n\n /**\n * The size of the modal.\n */\n public get size(): string | undefined {\n const modalDivElement = this.getModalDiv();\n const possibleSizes = ['small', 'medium', 'large'];\n\n for (const size of possibleSizes) {\n if (modalDivElement.classList.contains('sky-modal-' + size)) {\n return size;\n }\n }\n\n return;\n }\n\n /**\n * Whether or not the modal is set up for tiled content.\n */\n public get tiledBody(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-tiled');\n }\n\n /**\n * Clicks the modal header's \"close\" button.\n */\n public clickHeaderCloseButton(): void {\n this.#checkModalElement();\n const closeButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-btn-close'\n );\n\n if (\n closeButton &&\n window.getComputedStyle(closeButton).display !== 'none'\n ) {\n closeButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No header close button exists.`);\n }\n }\n\n /**\n * Clicks the modal header's \"help\" button.\n */\n public clickHelpButton(): void {\n this.#checkModalElement();\n const helpButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-header-buttons button[name=\"help-button\"]'\n );\n\n if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {\n helpButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No help button exists.`);\n }\n }\n\n /**\n * Returns the main modal element.\n */\n public getModalDiv(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal');\n }\n\n /**\n * Returns the modal's content element.\n */\n public getModalContentEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-content');\n }\n\n /**\n * Returns the modal's footer element.\n */\n public getModalFooterEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-footer');\n }\n\n /**\n * Returns the modal's header element.\n */\n public getModalHeaderEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-header');\n }\n\n #checkModalElement(): void {\n if (!document.contains(this.#modalElement)) {\n throw new Error('Modal element no longer exists. Was the modal closed?');\n }\n }\n\n #getModalDialogElement(): HTMLElement {\n this.#checkModalElement();\n // We can always know that the dialog element will exist if the modal is open and exists.\n return this.#modalElement.querySelector('.sky-modal-dialog')!;\n }\n}\n","import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyConfirmButtonStyleType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n * @internal\n */\nexport class SkyConfirmButtonHarness extends ComponentHarness {\n public static hostSelector = '.sky-confirm-buttons .sky-btn';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyConfirmButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyConfirmButtonHarnessFilters\n ): HarnessPredicate<SkyConfirmButtonHarness> {\n return new HarnessPredicate(SkyConfirmButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.getText(), text)\n )\n .addOption('styleType', filters.styleType, async (harness, styleType) =>\n HarnessPredicate.stringMatches(await harness.getStyleType(), styleType)\n );\n }\n\n /**\n * Clicks the confirm button.\n */\n public async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Gets the button style of the confirm button.\n */\n public async getStyleType(): Promise<SkyConfirmButtonStyleType> {\n const hostEl = await this.host();\n\n if (await hostEl.hasClass('sky-btn-primary')) {\n return 'primary';\n } else if (await hostEl.hasClass('sky-btn-link')) {\n return 'link';\n } else if (await hostEl.hasClass('sky-btn-danger')) {\n return 'danger';\n }\n return 'default';\n }\n\n /**\n * Gets the text content of the confirm button.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { ComponentHarness, HarnessQuery } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyConfirmType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarness } from './confirm-button-harness';\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n */\nexport class SkyConfirmHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-confirm';\n\n #getBodyEl = this.locatorForOptional('.sky-confirm-body');\n #getButtons = this.locatorForAll(SkyConfirmButtonHarness);\n #getConfirmEl = this.locatorFor('.sky-confirm');\n #getMessageEl = this.locatorFor('.sky-confirm-message');\n\n /**\n * Clicks a confirm button.\n */\n public async clickCustomButton(\n filters: SkyConfirmButtonHarnessFilters\n ): Promise<void> {\n const buttons = await this.getCustomButtons(filters);\n\n if (buttons.length > 1) {\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n throw new Error(\n `More than one button matches the filter(s): ${JSON.stringify(\n filters\n )}.`\n );\n }\n await buttons[0].click();\n }\n\n /**\n * Clicks a confirm button.\n */\n public async clickOkButton(): Promise<void> {\n const type = await this.getType();\n\n if (type === SkyConfirmType.Custom) {\n throw new Error('Cannot click OK button on a confirm of type custom.');\n }\n const buttons = await this.#getButtons();\n await buttons[0].click();\n }\n\n /**\n * Gets the body of the confirm component.\n */\n public async getBodyText(): Promise<string | undefined> {\n return (await this.#getBodyEl())?.text();\n }\n\n /**\n * Gets the confirm component's custom buttons.\n */\n public async getCustomButtons(\n filters?: SkyConfirmButtonHarnessFilters\n ): Promise<SkyConfirmButtonHarness[]> {\n const confirmType = await this.getType();\n\n if (confirmType === SkyConfirmType.OK) {\n throw new Error('Cannot get custom buttons for confirm of type OK.');\n }\n\n const harnesses = await this.#queryHarnesses(\n SkyConfirmButtonHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n\n throw new Error(\n `Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Gets the message of the confirm component.\n */\n public async getMessageText(): Promise<string> {\n return (await this.#getMessageEl()).text();\n }\n\n /**\n * Gets the type of the confirm component.\n */\n public async getType(): Promise<SkyConfirmType> {\n const confirmEl = await this.#getConfirmEl();\n if (await confirmEl.hasClass('sky-confirm-type-ok')) {\n return SkyConfirmType.OK;\n }\n\n return SkyConfirmType.Custom;\n }\n\n /**\n * Whether the whitespace is preserved on the confirm component.\n */\n public async isWhiteSpacePreserved(): Promise<boolean> {\n return (await this.#getMessageEl()).hasClass(\n 'sky-confirm-preserve-white-space'\n );\n }\n\n /**\n * Returns child harnesses.\n */\n async #queryHarnesses<T extends ComponentHarness>(\n harness: HarnessQuery<T>\n ): Promise<T[]> {\n return this.locatorForAll(harness)();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGlC,QAAA,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,I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,CAAA,IAAI,uCAAc,CAAlB,IAAA,CAAA,IAAI,CAAgB,EAAE,QAAQ,CAC1C,kCAAkC,CACnC,CAAC;KACH;;;AAED;;AAEG;AACH,iDACE,OAAwB,EAAA;AAExB,IAAA,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,EAAE,CAAC;AACvC,CAAC,CAAA;AAjHa,iBAAY,CAAA,YAAA,GAAG,aAAa;;ACX5C;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"skyux-modals-testing.mjs","sources":["../../../../../libs/components/modals/testing/src/modal-fixture.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-button-harness.ts","../../../../../libs/components/modals/testing/src/confirm/confirm-harness.ts","../../../../../libs/components/modals/testing/src/modal/modal-harness.ts","../../../../../libs/components/modals/testing/src/skyux-modals-testing.ts"],"sourcesContent":["import { ComponentFixture } from '@angular/core/testing';\n\n/**\n * Allows interaction with a SKY UX modal component.\n * @internal\n */\nexport class SkyModalFixture {\n #modalElement: HTMLElement;\n\n #fixture: ComponentFixture<unknown>;\n\n constructor(fixture: ComponentFixture<unknown>, skyTestId: string) {\n this.#fixture = fixture;\n const modalElement = document.querySelector(\n 'sky-modal[data-sky-id=\"' + skyTestId + '\"]'\n ) as HTMLElement;\n\n if (!modalElement) {\n throw new Error(\n `No element was found with a \\`data-sky-id\\` value of \"${skyTestId}\".`\n );\n }\n\n this.#modalElement = modalElement;\n }\n\n /**\n * The modal component's ARIA describedby attribute.\n */\n public get ariaDescribedBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const describedByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-describedby')!;\n return describedByAttribute;\n }\n\n /**\n * The modal component's ARIA labelledby attribute.\n */\n public get ariaLabelledBy(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n const labelledByAttribute =\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n modalDialogElement.getAttribute('aria-labelledby')!;\n\n return labelledByAttribute;\n }\n\n /**\n * The modal component's role attribute.\n */\n public get ariaRole(): string | undefined {\n const modalDialogElement = this.#getModalDialogElement();\n /* Non-null assertion as our component has a default for if the user does not provide this attribute or if they provide \"undefined\" */\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const roleAttribute = modalDialogElement.getAttribute('role')!;\n return roleAttribute;\n }\n\n /**\n * Whether or not the modal is a full page modal.\n */\n public get fullPage(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-full-page');\n }\n\n /**\n * The size of the modal.\n */\n public get size(): string | undefined {\n const modalDivElement = this.getModalDiv();\n const possibleSizes = ['small', 'medium', 'large'];\n\n for (const size of possibleSizes) {\n if (modalDivElement.classList.contains('sky-modal-' + size)) {\n return size;\n }\n }\n\n return;\n }\n\n /**\n * Whether or not the modal is set up for tiled content.\n */\n public get tiledBody(): boolean {\n const modalDivElement = this.getModalDiv();\n return modalDivElement.classList.contains('sky-modal-tiled');\n }\n\n /**\n * Clicks the modal header's \"close\" button.\n */\n public clickHeaderCloseButton(): void {\n this.#checkModalElement();\n const closeButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-btn-close'\n );\n\n if (\n closeButton &&\n window.getComputedStyle(closeButton).display !== 'none'\n ) {\n closeButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No header close button exists.`);\n }\n }\n\n /**\n * Clicks the modal header's \"help\" button.\n */\n public clickHelpButton(): void {\n this.#checkModalElement();\n const helpButton: HTMLElement | null = this.#modalElement.querySelector(\n '.sky-modal .sky-modal-header-buttons button[name=\"help-button\"]'\n );\n\n if (helpButton && window.getComputedStyle(helpButton).display !== 'none') {\n helpButton.click();\n this.#fixture.detectChanges();\n } else {\n throw new Error(`No help button exists.`);\n }\n }\n\n /**\n * Returns the main modal element.\n */\n public getModalDiv(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal');\n }\n\n /**\n * Returns the modal's content element.\n */\n public getModalContentEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-content');\n }\n\n /**\n * Returns the modal's footer element.\n */\n public getModalFooterEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-footer');\n }\n\n /**\n * Returns the modal's header element.\n */\n public getModalHeaderEl(): any {\n this.#checkModalElement();\n return this.#modalElement.querySelector('.sky-modal-header');\n }\n\n #checkModalElement(): void {\n if (!document.contains(this.#modalElement)) {\n throw new Error('Modal element no longer exists. Was the modal closed?');\n }\n }\n\n #getModalDialogElement(): HTMLElement {\n this.#checkModalElement();\n // We can always know that the dialog element will exist if the modal is open and exists.\n return this.#modalElement.querySelector('.sky-modal-dialog')!;\n }\n}\n","import { ComponentHarness, HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyConfirmButtonStyleType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n * @internal\n */\nexport class SkyConfirmButtonHarness extends ComponentHarness {\n public static hostSelector = '.sky-confirm-buttons .sky-btn';\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyConfirmButtonHarness` that meets certain criteria.\n */\n public static with(\n filters: SkyConfirmButtonHarnessFilters\n ): HarnessPredicate<SkyConfirmButtonHarness> {\n return new HarnessPredicate(SkyConfirmButtonHarness, filters)\n .addOption('text', filters.text, async (harness, text) =>\n HarnessPredicate.stringMatches(await harness.getText(), text)\n )\n .addOption('styleType', filters.styleType, async (harness, styleType) =>\n HarnessPredicate.stringMatches(await harness.getStyleType(), styleType)\n );\n }\n\n /**\n * Clicks the confirm button.\n */\n public async click(): Promise<void> {\n return (await this.host()).click();\n }\n\n /**\n * Gets the button style of the confirm button.\n */\n public async getStyleType(): Promise<SkyConfirmButtonStyleType> {\n const hostEl = await this.host();\n\n if (await hostEl.hasClass('sky-btn-primary')) {\n return 'primary';\n } else if (await hostEl.hasClass('sky-btn-link')) {\n return 'link';\n } else if (await hostEl.hasClass('sky-btn-danger')) {\n return 'danger';\n }\n return 'default';\n }\n\n /**\n * Gets the text content of the confirm button.\n */\n public async getText(): Promise<string> {\n return (await this.host()).text();\n }\n}\n","import { ComponentHarness, HarnessQuery } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\nimport { SkyConfirmType } from '@skyux/modals';\n\nimport { SkyConfirmButtonHarness } from './confirm-button-harness';\nimport { SkyConfirmButtonHarnessFilters } from './confirm-button-harness-filters';\n\n/**\n * Harness for interacting with a confirm component in tests.\n */\nexport class SkyConfirmHarness extends SkyComponentHarness {\n public static hostSelector = 'sky-confirm';\n\n #getBodyEl = this.locatorForOptional('.sky-confirm-body');\n #getButtons = this.locatorForAll(SkyConfirmButtonHarness);\n #getConfirmEl = this.locatorFor('.sky-confirm');\n #getMessageEl = this.locatorFor('.sky-confirm-message');\n\n /**\n * Clicks a confirm button.\n */\n public async clickCustomButton(\n filters: SkyConfirmButtonHarnessFilters\n ): Promise<void> {\n const buttons = await this.getCustomButtons(filters);\n\n if (buttons.length > 1) {\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n throw new Error(\n `More than one button matches the filter(s): ${JSON.stringify(\n filters\n )}.`\n );\n }\n await buttons[0].click();\n }\n\n /**\n * Clicks a confirm button.\n */\n public async clickOkButton(): Promise<void> {\n const type = await this.getType();\n\n if (type === SkyConfirmType.Custom) {\n throw new Error('Cannot click OK button on a confirm of type custom.');\n }\n const buttons = await this.#getButtons();\n await buttons[0].click();\n }\n\n /**\n * Gets the body of the confirm component.\n */\n public async getBodyText(): Promise<string | undefined> {\n return (await this.#getBodyEl())?.text();\n }\n\n /**\n * Gets the confirm component's custom buttons.\n */\n public async getCustomButtons(\n filters?: SkyConfirmButtonHarnessFilters\n ): Promise<SkyConfirmButtonHarness[]> {\n const confirmType = await this.getType();\n\n if (confirmType === SkyConfirmType.OK) {\n throw new Error('Cannot get custom buttons for confirm of type OK.');\n }\n\n const harnesses = await this.#queryHarnesses(\n SkyConfirmButtonHarness.with(filters || {})\n );\n\n if (filters && harnesses.length === 0) {\n // Stringify the regular expression so that it's readable in the console log.\n if (filters.text instanceof RegExp) {\n filters.text = filters.text.toString();\n }\n\n throw new Error(\n `Could not find buttons matching filter(s): ${JSON.stringify(filters)}.`\n );\n }\n\n return harnesses;\n }\n\n /**\n * Gets the message of the confirm component.\n */\n public async getMessageText(): Promise<string> {\n return (await this.#getMessageEl()).text();\n }\n\n /**\n * Gets the type of the confirm component.\n */\n public async getType(): Promise<SkyConfirmType> {\n const confirmEl = await this.#getConfirmEl();\n if (await confirmEl.hasClass('sky-confirm-type-ok')) {\n return SkyConfirmType.OK;\n }\n\n return SkyConfirmType.Custom;\n }\n\n /**\n * Whether the whitespace is preserved on the confirm component.\n */\n public async isWhiteSpacePreserved(): Promise<boolean> {\n return (await this.#getMessageEl()).hasClass(\n 'sky-confirm-preserve-white-space'\n );\n }\n\n /**\n * Returns child harnesses.\n */\n async #queryHarnesses<T extends ComponentHarness>(\n harness: HarnessQuery<T>\n ): Promise<T[]> {\n return this.locatorForAll(harness)();\n }\n}\n","import { HarnessPredicate } from '@angular/cdk/testing';\nimport { SkyComponentHarness } from '@skyux/core/testing';\n\nimport { SkyModalHarnessFilters } from './modal-harness-filters';\n\n/**\n * Harness for interacting with a modal component in tests.\n */\nexport class SkyModalHarness extends SkyComponentHarness {\n /**\n * @internal\n */\n public static hostSelector = 'sky-modal';\n\n #getModal = this.locatorFor('.sky-modal');\n #getModalDialog = this.locatorFor('.sky-modal-dialog');\n\n /**\n * Gets a `HarnessPredicate` that can be used to search for a\n * `SkyModalHarness` that meets certain criteria\n */\n public static with(\n filters: SkyModalHarnessFilters\n ): HarnessPredicate<SkyModalHarness> {\n return SkyModalHarness.getDataSkyIdPredicate(filters);\n }\n\n /**\n * Gets the aria-describedBy property of the modal\n */\n public async getAriaDescribedBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-describedby');\n }\n\n /**\n * Gets the aria-labelledBy property of the modal\n */\n public async getAriaLabelledBy(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('aria-labelledby');\n }\n\n /**\n * Gets the role of the modal.\n */\n public async getAriaRole(): Promise<string | null> {\n return (await this.#getModalDialog()).getAttribute('role');\n }\n\n /**\n * Gets the modal size.\n */\n public async getSize(): Promise<string> {\n if (await this.isFullPage()) {\n throw new Error(\n 'Size cannot be determined because size property is overridden when modal is full page'\n );\n }\n\n const modal = await this.#getModal();\n\n if (await modal.hasClass('sky-modal-small')) {\n return 'small';\n }\n\n if (await modal.hasClass('sky-modal-large')) {\n return 'large';\n }\n\n return 'medium';\n }\n\n /**\n * Gets the wrapper class of the modal.\n */\n public async getWrapperClass(): Promise<string | undefined> {\n return await (await this.host()).getProperty('className');\n }\n\n /**\n * Whether the modal is full page.\n */\n public async isFullPage(): Promise<boolean> {\n const modal = this.#getModal();\n return (await modal).hasClass('sky-modal-full-page');\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA;;;AAGG;MACU,eAAe,CAAA;IAK1B,WAAY,CAAA,OAAkC,EAAE,SAAiB,EAAA;;QAJjE,6BAA2B,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;QAE3B,wBAAoC,CAAA,GAAA,CAAA,IAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAGlC,QAAA,sBAAA,CAAA,IAAI,EAAA,wBAAA,EAAY,OAAO,EAAA,GAAA,CAAA,CAAC;AACxB,QAAA,MAAM,YAAY,GAAG,QAAQ,CAAC,aAAa,CACzC,yBAAyB,GAAG,SAAS,GAAG,IAAI,CAC9B,CAAC;QAEjB,IAAI,CAAC,YAAY,EAAE;AACjB,YAAA,MAAM,IAAI,K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;AAClB,QAAA,IAAI,MAAM,IAAI,CAAC,UAAU,EAAE,EAAE;AAC3B,YAAA,MAAM,IAAI,KAAK,CACb,uFAAuF,CACxF,CAAC;AACH,SAAA;QAED,MAAM,KAAK,GAAG,MAAM,sBAAA,CAAA,IAAI,EAAU,yBAAA,EAAA,GAAA,CAAA,CAAA,IAAA,CAAd,IAAI,CAAY,CAAC;AAErC,QAAA,IAAI,MAAM,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;AAC3C,YAAA,OAAO,OAAO,CAAC;AAChB,SAAA;AAED,QAAA,IAAI,MAAM,KAAK,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;AAC3C,YAAA,OAAO,OAAO,CAAC;AAChB,SAAA;AAED,QAAA,OAAO,QAAQ,CAAC;KACjB;AAED;;AAEG;AACI,IAAA,MAAM,eAAe,GAAA;AAC1B,QAAA,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;KAC3D;AAED;;AAEG;AACI,IAAA,MAAM,UAAU,GAAA;QACrB,MAAM,KAAK,GAAG,sBAAA,CAAA,IAAI,iCAAU,CAAd,IAAA,CAAA,IAAI,CAAY,CAAC;QAC/B,OAAO,CAAC,MAAM,KAAK,EAAE,QAAQ,CAAC,qBAAqB,CAAC,CAAC;KACtD;;;AA3ED;;AAEG;AACW,eAAY,CAAA,YAAA,GAAG,WAAW;;ACZ1C;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyux/modals",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.20.0",
|
|
4
4
|
"author": "Blackbaud, Inc.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"blackbaud",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@angular/common": "^14.2.11",
|
|
45
45
|
"@angular/core": "^14.2.11",
|
|
46
46
|
"@angular/router": "^14.2.11",
|
|
47
|
-
"@skyux/core": "7.
|
|
48
|
-
"@skyux/i18n": "7.
|
|
49
|
-
"@skyux/indicators": "7.
|
|
50
|
-
"@skyux/theme": "7.
|
|
47
|
+
"@skyux/core": "7.20.0",
|
|
48
|
+
"@skyux/i18n": "7.20.0",
|
|
49
|
+
"@skyux/indicators": "7.20.0",
|
|
50
|
+
"@skyux/theme": "7.20.0"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"tslib": "^2.3.1"
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { HarnessPredicate } from '@angular/cdk/testing';
|
|
2
|
+
import { SkyComponentHarness } from '@skyux/core/testing';
|
|
3
|
+
import { SkyModalHarnessFilters } from './modal-harness-filters';
|
|
4
|
+
/**
|
|
5
|
+
* Harness for interacting with a modal component in tests.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SkyModalHarness extends SkyComponentHarness {
|
|
8
|
+
#private;
|
|
9
|
+
/**
|
|
10
|
+
* @internal
|
|
11
|
+
*/
|
|
12
|
+
static hostSelector: string;
|
|
13
|
+
/**
|
|
14
|
+
* Gets a `HarnessPredicate` that can be used to search for a
|
|
15
|
+
* `SkyModalHarness` that meets certain criteria
|
|
16
|
+
*/
|
|
17
|
+
static with(filters: SkyModalHarnessFilters): HarnessPredicate<SkyModalHarness>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the aria-describedBy property of the modal
|
|
20
|
+
*/
|
|
21
|
+
getAriaDescribedBy(): Promise<string | null>;
|
|
22
|
+
/**
|
|
23
|
+
* Gets the aria-labelledBy property of the modal
|
|
24
|
+
*/
|
|
25
|
+
getAriaLabelledBy(): Promise<string | null>;
|
|
26
|
+
/**
|
|
27
|
+
* Gets the role of the modal.
|
|
28
|
+
*/
|
|
29
|
+
getAriaRole(): Promise<string | null>;
|
|
30
|
+
/**
|
|
31
|
+
* Gets the modal size.
|
|
32
|
+
*/
|
|
33
|
+
getSize(): Promise<string>;
|
|
34
|
+
/**
|
|
35
|
+
* Gets the wrapper class of the modal.
|
|
36
|
+
*/
|
|
37
|
+
getWrapperClass(): Promise<string | undefined>;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the modal is full page.
|
|
40
|
+
*/
|
|
41
|
+
isFullPage(): Promise<boolean>;
|
|
42
|
+
}
|
package/testing/public-api.d.ts
CHANGED
|
@@ -2,3 +2,5 @@ export * from './modal-fixture';
|
|
|
2
2
|
export * from './confirm/confirm-harness';
|
|
3
3
|
export * from './confirm/confirm-button-harness';
|
|
4
4
|
export * from './confirm/confirm-button-harness-filters';
|
|
5
|
+
export * from './modal/modal-harness';
|
|
6
|
+
export * from './modal/modal-harness-filters';
|