Skip to content

Commit

Permalink
CompatibilityChecker: Fix Atlas app support
Browse files Browse the repository at this point in the history
Looks like Atlas app initially supported Group only, but later WebMap support
was added. So, added a new property to "resourceMessages" to reflect the
fact that Atlas app supports both WebMap and Group.

Update tests

Issue: https://devtopia.esri.com/WebGIS/arcgis-portal-app-templates/issues/11222
  • Loading branch information
pspraveenkr committed Dec 12, 2024
1 parent ceb7ac3 commit d9c69d8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/baseClasses/CompatibilityChecker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ export interface ICompatibilityCheckerProperties {

resourceMessages: {
Webmap: string;
WebmapOrGroup: string;
Webscene: string;
Group: string;
WebmapOrWebscene: string;
Expand Down Expand Up @@ -173,7 +174,7 @@ export class CompatibilityChecker {

this._resourceMessagesMap = {
[EAppTemplateType.AttachmentViewer]: resourceMessages.Webmap,
[EAppTemplateType.Atlas]: resourceMessages.Group,
[EAppTemplateType.Atlas]: resourceMessages.WebmapOrGroup,
[EAppTemplateType.Basic]: resourceMessages.WebmapOrWebscene,
[EAppTemplateType.CategoryGallery]: resourceMessages.Group,
[EAppTemplateType.Charts]: resourceMessages.Webmap,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const { suite, test } = intern.getPlugin("interface.tdd");

enum ResourceResults {
Webmap = "This app requires a webmap",
WebmapOrGroup = "This app requires a webmap or a group",
Webscene = "This app requires a webscene",
Group = "This app requires a group",
WebmapOrWebscene = "This app requires a webmap or a webscene",
Expand All @@ -23,6 +24,7 @@ class CompatibilityCheckerUT {
new CompatibilityChecker.CompatibilityChecker({
resourceMessages: {
Webmap: ResourceResults.Webmap,
WebmapOrGroup: ResourceResults.WebmapOrGroup,
Webscene: ResourceResults.Webscene,
Group: ResourceResults.Group,
WebmapOrWebscene: ResourceResults.WebmapOrWebscene,
Expand Down Expand Up @@ -69,10 +71,7 @@ class CompatibilityCheckerUT {
CompatibilityChecker.EAppTemplateType.ThreeDViewer,
ResourceResults.Webscene,
],
[
CompatibilityChecker.EAppTemplateType.Atlas,
ResourceResults.Group,
],
[CompatibilityChecker.EAppTemplateType.Atlas, null,],
[CompatibilityChecker.EAppTemplateType.AttachmentViewer, null],
[CompatibilityChecker.EAppTemplateType.Basic, null],
[
Expand Down Expand Up @@ -141,7 +140,7 @@ class CompatibilityCheckerUT {
[CompatibilityChecker.EAppTemplateType.ThreeDViewer, null],
[
CompatibilityChecker.EAppTemplateType.Atlas,
ResourceResults.Group,
ResourceResults.WebmapOrGroup,
],
[
CompatibilityChecker.EAppTemplateType.AttachmentViewer,
Expand Down

0 comments on commit d9c69d8

Please sign in to comment.