-
Notifications
You must be signed in to change notification settings - Fork 172
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[releases/24.x] AppSource Gallery bug fixes and test refactoring (#696)
<!-- Thank you for submitting a Pull Request. If you're new to contributing to BCApps please read our pull request guideline below * https://github.com/microsoft/BCApps/Contributing.md --> #### Summary Cherry-picks of the following AppSource Gallery-related PR's. #610 #657 #675 #### Work Item(s) <!-- Add the issue number here after the #. The issue needs to be open and approved. Submitting PRs with no linked issues or unapproved issues is highly discouraged. --> Fixes [AB#504559](https://dynamicssmb2.visualstudio.com/1fcb79e7-ab07-432a-a3c6-6cf5a88ba4a5/_workitems/edit/504559) --------- Co-authored-by: Steffen Balslev <[email protected]> Co-authored-by: Alexander Holstrup <[email protected]>
- Loading branch information
1 parent
0849119
commit d9e8118
Showing
13 changed files
with
698 additions
and
609 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 73 additions & 0 deletions
73
src/System Application/App/AppSource Gallery/src/AppSrcProductDepsProvider.Codeunit.al
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// ------------------------------------------------------------------------------------------------ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
// ------------------------------------------------------------------------------------------------ | ||
namespace System.Apps.AppSource; | ||
|
||
using System.Environment.Configuration; | ||
using System.Globalization; | ||
using System.Azure.Identity; | ||
using System.Environment; | ||
using System.RestClient; | ||
|
||
/// <summary> | ||
/// Provides the dependencies used by the AppSource Gallery module. | ||
/// </summary> | ||
codeunit 2518 "AppSrc Product Deps. Provider" implements "AppSource Product Manager Dependencies" | ||
{ | ||
Access = Internal; | ||
InherentEntitlements = X; | ||
InherentPermissions = X; | ||
|
||
procedure GetCountryLetterCode(): Code[2] | ||
var | ||
AzureAdTenant: Codeunit "Azure AD Tenant"; | ||
begin | ||
exit(AzureAdTenant.GetCountryLetterCode()); | ||
end; | ||
|
||
procedure GetPreferredLanguage(): Text | ||
var | ||
AzureAdTenant: Codeunit "Azure AD Tenant"; | ||
begin | ||
exit(AzureAdTenant.GetPreferredLanguage()); | ||
end; | ||
|
||
procedure GetApplicationFamily(): Text | ||
var | ||
EnvironmentInformation: Codeunit "Environment Information"; | ||
begin | ||
exit(EnvironmentInformation.GetApplicationFamily()); | ||
end; | ||
|
||
procedure IsSaas(): boolean | ||
var | ||
EnvironmentInformation: Codeunit "Environment Information"; | ||
begin | ||
exit(EnvironmentInformation.IsSaas()); | ||
end; | ||
|
||
procedure GetFormatRegionOrDefault(FormatRegion: Text[80]): Text | ||
var | ||
Language: Codeunit Language; | ||
begin | ||
exit(Language.GetFormatRegionOrDefault(FormatRegion)); | ||
end; | ||
|
||
procedure GetAsJSon(var RestClient: Codeunit "Rest Client"; RequestUri: Text): JsonToken | ||
begin | ||
exit(RestClient.GetAsJSon(RequestUri)); | ||
end; | ||
|
||
procedure GetUserSettings(UserSecurityId: Guid; var TempUserSettingsRecord: record "User Settings" temporary) | ||
var | ||
UserSettings: Codeunit "User Settings"; | ||
begin | ||
UserSettings.GetUserSettings(Database.UserSecurityID(), TempUserSettingsRecord); | ||
end; | ||
|
||
procedure ShouldSetCommonHeaders(): Boolean | ||
begin | ||
exit(true); | ||
end; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/System Application/Test Library/AppSource Gallery/app.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"id": "ba17b564-d600-44d5-be0b-ca7ff7ac28fc", | ||
"name": "AppSource Gallery Test Library", | ||
"publisher": "Microsoft", | ||
"brief": "Test objects for the AppSource Gallery module.", | ||
"description": "Test objects for the AppSource Gallery module.", | ||
"version": "24.1.0.0", | ||
"privacyStatement": "https://go.microsoft.com/fwlink/?LinkId=724009", | ||
"EULA": "https://go.microsoft.com/fwlink/?linkid=2009120", | ||
"help": "", | ||
"url": "https://go.microsoft.com/fwlink/?LinkId=724011", | ||
"logo": "", | ||
"dependencies": [ | ||
{ | ||
"id": "79952567-63d7-4586-8b47-ba13a11a8a18", | ||
"name": "AppSource Product Gallery", | ||
"publisher": "Microsoft", | ||
"version": "24.1.0.0" | ||
}, | ||
{ | ||
"id": "812b339d-a9db-4a6e-84e4-fe35cbef0c44", | ||
"name": "Rest Client", | ||
"publisher": "Microsoft", | ||
"version": "24.1.0.0" | ||
}, | ||
{ | ||
"id": "7b9b59f5-a68d-4271-b11a-0d3b9c0938dd", | ||
"name": "User Settings", | ||
"publisher": "Microsoft", | ||
"version": "24.1.0.0" | ||
} | ||
], | ||
"screenshots": [ | ||
|
||
], | ||
"idRanges": [ | ||
{ | ||
"from": 132935, | ||
"to": 132936 | ||
} | ||
], | ||
"platform": "24.0.0.0", | ||
"target": "OnPrem" | ||
} |
Oops, something went wrong.