Skip to content

Commit

Permalink
render tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Apr 17, 2023
1 parent b3640e1 commit b1b979a
Show file tree
Hide file tree
Showing 11 changed files with 221 additions and 196 deletions.
3 changes: 1 addition & 2 deletions modules/layers/src/text-layer/text-layer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ export default class TextLayer<DataT = any, ExtraPropsT extends {} = {}> extends
startIndices,
numInstances,
getText,
fontAtlasManager: {scale, texture, mapping},
fontAtlasManager: {scale, texture, mapping, props: fontSettings},
styleVersion
} = this.state;

Expand All @@ -515,7 +515,6 @@ export default class TextLayer<DataT = any, ExtraPropsT extends {} = {}> extends
backgroundPadding,
background,
billboard,
fontSettings,
outlineWidth,
outlineColor,
sizeScale,
Expand Down
1 change: 1 addition & 0 deletions test/data/fonts/opensans.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions test/data/fonts/opensans_sdf.json

Large diffs are not rendered by default.

Binary file modified test/render/golden-images/text-layer-auto-wrapping.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/render/golden-images/text-layer-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/render/golden-images/text-layer-multi-lines.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added test/render/golden-images/text-layer-sdf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/render/golden-images/text-layer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions test/render/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {SnapshotTestRunner} from '@deck.gl/test-utils';

import './jupyter-widget';

test('Render Test', t => {
test.only('Render Test', t => {
// tape's default timeout is 500ms
t.timeoutAfter(TEST_CASES.length * 10000 + 10000);

Expand All @@ -41,10 +41,10 @@ test('Render Test', t => {
threshold: 0.99,
includeEmpty: false
// uncomment to save screenshot to disk
// , saveOnFail: true
, saveOnFail: true
// uncomment `saveAs` to overwrite current golden images
// if left commented will be saved as `[name]-fail.png.` enabling comparison
// , saveAs: '[name].png'
, saveAs: '[name].png'
}
})
.then(() => t.end());
Expand Down
16 changes: 8 additions & 8 deletions test/render/test-cases/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import collisionFilterExtensionTests from './collision-filter-extension';
import transitionTests from './transitions';

export default [].concat(
coreLayersTests,
arcLayersTests,
columnLayerTests,
geojsonLayerTests,
pathLayerTests,
pointCloudLayerTests,
polygonLayerTests,
iconLayerTests,
// coreLayersTests,
// arcLayersTests,
// columnLayerTests,
// geojsonLayerTests,
// pathLayerTests,
// pointCloudLayerTests,
// polygonLayerTests,
// iconLayerTests,
textLayerTests,
contourLayerTests,
gridLayerTests,
Expand Down
Loading

0 comments on commit b1b979a

Please sign in to comment.