Skip to content

Commit

Permalink
Fixup: Hide map from the test page DOM
Browse files Browse the repository at this point in the history
  • Loading branch information
yvonnesjy committed Jun 11, 2024
1 parent f2b7544 commit 06e1920
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/js/specs/unit/views/maps/MapView.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,17 @@ define(["views/maps/MapView", "models/maps/Map"], (MapView, MapAsset) => {
it("has an additional portal indicator class", () => {
const nonPortalMap = new MapView();
// Required for iFrame to not break in FeatureInfoView.
nonPortalMap.$el.hide();
document.body.appendChild(nonPortalMap.el);

nonPortalMap.render();
expect(nonPortalMap.$el.hasClass("map-view__portal")).to.be.false;

const portalMap = new MapView({ isPortalMap: true });
// Required for iFrame to not break in FeatureInfoView.
portalMap.$el.hide();
document.body.appendChild(portalMap.el);

portalMap.render();
expect(portalMap.$el.hasClass("map-view__portal")).to.be.true;
});
Expand Down

0 comments on commit 06e1920

Please sign in to comment.