diff --git a/apps/teams-test-app/e2e-test-data/app.json b/apps/teams-test-app/e2e-test-data/app.json index 86d1fcaf3e..c32c6e8e09 100644 --- a/apps/teams-test-app/e2e-test-data/app.json +++ b/apps/teams-test-app/e2e-test-data/app.json @@ -1,12 +1,12 @@ { "name": "App", - "platforms": "*", + "platforms": ["*"], "testCases": [ { "title": "openLink API Call - Success", "type": "callResponse", "boxSelector": "#box_executeDeepLink2", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "inputValue": "https://bing.com", "expectedWindowOpenTarget": "https://bing.com" }, @@ -14,7 +14,7 @@ "title": "openLink startCall API Call - Success", "type": "callResponse", "boxSelector": "#box_executeDeepLink2", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "inputValue": "https://teams.microsoft.com/l/call/0/0?users=testUser1,testUser2&withVideo=true&source=test", "expectedAlertValue": "startCall called with {\"targets\":[\"testUser1\",\"testUser2\"],\"requestedModalities\":[\"audio\",\"video\"],\"source\":\"test\"}", "expectedTestAppValue": "Completed" @@ -23,7 +23,7 @@ "title": "openLink openAppInstallDialog API Call - Success", "type": "callResponse", "boxSelector": "#box_executeDeepLink2", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "inputValue": "https://teams.microsoft.com/l/app/testAppId", "expectedAlertValue": "openAppInstallDialog called with {\"appId\":\"testAppId\"}", "expectedTestAppValue": "Completed" @@ -66,10 +66,11 @@ "title": "openLink stageView.open API Call with thread id - Success", "type": "callResponse", "boxSelector": "#box_executeDeepLink2", + "platformsExcluded": ["iOS","Android"], "hostSdkVersion": { "web": "<4.0.1" }, - "platformsExcluded": ["iOS"], + "inputValue": "https://teams.microsoft.com/l/stage/testAppId/0?context=%7B%22contentUrl%22%3A%22testContentUrl%22%2C%22websiteUrl%22%3A%22testWebsiteUrl%22%2C%22title%22%3A%22TestTitle%22%2C%22threadId%22%3A%22TestThreadId%22%7D", "expectedAlertValue": "stageView.open called with {\"appId\":\"testAppId\",\"contentUrl\":\"testContentUrl\",\"threadId\":\"TestThreadId\",\"title\":\"TestTitle\",\"websiteUrl\":\"testWebsiteUrl\"}", "expectedTestAppValue": "Completed" @@ -78,10 +79,10 @@ "title": "openLink stageView.open API Call without thread id - Success", "type": "callResponse", "boxSelector": "#box_executeDeepLink2", + "platformsExcluded": ["iOS","Android"], "hostSdkVersion": { "web": "<4.0.1" }, - "platformsExcluded": ["iOS"], "inputValue": "https://teams.microsoft.com/l/stage/testAppId/0?context=%7B%22contentUrl%22%3A%22testContentUrl%22%2C%22websiteUrl%22%3A%22testWebsiteUrl%22%2C%22title%22%3A%22TestTitle%22%7D", "expectedAlertValue": "stageView.open called with {\"appId\":\"testAppId\",\"contentUrl\":\"testContentUrl\",\"title\":\"TestTitle\",\"websiteUrl\":\"testWebsiteUrl\"}", "expectedTestAppValue": "Completed" @@ -89,6 +90,7 @@ { "title": "openLink appLink domain doesn't match API Call - executeDeepLink called", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_executeDeepLink2", "inputValue": "https://contoso.com/l/entity/testAppId/tasklist123", "expectedWindowOpenTarget": "https://contoso.com/l/entity/testAppId/tasklist123", diff --git a/apps/teams-test-app/e2e-test-data/authentication.json b/apps/teams-test-app/e2e-test-data/authentication.json index a02a11b651..c316b606e5 100644 --- a/apps/teams-test-app/e2e-test-data/authentication.json +++ b/apps/teams-test-app/e2e-test-data/authentication.json @@ -14,7 +14,7 @@ "title": "getUser API Call - Success", "version": "2.0.0-beta.2", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getUser", "expectedTestAppValue": "Success: {\"oid\":\"mockoid\",\"tid\":\"mocktid\",\"upn\":\"mockupn\",\"loginHint\":\"mockLoginHint\",\"displayName\":\"mockName\",\"dataResidency\":\"public\"}" }, @@ -25,7 +25,7 @@ "web": "<=3.0.2" }, "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getUser", "testUrlParams": [["appDefOverrides", "{\"isFullTrustApp\": false}"]], "expectedTestAppValue": "Error: Error: Error returned, code = 500, message = App does not have the required permissions for this operation" @@ -37,7 +37,7 @@ "web": ">3.0.2" }, "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getUser", "testUrlParams": [["appDefOverrides", "{\"isFullTrustApp\": false, \"isMicrosoftOwned\": false}"]], "expectedTestAppValue": "Error: Error: Error returned, code = 500, message = App does not have the required permissions for this operation" @@ -49,7 +49,7 @@ "web": ">3.0.2" }, "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getUser", "testUrlParams": [["appDefOverrides", "{\"isFullTrustApp\": true, \"isMicrosoftOwned\": false}"]], "expectedTestAppValue": "{\"oid\":\"mockoid\",\"tid\":\"mocktid\",\"upn\":\"mockupn\",\"loginHint\":\"mockLoginHint\",\"displayName\":\"mockName\",\"dataResidency\":\"public\"}" @@ -61,7 +61,7 @@ "web": ">3.0.2" }, "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getUser", "testUrlParams": [["appDefOverrides", "{\"isFullTrustApp\": true, \"isMicrosoftOwned\": true}"]], "expectedTestAppValue": "{\"oid\":\"mockoid\",\"tid\":\"mocktid\",\"upn\":\"mockupn\",\"loginHint\":\"mockLoginHint\",\"displayName\":\"mockName\",\"dataResidency\":\"public\"}" diff --git a/apps/teams-test-app/e2e-test-data/chat.json b/apps/teams-test-app/e2e-test-data/chat.json index b1e073099b..c54f9b76aa 100644 --- a/apps/teams-test-app/e2e-test-data/chat.json +++ b/apps/teams-test-app/e2e-test-data/chat.json @@ -9,6 +9,7 @@ { "title": "openChat API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.0.0-beta.3 && <=2.17.0", "boxSelector": "#box_openChat", "inputValue": { @@ -46,6 +47,7 @@ "title": "openChat2 API Call - Success", "type": "callResponse", "version": ">2.2.0 && <=2.17.0", + "platformsExcluded": ["Android"], "boxSelector": "#box_openChat2", "inputValue": { "user": ["testUpn"], diff --git a/apps/teams-test-app/e2e-test-data/conversation.json b/apps/teams-test-app/e2e-test-data/conversation.json index 295018fef3..be31381229 100644 --- a/apps/teams-test-app/e2e-test-data/conversation.json +++ b/apps/teams-test-app/e2e-test-data/conversation.json @@ -23,7 +23,7 @@ "title": "getChatMembers API Call - Success", "type": "callResponse", "version": ">2.0.0-beta.3", - "platformsExcluded": ["Web"], + "platformsExcluded": ["Web","Android"], "boxSelector": "#box_getChatMembers", "expectedAlertValue": "getChatMembers called", "expectedTestAppValue": "{\"members\":[{\"principalName\":\"TestUser\"}]}" @@ -54,7 +54,7 @@ { "title": "openConversation API Call - with startConversation", "version": "2.0.0-beta.2", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_openConversation", "type": "registerAndRaiseEvent", "inputValue": { @@ -100,7 +100,7 @@ { "title": "openConversation API Call - with closeConversation", "version": "2.0.0-beta.2", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_openConversation", "type": "registerAndRaiseEvent", "inputValue": { diff --git a/apps/teams-test-app/e2e-test-data/dialog.json b/apps/teams-test-app/e2e-test-data/dialog.json index 2832c2bda0..75f4672a91 100644 --- a/apps/teams-test-app/e2e-test-data/dialog.json +++ b/apps/teams-test-app/e2e-test-data/dialog.json @@ -1,6 +1,6 @@ { "name": "Dialog", - "platforms": "Web", + "platforms": ["Web","Android"], "checkIsSupported": { "domElementName": "checkCapabilityDialog" }, @@ -8,6 +8,7 @@ { "title": "dialogResize API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "testUrlParams": [["frameContext", "task"]], "boxSelector": "#box_dialogResize", "inputValue": { @@ -19,6 +20,7 @@ { "title": "dialogSubmit API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "testUrlParams": [["frameContext", "task"]], "boxSelector": "#box_dialogSubmitWithInput", "inputValue": { diff --git a/apps/teams-test-app/e2e-test-data/files.json b/apps/teams-test-app/e2e-test-data/files.json index a822df952a..3da140a834 100644 --- a/apps/teams-test-app/e2e-test-data/files.json +++ b/apps/teams-test-app/e2e-test-data/files.json @@ -28,6 +28,7 @@ { "title": "openFilePreview API Call - Success", "type": "callResponse", + "platformsExcluded":["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_openFilePreview", "inputValue": { @@ -59,7 +60,7 @@ { "title": "getCloudStorageFolders API Call - Failure (Not Full Trust)", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": ">2.0.0-beta.5", "boxSelector": "#box_getCloudStorageFolders2", "inputValue": "testChannelId", @@ -69,6 +70,7 @@ { "title": "getCloudStorageFolders API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_getCloudStorageFolders", "inputValue": "testChannelId", @@ -87,6 +89,7 @@ { "title": "addCloudStorageFolder API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_addCloudStorageFolder", "inputValue": "testChannelId", @@ -115,7 +118,7 @@ "title": "copyMoveFiles API Call - Success", "version": ">2.0.0-beta.2", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_copyMoveFiles", "inputValue": { "selectedFiles": [ @@ -147,7 +150,7 @@ { "title": "openCloudStorageFile API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_openCloudStorageFile", "inputValue": { "file": { @@ -166,7 +169,7 @@ { "title": "getExternalProviders API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": ">2.0.0", "boxSelector": "#box_getExternalProviders", "checkboxState": true, @@ -176,7 +179,7 @@ { "title": "getCloudStorageFolderContents API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": ">2.0.0-beta.2", "boxSelector": "#box_getCloudStorageFolderContents", "inputValue": { diff --git a/apps/teams-test-app/e2e-test-data/geoLocation.json b/apps/teams-test-app/e2e-test-data/geoLocation.json index ec4cfc9519..ba05e08ed9 100644 --- a/apps/teams-test-app/e2e-test-data/geoLocation.json +++ b/apps/teams-test-app/e2e-test-data/geoLocation.json @@ -1,6 +1,6 @@ { "name": "GeoLocation", - "platforms": "Web", + "platforms": ["Web","Android"], "version": ">=2.1.0", "checkIsSupported": { "capabilityName": "GeoLocation", @@ -28,9 +28,22 @@ "isRequestPermissionCall": { "repeatRequestPermissionCall": true }, "expectedTestAppValue": "true" }, + { + "title": "getCurrentLocation API Call - AndroidSpecific - Success", + "type": "callResponse", + "platformsExcluded": ["Web"], + "boxSelector": "#box_getCurrentLocation", + "requestPermissionBeforeThisCall": { + "boxSelector": "#box_requestGeoLocationPermission", + "consentPermission": true + }, + "expectedAlertValue": ["getCurrentLocation is called"], + "expectedTestAppValue": "{\"latitude\":51.50735,\"longitude\":-0.127758,\"accuracy\":2.01,\"timestamp\":200}" + }, { "title": "getCurrentLocation API Call - Success", "type": "callResponse", + "platformsExcluded": ["Web","Android"], "boxSelector": "#box_getCurrentLocation", "requestPermissionBeforeThisCall": { "boxSelector": "#box_requestGeoLocationPermission", diff --git a/apps/teams-test-app/e2e-test-data/location.json b/apps/teams-test-app/e2e-test-data/location.json index 9aeaacf5ee..76de7c0e72 100644 --- a/apps/teams-test-app/e2e-test-data/location.json +++ b/apps/teams-test-app/e2e-test-data/location.json @@ -7,7 +7,7 @@ { "title": "getLocation API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_getLocation", "requestPermissionBeforeThisCall": { "boxSelector": "#box_requestGeoLocationPermission", @@ -17,10 +17,23 @@ "expectedAlertValue": "location.map.chooseLocation is called.", "expectedTestAppValue": "{\"latitude\":51.50735,\"longitude\":-0.127758,\"accuracy\":2,\"timestamp\":200}" }, + { + "title": "getLocation API Call - Success", + "type": "callResponse", + "platformsExcluded": ["iOS","Web"], + "boxSelector": "#box_getLocation", + "requestPermissionBeforeThisCall": { + "boxSelector": "#box_requestGeoLocationPermission", + "consentPermission": true + }, + "inputValue": { "allowChooseLocation": true }, + "expectedAlertValue": "location.map.chooseLocation is called.", + "expectedTestAppValue": "{\"latitude\":51.50735,\"longitude\":-0.127758,\"accuracy\":2.01,\"timestamp\":200}" + }, { "title": "showLocation API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_showLocation", "requestPermissionBeforeThisCall": { "boxSelector": "#box_requestGeoLocationPermission", @@ -29,7 +42,7 @@ "inputValue": { "latitude": 51.50735, "longitude": -0.127758, - "accuracy": 2, + "accuracy": 2.01, "timestamp": 200 }, "expectedAlertValue": "location.map.showLocation called with ##JSON_INPUT_VALUE##", @@ -38,7 +51,7 @@ { "title": "getLocation API Call - Success", "type": "callResponse", - "platformsExcluded": ["Web"], + "platformsExcluded": ["Web","Android"], "boxSelector": "#box_getLocation", "requestPermissionBeforeThisCall": { "boxSelector": "#box_requestGeoLocationPermission", @@ -49,6 +62,20 @@ "expectedAlertValue": "location.map.chooseLocation is called.", "expectedTestAppValue": "{\"latitude\":51.50735,\"longitude\":-0.127758,\"accuracy\":2,\"timestamp\":200}" }, + { + "title": "getLocation API Call - Success", + "type": "callResponse", + "platformsExcluded": ["Web","iOS"], + "boxSelector": "#box_getLocation", + "requestPermissionBeforeThisCall": { + "boxSelector": "#box_requestGeoLocationPermission", + "consentPermission": "Allow", + "expectedOutput": "true" + }, + "inputValue": { "allowChooseLocation": true }, + "expectedAlertValue": "location.map.chooseLocation is called.", + "expectedTestAppValue": "{\"latitude\":51.50735,\"longitude\":-0.127758,\"accuracy\":2.01,\"timestamp\":200}" + }, { "title": "showLocation API Call - Success", "type": "callResponse", @@ -62,7 +89,7 @@ "inputValue": { "latitude": 51.50735, "longitude": -0.127758, - "accuracy": 2, + "accuracy": 2.01, "timestamp": 200 }, "expectedAlertValue": "location.map.showLocation called with ##JSON_INPUT_VALUE##", diff --git a/apps/teams-test-app/e2e-test-data/media.json b/apps/teams-test-app/e2e-test-data/media.json index 2c709676ab..8e7efe1423 100644 --- a/apps/teams-test-app/e2e-test-data/media.json +++ b/apps/teams-test-app/e2e-test-data/media.json @@ -1,6 +1,6 @@ { "name": "Media", - "platforms": "Web", + "platforms": ["Web","Android"], "testCases": [ { "title": "selectMedia API Call - Success", @@ -24,11 +24,20 @@ { "title": "getMedia API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getMedia", "inputValue": {}, "expectedAlertValue": ["selectMedia called with ##JSON_INPUT_VALUE##", "getMedia called with \"ABCDEFGHIJKL\""], "expectedTestAppValue": "Received Blob (length: 74163)" }, + { + "title": "getMedia API Call - Success", + "type": "callResponse", + "platformsExcluded": ["Web","iOS"], + "boxSelector": "#box_getMedia", + "inputValue": {}, + "expectedTestAppValue": "{\"errorCode\":500,\"message\":\"An internal server error occurred\"}" + }, { "title": "viewImagesWithIds API Call - Success", "type": "callResponse", @@ -61,6 +70,7 @@ { "title": "viewImagesWithUrls API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_viewImagesWithUrls", "inputValue": "first, second", diff --git a/apps/teams-test-app/e2e-test-data/meeting.json b/apps/teams-test-app/e2e-test-data/meeting.json index 2742b772dc..ab27d13b58 100644 --- a/apps/teams-test-app/e2e-test-data/meeting.json +++ b/apps/teams-test-app/e2e-test-data/meeting.json @@ -1,11 +1,12 @@ { "name": "Meeting", - "platforms": "Web", + "platforms": ["Web","Android"], "testUrlParams": [["frameContext", "sidePanel"]], "testCases": [ { "title": "getIncomingClientAudioState API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getIncomingClientAudioState", "expectedAlertValue": "getIncomingClientAudioState called", "expectedTestAppValue": "true" @@ -13,6 +14,7 @@ { "title": "toggleIncomingClientAudio API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_toggleIncomingClientAudio", "expectedAlertValue": "toggleIncomingClientAudio called", "expectedTestAppValue": "false" @@ -29,6 +31,7 @@ "title": "getMeetingDetails API Call - Success", "version": ">2.22.0", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getMeetingDetails", "expectedAlertValue": "getMeetingDetails called with shouldGetVerboseDetails: undefined", "expectedTestAppValue": "{\"details\":{\"id\":\"testDetailsId\",\"scheduledStartTime\":\"testStartTime\",\"scheduledEndTime\":\"testEndTime\",\"joinUrl\":\"testJoinUrl\",\"title\":\"testTitle\",\"type\":\"Unknown\"},\"conversation\":{\"id\":\"testConversationId\"},\"organizer\":{\"id\":\"testOrganizerId\",\"tenantId\":\"testTenantId\"}}" @@ -37,6 +40,7 @@ "title": "getMeetingDetailsVerbose API Call - Success", "version": ">2.22.0", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getMeetingDetailsVerbose", "expectedAlertValue": "getMeetingDetails called with shouldGetVerboseDetails: true", "expectedTestAppValue": "{\"details\":{\"scheduledStartTime\":\"testStartTime\",\"joinUrl\":\"testJoinUrl\",\"type\":\"oneOnOneCall\",\"originalCaller\":\"testCallerId\",\"dialedEntity\":\"testDnis\",\"trackingId\":\"testTrackingId\"},\"conversation\":{\"id\":\"testConversationId\"},\"organizer\":{\"id\":\"testOrganizerId\",\"tenantId\":\"testTenantId\"}}" @@ -51,6 +55,7 @@ { "title": "getLiveStreamState API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getLiveStreamState", "expectedAlertValue": "getLiveStreamState called", "expectedTestAppValue": "true" @@ -58,6 +63,7 @@ { "title": "requestStartLiveStreaming API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_requestStartLiveStreaming", "inputValue": { "streamUrl": "https://www.bing.com", @@ -68,12 +74,14 @@ { "title": "requestStopLiveStreaming API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_requestStopLiveStreaming", "expectedAlertValue": "requestStopLiveStreaming called" }, { "title": "registerLiveStreamChangedHandler API Call - Handler", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0-beta.2", "boxSelector": "#box_registerLiveStreamChangedHandler", "eventName": "liveStreamChanged", @@ -89,6 +97,7 @@ { "title": "registerLiveStreamChangedHandler API Call - Handler", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_registerLiveStreamChangedHandler", "eventName": "liveStreamChanged", @@ -104,6 +113,7 @@ { "title": "registerRaiseHandStateChangedHandler API Call - Handler - Success", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0", "boxSelector": "#box_registerRaiseHandStateChangedHandler", "eventName": "raiseHandStateChanged", @@ -117,6 +127,7 @@ { "title": "registerRaiseHandStateChangedHandler API Call - Handler - Error", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0", "boxSelector": "#box_registerRaiseHandStateChangedHandler", "eventName": "raiseHandStateChanged", @@ -134,6 +145,7 @@ { "title": "registerMeetingReactionReceivedHandler API Call - Handler - Success", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0", "boxSelector": "#box_registerMeetingReactionReceivedHandler", "eventName": "meetingReactionReceived", @@ -145,6 +157,7 @@ { "title": "registerMeetingReactionReceivedHandler API Call - Handler - Error", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0", "boxSelector": "#box_registerMeetingReactionReceivedHandler", "eventName": "meetingReactionReceived", @@ -159,6 +172,7 @@ { "title": "registerSpeakingStateChangedHandler API Call - Handler - Success", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.0.0", "boxSelector": "#box_registerSpeakingStateChangedHandler", "eventName": "speakingStateChanged", @@ -170,6 +184,7 @@ { "title": "registerSpeakingStateChangedHandler API Call - Handler - Error", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.1.0", "boxSelector": "#box_registerSpeakingStateChangedHandler", "eventName": "speakingStateChanged", @@ -198,6 +213,7 @@ { "title": "shareAppContentToStage API Call (TJS <2.19.0, host SDK>=2.8.0) - Success", "type": "callResponse", + "platformsExcluded":["Android"], "version": "<2.19.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -212,6 +228,7 @@ { "title": "shareAppContentToStage API Call (TJS >=2.19.0, host SDK>=2.8.0) - Success", "type": "callResponse", + "platformsExcluded":["Android"], "version": ">=2.19.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -226,6 +243,7 @@ { "title": "shareAppContentToStage API Call with shareOptions (host sdk<2.8.0) - Success", "type": "callResponse", + "platformsExcluded":["Android"], "hostSdkVersion": { "web": "<2.8.0" }, @@ -242,6 +260,7 @@ { "title": "shareAppContentToStage API Call with shareOptions (TJS<2.19.0, host SDK>=2.8.0) - Success", "type": "callResponse", + "platformsExcluded":["Android"], "version": "<2.19.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -259,6 +278,7 @@ { "title": "shareAppContentToStage API Call with shareOptions (TJS>=2.19.0, host SDK>=2.8.0) - Success", "type": "callResponse", + "platformsExcluded":["Android"], "version": ">=2.19.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -276,6 +296,7 @@ { "title": "getAppContentStageSharingCapabilities API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getAppContentStageSharingCapabilities", "expectedAlertValue": "getAppContentStageSharingCapabilities called", "expectedTestAppValue": "getAppContentStageSharingCapabilities() succeeded: {\"doesAppHaveSharePermission\":true}" @@ -283,6 +304,7 @@ { "title": "stopSharingAppContentToStage API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_stopSharingAppContentToStage", "expectedAlertValue": "stopSharingAppContentToStage called", "expectedTestAppValue": "stopSharingAppContentToStage() succeeded: true" @@ -290,6 +312,7 @@ { "title": "getAppContentStageSharingState API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_getAppContentStageSharingState", "expectedAlertValue": "getAppContentStageSharingState called", "expectedTestAppValue": "getAppContentStageSharingState() succeeded: {\"isAppSharing\":true}" @@ -297,6 +320,7 @@ { "title": "requestAppAudioHandling API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.7.1", "boxSelector": "#box_requestAppAudioHandling", "inputValue": { @@ -308,6 +332,7 @@ { "title": "requestAppAudioHandling API Call - register audioDeviceSelectionChanged Handler - Success", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.17.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -328,6 +353,7 @@ { "title": "requestAppAudioHandling API Call - register audioDeviceSelectionChanged Handler - Error", "type": "registerAndRaiseEvent", + "platformsExcluded": ["Android"], "version": ">2.17.0", "hostSdkVersion": { "web": ">=2.8.0" @@ -346,6 +372,7 @@ { "title": "updateMicState API Call (<=2.20.0) - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.7.1 && <=2.20.0", "boxSelector": "#box_updateMicState", "inputValue": { @@ -357,6 +384,7 @@ { "title": "updateMicState API Call (>2.20.0) - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.20.0", "boxSelector": "#box_updateMicState", "inputValue": { @@ -368,6 +396,7 @@ { "title": "joinMeeting API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.20.0", "hostSdkVersion": { "web": ">2.12.0" @@ -383,6 +412,7 @@ { "title": "joinMeeting API Call - Error", "type": "callResponse", + "platformsExcluded": ["Android"], "version": ">2.20.0", "hostSdkVersion": { "web": ">2.12.0" diff --git a/apps/teams-test-app/e2e-test-data/meetingRoom.json b/apps/teams-test-app/e2e-test-data/meetingRoom.json index ed07262aaa..c1414cea32 100644 --- a/apps/teams-test-app/e2e-test-data/meetingRoom.json +++ b/apps/teams-test-app/e2e-test-data/meetingRoom.json @@ -1,6 +1,6 @@ { "name": "MeetingRoom", - "platforms": "Web", + "platforms": ["Web","Android"], "version": ">2.0.0-beta.0", "checkIsSupported": { "expectedOutput": "MeetingRoom is not supported" @@ -18,19 +18,16 @@ "type": "callResponse", "version": ">2.0.0-beta.2", "boxSelector": "#box_sendCommandToPairedMeetingRoom", - "inputValue": { - "commandName": "someCommandName" - }, + "inputValue": "someCommandName", "expectedAlertValue": "sendCommandToPairedMeetingRoom is called with ##JSON_INPUT_VALUE##" }, { "title": "sendCommandToPairedMeetingRoom API Call - Success", "type": "callResponse", "version": "2.0.0-beta.2", + "platformsExcluded": ["Android"], "boxSelector": "#box_sendCommandToPairedMeetingRoom", - "inputValue": { - "commandName": "someCommandName" - }, + "inputValue": "someCommandName", "expectedAlertValue": "sendCommandToPairedMeetingRoom is called with \"{\\\"commandName\\\":\\\"someCommandName\\\"}\"" }, { @@ -54,7 +51,7 @@ "toggleMute": true, "toggleCamera": true, "toggleCaptions": true, - "stageLayout": ["Gallery"], + "stageLayout": "Gallery", "leaveMeeting": true }, "expectedTestAppValue": "States of meeting room update ##JSON_EVENT_DATA##" diff --git a/apps/teams-test-app/e2e-test-data/pages.config.json b/apps/teams-test-app/e2e-test-data/pages.config.json index a2e3684bbd..14d7dc2cb7 100644 --- a/apps/teams-test-app/e2e-test-data/pages.config.json +++ b/apps/teams-test-app/e2e-test-data/pages.config.json @@ -32,6 +32,7 @@ { "title": "setValidityState API Call - Success - true", "type": "callResponse", + "platformsExcluded":["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_config_setValidityState", "inputValue": true, @@ -49,6 +50,7 @@ { "title": "setValidityState API Call - Success - false", "type": "callResponse", + "platformsExcluded":["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_config_setValidityState", "inputValue": false, @@ -58,7 +60,7 @@ { "title": "settings.save event without registration", "type": "raiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "eventName": "settings.save", "eventData": { "webhookUrl": "sampleWebhook" @@ -68,14 +70,14 @@ { "title": "settings.remove event without registration", "type": "raiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "eventName": "settings.remove", "expectedAlertValue": "onRemoveSuccess called" }, { "title": "registerOnSaveHandler API Call - Handler", "type": "registerAndRaiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_config_registerOnSaveHandler", "eventName": "settings.save", "eventData": { @@ -87,7 +89,7 @@ { "title": "registerOnRemoveHandler API Call - Handler", "type": "registerAndRaiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_config_registerOnRemoveHandler", "eventName": "settings.remove", "expectedAlertValue": "onRemoveSuccess called", @@ -97,7 +99,7 @@ "title": "registerOnRemoveHandler API Call - Handler Failure", "type": "registerAndRaiseEvent", "version": ">2.0.0", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_config_registerOnRemoveHandlerFailure", "eventName": "settings.remove", "eventData": null, @@ -108,7 +110,7 @@ "title": "registerChangeConfigsHandler API Call - Handler", "type": "registerAndRaiseEvent", "version": ">2.0.0-beta.0", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "testUrlParams": [["frameContext", "content"]], "boxSelector": "#box_config_registerChangeConfigsHandler", "eventName": "changeSettings", diff --git a/apps/teams-test-app/e2e-test-data/pages.json b/apps/teams-test-app/e2e-test-data/pages.json index 4042169d78..befa786d5c 100644 --- a/apps/teams-test-app/e2e-test-data/pages.json +++ b/apps/teams-test-app/e2e-test-data/pages.json @@ -12,7 +12,7 @@ { "title": "getConfig API Call - Default Response", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_config_getConfig", "modulesToDisable": ["pageConfigToggle"], "expectedTestAppValue": "{\"contentUrl\":\"https://localhost:4000\",\"entityId\":\"serverUrl\",\"suggestedDisplayName\":\"Server Url\"}" @@ -28,6 +28,7 @@ { "title": "setCurrentFrame API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "boxSelector": "#box_setCurrentFrame", "inputValue": { "contentUrl": "https://localhost:4000/app", @@ -62,6 +63,7 @@ { "title": "navigateCrossDomain API Call - Success", "type": "callResponse", + "platformsExcluded": ["Android"], "version": "2.0.0-beta.2", "boxSelector": "#box_navigateCrossDomain", "inputValue": "https://teams-test-tab.azurewebsites.net", @@ -71,7 +73,7 @@ { "title": "shareDeepLink API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": "<=2.1.0", "boxSelector": "#box_core\\.shareDeepLink", "inputValue": { @@ -85,7 +87,7 @@ { "title": "shareDeepLink API Call - Success", "type": "callResponse", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": ">2.1.0", "boxSelector": "#box_pages\\.shareDeepLink", "inputValue": { @@ -99,7 +101,7 @@ { "title": "registerFullScreenChangeHandler API Call - Handler", "type": "registerAndRaiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "boxSelector": "#box_registerFullScreenChangeHandler", "eventName": "fullScreenChange", "eventData": true, @@ -108,7 +110,7 @@ { "title": "registerFocusEnterHandler API Call - Handler", "type": "registerAndRaiseEvent", - "platformsExcluded": ["iOS"], + "platformsExcluded": ["iOS","Android"], "version": "1.x || >2.0.0-beta.2", "boxSelector": "#box_registerFocusEnterHandler", "eventName": "focusEnter", diff --git a/apps/teams-test-app/e2e-test-data/secondaryBrowser.json b/apps/teams-test-app/e2e-test-data/secondaryBrowser.json index ea541bcde4..88cdd3ea66 100644 --- a/apps/teams-test-app/e2e-test-data/secondaryBrowser.json +++ b/apps/teams-test-app/e2e-test-data/secondaryBrowser.json @@ -1,7 +1,7 @@ { "name": "SecondaryBrowser", "version": ">=2.12.0", - "platforms": "iOS", + "platforms": ["iOS", "Android"], "checkIsSupported": {}, "testCases": [ { diff --git a/apps/teams-test-app/src/components/SecondaryBrowserAPIs.tsx b/apps/teams-test-app/src/components/SecondaryBrowserAPIs.tsx index 21240fce0d..c97581bead 100644 --- a/apps/teams-test-app/src/components/SecondaryBrowserAPIs.tsx +++ b/apps/teams-test-app/src/components/SecondaryBrowserAPIs.tsx @@ -20,7 +20,6 @@ const Open = (): React.ReactElement => if (typeof input !== 'string') { throw new Error('Input should be a string'); } - // validate that input should also be a valid URL new URL(input); }, diff --git a/apps/teams-test-app/src/components/privateApis/FilesAPIs.tsx b/apps/teams-test-app/src/components/privateApis/FilesAPIs.tsx index b092e17318..e88f1fa740 100644 --- a/apps/teams-test-app/src/components/privateApis/FilesAPIs.tsx +++ b/apps/teams-test-app/src/components/privateApis/FilesAPIs.tsx @@ -1,4 +1,4 @@ -import { FileOpenPreference, files, SdkError } from '@microsoft/teams-js'; +import { app, FileOpenPreference, files, HostClientType, SdkError } from '@microsoft/teams-js'; import React, { ChangeEvent, ReactElement } from 'react'; import { noHostSdkMsg } from '../../App'; @@ -87,15 +87,33 @@ const AddCloudStorageFolder = (): React.ReactElement => onClick: { validateInput: (input) => { if (!input && typeof input !== 'string') { - throw new Error('input is required and it has be a string.'); + throw new Error('input is required and it has to be a string.'); } }, submit: async (input, setResult) => { - const callback = (error: SdkError, isFolderAdded: boolean, folders: files.CloudStorageFolder[]): void => { + const callback = async ( + error: SdkError, + isFolderAdded: boolean, + folders: files.CloudStorageFolder[], + ): Promise => { if (error) { setResult(JSON.stringify(error)); } else { - setResult(JSON.stringify({ isFolderAdded, folders })); + //This ensures the output is sorted correctly in the Android Test app, as specified by the JSON test data file. + const hostClientType = (await app.getContext()).app.host.clientType; + if (hostClientType === HostClientType.android) { + const result = { isFolderAdded, folders }; + // Sort the result object properties before returning for the android test app + const sortedResult = Object.keys(result) + .sort() + .reduce((acc, key) => { + acc[key] = result[key]; + return acc; + }, {}); + setResult(JSON.stringify(sortedResult)); + } else { + setResult(JSON.stringify({ isFolderAdded, folders })); + } } };