Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
HARP-11222: Add unit tests to createMaterial for solid lines depth te…
Browse files Browse the repository at this point in the history
…st. (#1695)

Signed-off-by: Andres Mandado <andres.mandado-almajano@here.com>
  • Loading branch information
atomicsulfate committed Jul 20, 2020
1 parent f248b93 commit 6cbc5a4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions @here/harp-mapview/test/DecodedTileHelpersTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,31 @@ describe("DecodedTileHelpers", function() {
assert.exists(material);
}, /Unsupported color format/);
});

it("disables depthTest for solid lines by default", function() {
const technique: SolidLineTechnique = {
name: "solid-line",
lineWidth: 10,
renderOrder: 0,
color: "#f0f7"
};
const material = createMaterial({ technique, env })! as SolidLineMaterial;
assert.exists(material);
assert.isFalse(material.depthTest);
});

it("enables depthTest for solid lines if specified in the technique", function() {
const technique: SolidLineTechnique = {
name: "solid-line",
lineWidth: 10,
renderOrder: 0,
color: "#f0f7",
depthTest: true
};
const material = createMaterial({ technique, env })! as SolidLineMaterial;
assert.exists(material);
assert.isTrue(material.depthTest);
});
});
it("#applyBaseColorToMaterial toggles opacity with material", function() {
const material = new THREE.MeshBasicMaterial();
Expand Down

0 comments on commit 6cbc5a4

Please sign in to comment.