@sap_oss/wdio-qmate-service 3.9.0 → 3.10.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/lib/reuse/helper/tableHelper.js +3 -0
- package/lib/reuse/helper/tableHelper.js.map +1 -1
- package/lib/reuse/index.js +0 -17
- package/lib/reuse/index.js.map +1 -1
- package/lib/reuse/modules/flp/userSettings.d.ts +2 -0
- package/lib/reuse/modules/flp/userSettings.js +6 -1
- package/lib/reuse/modules/flp/userSettings.js.map +1 -1
- package/lib/reuse/modules/ui5/assertion.d.ts +1 -0
- package/lib/reuse/modules/ui5/assertion.js +11 -4
- package/lib/reuse/modules/ui5/assertion.js.map +1 -1
- package/lib/reuse/modules/ui5/element.d.ts +2 -2
- package/lib/reuse/modules/ui5/element.js +7 -4
- package/lib/reuse/modules/ui5/element.js.map +1 -1
- package/lib/reuse/modules/ui5/session.d.ts +4 -2
- package/lib/reuse/modules/ui5/session.js +32 -4
- package/lib/reuse/modules/ui5/session.js.map +1 -1
- package/lib/reuse/modules/ui5/table.js +25 -9
- package/lib/reuse/modules/ui5/table.js.map +1 -1
- package/lib/reuse/modules/ui5/userInteraction.d.ts +1 -1
- package/lib/reuse/modules/ui5/userInteraction.js +47 -58
- package/lib/reuse/modules/ui5/userInteraction.js.map +1 -1
- package/lib/reuse/modules/util/file.d.ts +5 -3
- package/lib/reuse/modules/util/file.js +33 -7
- package/lib/reuse/modules/util/file.js.map +1 -1
- package/package.json +18 -26
- package/reuseApi.json +8 -468
- package/test/helper/configurations/base.conf.js +6 -3
- package/test/helper/configurations/chrome.headless.conf.js +1 -1
- package/test/reuse/ui5/assertion/expectAttributeToBe.spec.js +74 -29
- package/test/reuse/ui5/assertion/expectAttributeToContain.spec.js +42 -0
- package/test/reuse/ui5/confirmationDialog/clickButton.spec.js +1 -1
- package/test/reuse/ui5/confirmationDialog/clickOk.spec.js +1 -1
- package/test/reuse/ui5/table/selectRowByValues.spec.js +6 -6
- package/test/reuse/ui5/userInteraction/click.spec.js +51 -13
- package/test/reuse/ui5/userInteraction/doubleClick.spec.js +1 -1
- package/test/reuse/util/file/pdfParser.spec.js +1 -2
- package/lib/reuse/modules/mobile/Mobile.d.ts +0 -16
- package/lib/reuse/modules/mobile/Mobile.js +0 -23
- package/lib/reuse/modules/mobile/Mobile.js.map +0 -1
- package/lib/reuse/modules/mobile/android.d.ts +0 -32
- package/lib/reuse/modules/mobile/android.js +0 -85
- package/lib/reuse/modules/mobile/android.js.map +0 -1
- package/lib/reuse/modules/mobile/device.d.ts +0 -173
- package/lib/reuse/modules/mobile/device.js +0 -403
- package/lib/reuse/modules/mobile/device.js.map +0 -1
- package/lib/reuse/modules/mobile/element.d.ts +0 -95
- package/lib/reuse/modules/mobile/element.js +0 -185
- package/lib/reuse/modules/mobile/element.js.map +0 -1
- package/lib/reuse/modules/mobile/gestures.d.ts +0 -42
- package/lib/reuse/modules/mobile/gestures.js +0 -86
- package/lib/reuse/modules/mobile/gestures.js.map +0 -1
- package/lib/reuse/modules/mobile/ios.d.ts +0 -10
- package/lib/reuse/modules/mobile/ios.js +0 -19
- package/lib/reuse/modules/mobile/ios.js.map +0 -1
- package/lib/reuse/modules/mobile/userInteraction.d.ts +0 -94
- package/lib/reuse/modules/mobile/userInteraction.js +0 -210
- package/lib/reuse/modules/mobile/userInteraction.js.map +0 -1
- package/test/helper/configurations/mobile.conf.js +0 -16
package/reuseApi.json
CHANGED
|
@@ -633,472 +633,6 @@
|
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
635
|
},
|
|
636
|
-
"mobile": {
|
|
637
|
-
"android": {
|
|
638
|
-
"pressKeyByName": {
|
|
639
|
-
"type": "async",
|
|
640
|
-
"description": "Simulate pressing a hardware key on the android device (e.g., back button, home button, etc.),",
|
|
641
|
-
"arguments": [
|
|
642
|
-
{
|
|
643
|
-
"name": "keyName",
|
|
644
|
-
"type": "string",
|
|
645
|
-
"default": null
|
|
646
|
-
}
|
|
647
|
-
],
|
|
648
|
-
"returnType": "promise"
|
|
649
|
-
},
|
|
650
|
-
"pressKeyByCode": {
|
|
651
|
-
"type": "async",
|
|
652
|
-
"description": "Simulate pressing a hardware key on the android device (e.g., back button, home button, etc.),",
|
|
653
|
-
"arguments": [
|
|
654
|
-
{
|
|
655
|
-
"name": "keyCode",
|
|
656
|
-
"type": "string",
|
|
657
|
-
"default": null
|
|
658
|
-
}
|
|
659
|
-
],
|
|
660
|
-
"returnType": "promise"
|
|
661
|
-
}
|
|
662
|
-
},
|
|
663
|
-
"device": {
|
|
664
|
-
"isAppInstalled": {
|
|
665
|
-
"type": "async",
|
|
666
|
-
"description": "Check if the application identified by its Package name/Bundle ID is installed on the device.",
|
|
667
|
-
"arguments": [
|
|
668
|
-
{
|
|
669
|
-
"name": "appPackageOrBundleId",
|
|
670
|
-
"type": "string",
|
|
671
|
-
"default": null
|
|
672
|
-
}
|
|
673
|
-
],
|
|
674
|
-
"returnType": "boolean"
|
|
675
|
-
},
|
|
676
|
-
"installApp": {
|
|
677
|
-
"type": "async",
|
|
678
|
-
"description": "Install the appropriate app based on the platform the test is being executed on.",
|
|
679
|
-
"arguments": [
|
|
680
|
-
{
|
|
681
|
-
"name": "appPath",
|
|
682
|
-
"type": "string",
|
|
683
|
-
"default": null
|
|
684
|
-
}
|
|
685
|
-
],
|
|
686
|
-
"returnType": "promise"
|
|
687
|
-
},
|
|
688
|
-
"switchToContext": {
|
|
689
|
-
"type": "async",
|
|
690
|
-
"description": "Switch to the specified( WEBVIEW | NATIVE_APP ) context if available.",
|
|
691
|
-
"arguments": [
|
|
692
|
-
{
|
|
693
|
-
"name": "targetContext",
|
|
694
|
-
"type": "string",
|
|
695
|
-
"default": "'WEBVIEW'"
|
|
696
|
-
},
|
|
697
|
-
{
|
|
698
|
-
"name": "timeout",
|
|
699
|
-
"type": "number",
|
|
700
|
-
"default": 5000
|
|
701
|
-
}
|
|
702
|
-
],
|
|
703
|
-
"returnType": "promise"
|
|
704
|
-
},
|
|
705
|
-
"getTargetContextIfAvailable": {
|
|
706
|
-
"type": "async",
|
|
707
|
-
"description": "Returns the specified target context if available within a given timeout.\n\nThis method retrieves the list of available contexts and determines if a context\nthat matches the `targetContext` string is present. If the target context is found,\nit returns the context name; otherwise, it returns `null`.",
|
|
708
|
-
"arguments": [
|
|
709
|
-
{
|
|
710
|
-
"name": "targetContext",
|
|
711
|
-
"type": "string",
|
|
712
|
-
"default": "'WEBVIEW'"
|
|
713
|
-
},
|
|
714
|
-
{
|
|
715
|
-
"name": "timeout",
|
|
716
|
-
"type": "number",
|
|
717
|
-
"default": 5000
|
|
718
|
-
}
|
|
719
|
-
],
|
|
720
|
-
"returnType": "promise"
|
|
721
|
-
},
|
|
722
|
-
"closeApplication": {
|
|
723
|
-
"type": "async",
|
|
724
|
-
"description": "Close the currently active mobile application.",
|
|
725
|
-
"arguments": [],
|
|
726
|
-
"returnType": "promise"
|
|
727
|
-
},
|
|
728
|
-
"queryAppState": {
|
|
729
|
-
"type": "async",
|
|
730
|
-
"description": "Queries the state of the application (e.g., running, background, not installed) on the mobile device(Android or iOS).",
|
|
731
|
-
"arguments": [
|
|
732
|
-
{
|
|
733
|
-
"name": "appPackageOrBundleId",
|
|
734
|
-
"type": "string",
|
|
735
|
-
"default": null
|
|
736
|
-
}
|
|
737
|
-
],
|
|
738
|
-
"returnType": "promise"
|
|
739
|
-
},
|
|
740
|
-
"launchApp": {
|
|
741
|
-
"type": "async",
|
|
742
|
-
"description": "Launches the app for both iOS and Android with a parameterized app identifier.",
|
|
743
|
-
"arguments": [
|
|
744
|
-
{
|
|
745
|
-
"name": "appPackageOrBundleId",
|
|
746
|
-
"type": "string",
|
|
747
|
-
"default": null
|
|
748
|
-
}
|
|
749
|
-
],
|
|
750
|
-
"returnType": "promise"
|
|
751
|
-
},
|
|
752
|
-
"switchToLandscapeOrientation": {
|
|
753
|
-
"type": "async",
|
|
754
|
-
"description": "Switches the device orientation to landscape mode.",
|
|
755
|
-
"arguments": [],
|
|
756
|
-
"returnType": "promise"
|
|
757
|
-
},
|
|
758
|
-
"switchToPortraitOrientation": {
|
|
759
|
-
"type": "async",
|
|
760
|
-
"description": "Switches the device orientation to portrait mode.",
|
|
761
|
-
"arguments": [],
|
|
762
|
-
"returnType": "promise"
|
|
763
|
-
},
|
|
764
|
-
"getCurrentOrientation": {
|
|
765
|
-
"type": "async",
|
|
766
|
-
"description": "Returns the device current orientation (PORTRAIT or LANDSCAPE)",
|
|
767
|
-
"arguments": [],
|
|
768
|
-
"returnType": "promise"
|
|
769
|
-
},
|
|
770
|
-
"hideKeyboard": {
|
|
771
|
-
"type": "async",
|
|
772
|
-
"description": "Hides the keyboard on both Android and iOS using specific strategies with timeout.",
|
|
773
|
-
"arguments": [
|
|
774
|
-
{
|
|
775
|
-
"name": "strategy",
|
|
776
|
-
"type": "string",
|
|
777
|
-
"default": null
|
|
778
|
-
},
|
|
779
|
-
{
|
|
780
|
-
"name": "key",
|
|
781
|
-
"type": "string",
|
|
782
|
-
"default": null
|
|
783
|
-
},
|
|
784
|
-
{
|
|
785
|
-
"name": "keyCode",
|
|
786
|
-
"type": "number",
|
|
787
|
-
"default": null
|
|
788
|
-
},
|
|
789
|
-
{
|
|
790
|
-
"name": "timeout",
|
|
791
|
-
"type": "number",
|
|
792
|
-
"default": 5000
|
|
793
|
-
}
|
|
794
|
-
],
|
|
795
|
-
"returnType": "promise"
|
|
796
|
-
},
|
|
797
|
-
"isKeyboardVisible": {
|
|
798
|
-
"type": "async",
|
|
799
|
-
"description": "Checks if the keyboard is visible or not on the mobile device.",
|
|
800
|
-
"arguments": [],
|
|
801
|
-
"returnType": "promise"
|
|
802
|
-
},
|
|
803
|
-
"isPlatformSupported": {
|
|
804
|
-
"type": "async",
|
|
805
|
-
"description": "Determine if the current platform is supported, if the current device platform is either `Android` or `iOS`.",
|
|
806
|
-
"arguments": [],
|
|
807
|
-
"returnType": "promise"
|
|
808
|
-
}
|
|
809
|
-
},
|
|
810
|
-
"element": {
|
|
811
|
-
"isVisible": {
|
|
812
|
-
"type": "async",
|
|
813
|
-
"description": "Returns a boolean if the mobile element is visible to the user.",
|
|
814
|
-
"arguments": [
|
|
815
|
-
{
|
|
816
|
-
"name": "element",
|
|
817
|
-
"type": "element",
|
|
818
|
-
"default": null
|
|
819
|
-
},
|
|
820
|
-
{
|
|
821
|
-
"name": "strict",
|
|
822
|
-
"type": "boolean",
|
|
823
|
-
"default": true
|
|
824
|
-
}
|
|
825
|
-
],
|
|
826
|
-
"returnType": "boolean"
|
|
827
|
-
},
|
|
828
|
-
"isPresent": {
|
|
829
|
-
"type": "async",
|
|
830
|
-
"description": "Returns a boolean if the element is present at the DOM or not. It might be hidden.",
|
|
831
|
-
"arguments": [
|
|
832
|
-
{
|
|
833
|
-
"name": "element",
|
|
834
|
-
"type": "element",
|
|
835
|
-
"default": null
|
|
836
|
-
}
|
|
837
|
-
],
|
|
838
|
-
"returnType": "boolean"
|
|
839
|
-
},
|
|
840
|
-
"waitToBePresent": {
|
|
841
|
-
"type": "async",
|
|
842
|
-
"description": "Waits until the element with the given selector is present.",
|
|
843
|
-
"arguments": [
|
|
844
|
-
{
|
|
845
|
-
"name": "selector",
|
|
846
|
-
"type": "object",
|
|
847
|
-
"default": null
|
|
848
|
-
},
|
|
849
|
-
{
|
|
850
|
-
"name": "timeout",
|
|
851
|
-
"type": "number",
|
|
852
|
-
"default": 30000
|
|
853
|
-
}
|
|
854
|
-
],
|
|
855
|
-
"returnType": "boolean"
|
|
856
|
-
},
|
|
857
|
-
"waitToBeVisible": {
|
|
858
|
-
"type": "async",
|
|
859
|
-
"description": "Waits until the element with the given selector is visible.",
|
|
860
|
-
"arguments": [
|
|
861
|
-
{
|
|
862
|
-
"name": "selector",
|
|
863
|
-
"type": "object",
|
|
864
|
-
"default": null
|
|
865
|
-
},
|
|
866
|
-
{
|
|
867
|
-
"name": "timeout",
|
|
868
|
-
"type": "number",
|
|
869
|
-
"default": 30000
|
|
870
|
-
}
|
|
871
|
-
],
|
|
872
|
-
"returnType": "boolean"
|
|
873
|
-
},
|
|
874
|
-
"waitToBeClickable": {
|
|
875
|
-
"type": "async",
|
|
876
|
-
"description": "Waits until the element with the given selector is clickable.",
|
|
877
|
-
"arguments": [
|
|
878
|
-
{
|
|
879
|
-
"name": "selector",
|
|
880
|
-
"type": "object",
|
|
881
|
-
"default": null
|
|
882
|
-
},
|
|
883
|
-
{
|
|
884
|
-
"name": "timeout",
|
|
885
|
-
"type": "number",
|
|
886
|
-
"default": 30000
|
|
887
|
-
}
|
|
888
|
-
],
|
|
889
|
-
"returnType": "boolean"
|
|
890
|
-
},
|
|
891
|
-
"isSelected": {
|
|
892
|
-
"type": "async",
|
|
893
|
-
"description": "Returns a boolean if the element (e.g. checkbox) is selected.",
|
|
894
|
-
"arguments": [
|
|
895
|
-
{
|
|
896
|
-
"name": "elementOrSelector",
|
|
897
|
-
"type": "string",
|
|
898
|
-
"default": null
|
|
899
|
-
}
|
|
900
|
-
],
|
|
901
|
-
"returnType": "boolean"
|
|
902
|
-
},
|
|
903
|
-
"waitToBeEnabled": {
|
|
904
|
-
"type": "async",
|
|
905
|
-
"description": "Waits until the element with the given selector is present.",
|
|
906
|
-
"arguments": [
|
|
907
|
-
{
|
|
908
|
-
"name": "selector",
|
|
909
|
-
"type": "object",
|
|
910
|
-
"default": null
|
|
911
|
-
},
|
|
912
|
-
{
|
|
913
|
-
"name": "timeout",
|
|
914
|
-
"type": "number",
|
|
915
|
-
"default": 30000
|
|
916
|
-
}
|
|
917
|
-
],
|
|
918
|
-
"returnType": "boolean"
|
|
919
|
-
}
|
|
920
|
-
},
|
|
921
|
-
"gestures": {
|
|
922
|
-
"swipe": {
|
|
923
|
-
"type": "async",
|
|
924
|
-
"description": "Swipe from one point to another on the screen,\nEnsure that the provided coordinates are within the bounds of the screen to avoid unexpected behavior.",
|
|
925
|
-
"arguments": [
|
|
926
|
-
{
|
|
927
|
-
"name": "startX",
|
|
928
|
-
"type": "number",
|
|
929
|
-
"default": null
|
|
930
|
-
},
|
|
931
|
-
{
|
|
932
|
-
"name": "startY",
|
|
933
|
-
"type": "number",
|
|
934
|
-
"default": null
|
|
935
|
-
},
|
|
936
|
-
{
|
|
937
|
-
"name": "endX",
|
|
938
|
-
"type": "number",
|
|
939
|
-
"default": null
|
|
940
|
-
},
|
|
941
|
-
{
|
|
942
|
-
"name": "endY",
|
|
943
|
-
"type": "number",
|
|
944
|
-
"default": null
|
|
945
|
-
},
|
|
946
|
-
{
|
|
947
|
-
"name": "duration",
|
|
948
|
-
"type": "number",
|
|
949
|
-
"default": 1000
|
|
950
|
-
}
|
|
951
|
-
],
|
|
952
|
-
"returnType": "promise"
|
|
953
|
-
},
|
|
954
|
-
"tap": {
|
|
955
|
-
"type": "async",
|
|
956
|
-
"description": "Executes a tap at the given screen coordinates,\nEnsure that the provided coordinates are within the bounds of the screen to avoid unexpected behavior.",
|
|
957
|
-
"arguments": [
|
|
958
|
-
{
|
|
959
|
-
"name": "coordX",
|
|
960
|
-
"type": "number",
|
|
961
|
-
"default": null
|
|
962
|
-
},
|
|
963
|
-
{
|
|
964
|
-
"name": "coordY",
|
|
965
|
-
"type": "number",
|
|
966
|
-
"default": null
|
|
967
|
-
}
|
|
968
|
-
],
|
|
969
|
-
"returnType": "promise"
|
|
970
|
-
}
|
|
971
|
-
},
|
|
972
|
-
"ios": {},
|
|
973
|
-
"userInteraction": {
|
|
974
|
-
"tap": {
|
|
975
|
-
"type": "async",
|
|
976
|
-
"description": "Tap's on the mobile element.",
|
|
977
|
-
"arguments": [
|
|
978
|
-
{
|
|
979
|
-
"name": "elementOrSelector",
|
|
980
|
-
"type": "string",
|
|
981
|
-
"default": null
|
|
982
|
-
},
|
|
983
|
-
{
|
|
984
|
-
"name": "timeout",
|
|
985
|
-
"type": "number",
|
|
986
|
-
"default": 30000
|
|
987
|
-
}
|
|
988
|
-
]
|
|
989
|
-
},
|
|
990
|
-
"check": {
|
|
991
|
-
"type": "async",
|
|
992
|
-
"description": "Checks the given checkbox.",
|
|
993
|
-
"arguments": [
|
|
994
|
-
{
|
|
995
|
-
"name": "elementOrSelector",
|
|
996
|
-
"type": "string",
|
|
997
|
-
"default": null
|
|
998
|
-
},
|
|
999
|
-
{
|
|
1000
|
-
"name": "timeout",
|
|
1001
|
-
"type": "number",
|
|
1002
|
-
"default": 30000
|
|
1003
|
-
}
|
|
1004
|
-
]
|
|
1005
|
-
},
|
|
1006
|
-
"uncheck": {
|
|
1007
|
-
"type": "async",
|
|
1008
|
-
"description": "Unchecks the given checkbox.",
|
|
1009
|
-
"arguments": [
|
|
1010
|
-
{
|
|
1011
|
-
"name": "elementOrSelector",
|
|
1012
|
-
"type": "string",
|
|
1013
|
-
"default": null
|
|
1014
|
-
},
|
|
1015
|
-
{
|
|
1016
|
-
"name": "timeout",
|
|
1017
|
-
"type": "number",
|
|
1018
|
-
"default": 30000
|
|
1019
|
-
}
|
|
1020
|
-
]
|
|
1021
|
-
},
|
|
1022
|
-
"doubleTap": {
|
|
1023
|
-
"type": "async",
|
|
1024
|
-
"description": "Double Tap's on the mobile element.",
|
|
1025
|
-
"arguments": [
|
|
1026
|
-
{
|
|
1027
|
-
"name": "elementOrSelector",
|
|
1028
|
-
"type": "string",
|
|
1029
|
-
"default": null
|
|
1030
|
-
},
|
|
1031
|
-
{
|
|
1032
|
-
"name": "timeout",
|
|
1033
|
-
"type": "number",
|
|
1034
|
-
"default": 30000
|
|
1035
|
-
}
|
|
1036
|
-
],
|
|
1037
|
-
"returnType": "promise"
|
|
1038
|
-
},
|
|
1039
|
-
"fill": {
|
|
1040
|
-
"type": "async",
|
|
1041
|
-
"description": "Enter a string value into a mobile input field.",
|
|
1042
|
-
"arguments": [
|
|
1043
|
-
{
|
|
1044
|
-
"name": "elementOrSelector",
|
|
1045
|
-
"type": "string",
|
|
1046
|
-
"default": null
|
|
1047
|
-
},
|
|
1048
|
-
{
|
|
1049
|
-
"name": "value",
|
|
1050
|
-
"type": "string",
|
|
1051
|
-
"default": null
|
|
1052
|
-
},
|
|
1053
|
-
{
|
|
1054
|
-
"name": "timeout",
|
|
1055
|
-
"type": "number",
|
|
1056
|
-
"default": 30000
|
|
1057
|
-
}
|
|
1058
|
-
],
|
|
1059
|
-
"returnType": "promise"
|
|
1060
|
-
},
|
|
1061
|
-
"clearAndFill": {
|
|
1062
|
-
"type": "async",
|
|
1063
|
-
"description": "Enter a string into the mobile input field; it will clear the box before submission.",
|
|
1064
|
-
"arguments": [
|
|
1065
|
-
{
|
|
1066
|
-
"name": "elementOrSelector",
|
|
1067
|
-
"type": "string",
|
|
1068
|
-
"default": null
|
|
1069
|
-
},
|
|
1070
|
-
{
|
|
1071
|
-
"name": "value",
|
|
1072
|
-
"type": "string",
|
|
1073
|
-
"default": null
|
|
1074
|
-
},
|
|
1075
|
-
{
|
|
1076
|
-
"name": "timeout",
|
|
1077
|
-
"type": "number",
|
|
1078
|
-
"default": 30000
|
|
1079
|
-
}
|
|
1080
|
-
],
|
|
1081
|
-
"returnType": "promise"
|
|
1082
|
-
},
|
|
1083
|
-
"clear": {
|
|
1084
|
-
"type": "async",
|
|
1085
|
-
"description": "Clear a string value into a mobile input field.",
|
|
1086
|
-
"arguments": [
|
|
1087
|
-
{
|
|
1088
|
-
"name": "elementOrSelector",
|
|
1089
|
-
"type": "string",
|
|
1090
|
-
"default": null
|
|
1091
|
-
},
|
|
1092
|
-
{
|
|
1093
|
-
"name": "timeout",
|
|
1094
|
-
"type": "number",
|
|
1095
|
-
"default": 30000
|
|
1096
|
-
}
|
|
1097
|
-
],
|
|
1098
|
-
"returnType": "promise"
|
|
1099
|
-
}
|
|
1100
|
-
}
|
|
1101
|
-
},
|
|
1102
636
|
"nonUi5": {
|
|
1103
637
|
"assertion": {
|
|
1104
638
|
"expectAttributeToBe": {
|
|
@@ -4467,8 +4001,14 @@
|
|
|
4467
4001
|
},
|
|
4468
4002
|
"expectLogoutText": {
|
|
4469
4003
|
"type": "async",
|
|
4470
|
-
"description": "Expects the logout text after logout
|
|
4471
|
-
"arguments": [
|
|
4004
|
+
"description": "Expects the logout text after logout. Waits for \"You have been logged off.\" in S4 systems or \"Goodbye\" in BTP systems.\nThis is essential for chaining scripts, so that no static browser sleep in the spec itself is required anymore.",
|
|
4005
|
+
"arguments": [
|
|
4006
|
+
{
|
|
4007
|
+
"name": "timeout",
|
|
4008
|
+
"type": "number",
|
|
4009
|
+
"default": 30000
|
|
4010
|
+
}
|
|
4011
|
+
]
|
|
4472
4012
|
}
|
|
4473
4013
|
},
|
|
4474
4014
|
"table": {
|
|
@@ -3,11 +3,14 @@ const WdioQmateService = require("../../../lib/index.js");
|
|
|
3
3
|
const chromedriverPath = require("chromedriver").path;
|
|
4
4
|
const fs = require("fs");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// WDIO 8 reads CHROMEDRIVER_PATH (see @wdio/utils startWebDriver.js / manager.js).
|
|
7
|
+
// Setting it short-circuits WDIO's runtime download to /tmp/chromedriver/... and
|
|
8
|
+
// spawns the binary installed by the npm `chromedriver` package's postinstall.
|
|
9
|
+
if (!process.env.CHROMEDRIVER_PATH || !fs.existsSync(process.env.CHROMEDRIVER_PATH)) {
|
|
7
10
|
if (fs.existsSync(chromedriverPath)) {
|
|
8
|
-
process.env.
|
|
11
|
+
process.env.CHROMEDRIVER_PATH = chromedriverPath;
|
|
9
12
|
} else {
|
|
10
|
-
console.error("Path to chromedriver bin is wrong." + process.env.
|
|
13
|
+
console.error("Path to chromedriver bin is wrong." + (process.env.CHROMEDRIVER_PATH || chromedriverPath));
|
|
11
14
|
process.exit(1);
|
|
12
15
|
}
|
|
13
16
|
}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
let selector;
|
|
3
2
|
|
|
4
3
|
describe("assertion - expectAttributeToBe: title to be 'Laptops' (string)", function () {
|
|
4
|
+
const selector = {
|
|
5
|
+
elementProperties: {
|
|
6
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
7
|
+
metadata: "sap.m.StandardListItem",
|
|
8
|
+
bindingContextPath: "/ProductCategories*'LT')"
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
5
12
|
it("Preparation", async function () {
|
|
6
13
|
await browser.url("#/categories");
|
|
7
14
|
});
|
|
8
15
|
|
|
9
16
|
it("Execution", async function () {
|
|
10
|
-
selector = {
|
|
11
|
-
elementProperties: {
|
|
12
|
-
viewName: "sap.ui.demo.cart.view.Home",
|
|
13
|
-
metadata: "sap.m.StandardListItem",
|
|
14
|
-
bindingContextPath: "/ProductCategories*'LT')"
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
it("Verification", async function () {
|
|
@@ -23,18 +23,19 @@ describe("assertion - expectAttributeToBe: title to be 'Laptops' (string)", func
|
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
describe("assertion - expectAttributeToBe wrong/null/undefined", function () {
|
|
26
|
+
const selector = {
|
|
27
|
+
elementProperties: {
|
|
28
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
29
|
+
metadata: "sap.m.StandardListItem",
|
|
30
|
+
bindingContextPath: "/ProductCategories*'LT')"
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
26
34
|
it("Preparation", async function () {
|
|
27
35
|
await browser.url("#/categories");
|
|
28
36
|
});
|
|
29
37
|
|
|
30
38
|
it("Execution", async function () {
|
|
31
|
-
selector = {
|
|
32
|
-
elementProperties: {
|
|
33
|
-
viewName: "sap.ui.demo.cart.view.Home",
|
|
34
|
-
metadata: "sap.m.StandardListItem",
|
|
35
|
-
bindingContextPath: "/ProductCategories*'LT')"
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
39
|
});
|
|
39
40
|
|
|
40
41
|
it("Verification", async function () {
|
|
@@ -51,18 +52,19 @@ describe("assertion - expectAttributeToBe wrong/null/undefined", function () {
|
|
|
51
52
|
});
|
|
52
53
|
|
|
53
54
|
describe("assertion - expectAttributeToBe: 'visible' of the listItem to be true (boolean and as string)", function () {
|
|
55
|
+
const selector = {
|
|
56
|
+
elementProperties: {
|
|
57
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
58
|
+
metadata: "sap.m.StandardListItem",
|
|
59
|
+
bindingContextPath: "/ProductCategories*'LT')"
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
|
|
54
63
|
it("Preparation", async function () {
|
|
55
64
|
await browser.url("#/categories");
|
|
56
65
|
});
|
|
57
66
|
|
|
58
67
|
it("Execution", async function () {
|
|
59
|
-
selector = {
|
|
60
|
-
elementProperties: {
|
|
61
|
-
viewName: "sap.ui.demo.cart.view.Home",
|
|
62
|
-
metadata: "sap.m.StandardListItem",
|
|
63
|
-
bindingContextPath: "/ProductCategories*'LT')"
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
68
|
});
|
|
67
69
|
|
|
68
70
|
it("Verification", async function () {
|
|
@@ -73,18 +75,19 @@ describe("assertion - expectAttributeToBe: 'visible' of the listItem to be true
|
|
|
73
75
|
});
|
|
74
76
|
|
|
75
77
|
describe("assertion - expectAttributeToBe: 'busyIndicatorDelay' of the listItem to be 1000 (number and as string)", function () {
|
|
78
|
+
const selector = {
|
|
79
|
+
elementProperties: {
|
|
80
|
+
viewName: "sap.ui.demo.cart.view.Home",
|
|
81
|
+
metadata: "sap.m.StandardListItem",
|
|
82
|
+
bindingContextPath: "/ProductCategories*'LT')"
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
|
|
76
86
|
it("Preparation", async function () {
|
|
77
87
|
await browser.url("#/categories");
|
|
78
88
|
});
|
|
79
89
|
|
|
80
90
|
it("Execution", async function () {
|
|
81
|
-
selector = {
|
|
82
|
-
elementProperties: {
|
|
83
|
-
viewName: "sap.ui.demo.cart.view.Home",
|
|
84
|
-
metadata: "sap.m.StandardListItem",
|
|
85
|
-
bindingContextPath: "/ProductCategories*'LT')"
|
|
86
|
-
}
|
|
87
|
-
};
|
|
88
91
|
});
|
|
89
92
|
it("Verification", async function () {
|
|
90
93
|
await ui5.assertion.expectAttributeToBe(selector, "busyIndicatorDelay", 1000);
|
|
@@ -93,4 +96,46 @@ describe("assertion - expectAttributeToBe: 'busyIndicatorDelay' of the listItem
|
|
|
93
96
|
});
|
|
94
97
|
});
|
|
95
98
|
|
|
99
|
+
describe("assertion - expectAttributeToBe: 'text' is a text with special spaces characters", function () {
|
|
100
|
+
const specialSpacesString = "-\u00A0-\u2002-\u2003-\u2007-\u2009-\u202F-";
|
|
101
|
+
const normalizedString = "- - - - - - -";
|
|
102
|
+
const selector = {
|
|
103
|
+
elementProperties: {
|
|
104
|
+
metadata: "sap.m.Title",
|
|
105
|
+
id: "container-cart---homeView--page-title"
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
it("Preparation", async function () {
|
|
110
|
+
await browser.url("#/categories");
|
|
111
|
+
await browser.uiControls(selector);
|
|
112
|
+
await browser.execute(`sap.ui.getCore().byId("${selector.elementProperties.id}").setText("${specialSpacesString}")`);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
it("Execution && Verification", async function () {
|
|
116
|
+
await ui5.assertion.expectAttributeToBe(selector, "text", normalizedString);
|
|
117
|
+
});
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
describe("assertion - expectAttributeToBe: 'text' is a text with invisible characters", function () {
|
|
121
|
+
const invisibleCharacters = "-\u200B-\u200C-\u200D-\uFEFF-";
|
|
122
|
+
const normalizedString = "-----";
|
|
123
|
+
const selector = {
|
|
124
|
+
elementProperties: {
|
|
125
|
+
metadata: "sap.m.Title",
|
|
126
|
+
id: "container-cart---homeView--page-title"
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
it("Preparation", async function () {
|
|
131
|
+
await browser.url("#/categories");
|
|
132
|
+
await browser.uiControls(selector);
|
|
133
|
+
await browser.execute(`sap.ui.getCore().byId("${selector.elementProperties.id}").setText("${invisibleCharacters}")`);
|
|
134
|
+
});
|
|
135
|
+
|
|
136
|
+
it("Execution && Verification", async function () {
|
|
137
|
+
await ui5.assertion.expectAttributeToBe(selector, "text", normalizedString);
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
|
|
96
141
|
// TODO: add check for 'enabled' parameter
|