Skip to content

Commit

Permalink
update samples e2e tests to include slope charts
Browse files Browse the repository at this point in the history
  • Loading branch information
junedchhipa committed May 12, 2024
1 parent 8a1010d commit 8db9a19
Show file tree
Hide file tree
Showing 123 changed files with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions tests/e2e/samples.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ async function processSample(page, sample, command) {
)

const mismatchPercent = ((100 * numDiffs) / width / height).toFixed(2)
throw new TestError(`Screenshot changed by ${mismatchPercent}%`)

if (mismatchPercent > 5) {
throw new TestError(`Screenshot changed by ${mismatchPercent}%`)
}
} else if (err) {
throw err
}
Expand Down Expand Up @@ -164,7 +167,7 @@ async function processSamples(command, paths) {
dest: `${e2eSamplesDir}/apexcharts.e2e.js`,
format: 'umd',
env: 'development',
istanbul: true
istanbul: true,
})
}

Expand All @@ -188,7 +191,7 @@ async function processSamples(command, paths) {

const cluster = await Cluster.launch({
concurrency: Cluster.CONCURRENCY_PAGE,
maxConcurrency: 5
maxConcurrency: 5,
})

await cluster.task(async ({ page, data: sample }) => {
Expand All @@ -207,7 +210,7 @@ async function processSamples(command, paths) {
} catch (e) {
failedTests.push({
path: `${sample.dirName}/${sample.fileName}`,
error: e
error: e,
})
}
numCompleted++
Expand Down Expand Up @@ -241,12 +244,7 @@ async function processSamples(command, paths) {
)

if (!failedTest.error.hideStack) {
console.log(
failedTest.error.stack
.split('\n')
.slice(1)
.join('\n')
)
console.log(failedTest.error.stack.split('\n').slice(1).join('\n'))
}
}

Expand Down
Binary file modified tests/e2e/snapshots/area/area-datetime.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/area-github-style.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/area-spline.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/area-with-missing-data.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/area-with-negative.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/basic-area.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/multi-axis-with-seriesname-arrays.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/stacked-area.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/area/timeseries-with-irregular-data.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/bar-with-custom-data-labels.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/bar-with-images.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/bar-with-markers.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/bar-with-negative.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/basic-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/grouped-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/grouped-stacked-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/patterned-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/reversed-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/stacked-bar-100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bar/stacked-bar.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/boxPlot/basic.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/boxPlot/boxplot-scatter.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/boxPlot/horizontal-boxplot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bubble/3d-bubble.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/bubble/simple-bubble.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/e2e/snapshots/candlestick/basic.png
Binary file modified tests/e2e/snapshots/candlestick/candlestick-bar.png
Binary file modified tests/e2e/snapshots/candlestick/candlestick-category.png
Binary file modified tests/e2e/snapshots/candlestick/candlestick-line.png
Binary file modified tests/e2e/snapshots/column/basic-column.png
Binary file modified tests/e2e/snapshots/column/column-with-data-labels.png
Binary file modified tests/e2e/snapshots/column/column-with-group-label.png
Binary file modified tests/e2e/snapshots/column/column-with-markers.png
Binary file modified tests/e2e/snapshots/column/column-with-negative.png
Binary file modified tests/e2e/snapshots/column/column-with-rotated-data-labels.png
Binary file modified tests/e2e/snapshots/column/column-with-rotated-labels.png
Binary file modified tests/e2e/snapshots/column/data-color.png
Binary file modified tests/e2e/snapshots/column/distributed-columns.png
Binary file modified tests/e2e/snapshots/column/dumbbell-chart.png
Binary file modified tests/e2e/snapshots/column/dynamic-loaded-chart.png
Binary file modified tests/e2e/snapshots/column/grouped-stacked-column.png
Binary file modified tests/e2e/snapshots/column/range-column.png
Binary file modified tests/e2e/snapshots/column/stacked-column-100.png
Binary file modified tests/e2e/snapshots/column/stacked-column-with-line-new.png
Binary file modified tests/e2e/snapshots/column/stacked-column-with-line.png
Binary file modified tests/e2e/snapshots/column/stacked-column.png
Binary file modified tests/e2e/snapshots/funnel/funnel.png
Binary file modified tests/e2e/snapshots/funnel/pyramid.png
Binary file modified tests/e2e/snapshots/heatmap/basic.png
Binary file modified tests/e2e/snapshots/heatmap/color-range.png
Binary file modified tests/e2e/snapshots/heatmap/image-fill.png
Binary file modified tests/e2e/snapshots/heatmap/multiple-color-scales-flipped.png
Binary file modified tests/e2e/snapshots/heatmap/multiple-color.png
Binary file modified tests/e2e/snapshots/heatmap/rounded.png
Binary file modified tests/e2e/snapshots/line/basic-line.png
Binary file modified tests/e2e/snapshots/line/brush-charts.png
Binary file modified tests/e2e/snapshots/line/dashed-line.png
Binary file modified tests/e2e/snapshots/line/gradient-line.png
Binary file modified tests/e2e/snapshots/line/line-with-annotations.png
Binary file modified tests/e2e/snapshots/line/line-with-data-labels.png
Binary file modified tests/e2e/snapshots/line/line-with-image.png
Binary file modified tests/e2e/snapshots/line/line-with-missing-data.png
Binary file modified tests/e2e/snapshots/line/linestep.png
Binary file modified tests/e2e/snapshots/line/logarithmic-line.png
Binary file modified tests/e2e/snapshots/line/realtime.png
Binary file modified tests/e2e/snapshots/line/stepline.png
Binary file modified tests/e2e/snapshots/line/syncing-charts.png
Binary file modified tests/e2e/snapshots/line/zoomable-timeseries.png
Binary file modified tests/e2e/snapshots/misc/annotations-example.png
Binary file modified tests/e2e/snapshots/misc/axios.png
Binary file modified tests/e2e/snapshots/misc/custom-legend.png
Binary file modified tests/e2e/snapshots/misc/jquery.png
Binary file modified tests/e2e/snapshots/misc/minMaxPoints.png
Binary file modified tests/e2e/snapshots/misc/no-data.png
Binary file modified tests/e2e/snapshots/mixed/duplicate-labels.png
Binary file modified tests/e2e/snapshots/mixed/line-area.png
Binary file modified tests/e2e/snapshots/mixed/line-column-area-stacked-grouped.png
Binary file modified tests/e2e/snapshots/mixed/line-column-area.png
Binary file modified tests/e2e/snapshots/mixed/line-column.png
Binary file modified tests/e2e/snapshots/mixed/line-scatter.png
Binary file modified tests/e2e/snapshots/mixed/multiple-yaxes.png
Binary file modified tests/e2e/snapshots/pie/donut-update.png
Binary file modified tests/e2e/snapshots/pie/donut-with-pattern.png
Binary file modified tests/e2e/snapshots/pie/gradient-donut.png
Binary file modified tests/e2e/snapshots/pie/monochrome-pie.png
Binary file modified tests/e2e/snapshots/pie/pie-with-image.png
Binary file modified tests/e2e/snapshots/pie/semi-donut.png
Binary file modified tests/e2e/snapshots/pie/simple-donut.png
Binary file modified tests/e2e/snapshots/pie/simple-pie.png
Binary file modified tests/e2e/snapshots/polarArea/basic-polar-area.png
Binary file modified tests/e2e/snapshots/polarArea/polar-area-monochrome.png
Binary file modified tests/e2e/snapshots/radar/basic-radar.png
Binary file modified tests/e2e/snapshots/radar/radar-multiple-series.png
Binary file modified tests/e2e/snapshots/radar/radar-with-polygon-fill.png
Binary file modified tests/e2e/snapshots/radialBar/circle-chart-multiple.png
Binary file modified tests/e2e/snapshots/radialBar/circle-chart-with-image.png
Binary file modified tests/e2e/snapshots/radialBar/circle-chart.png
Binary file modified tests/e2e/snapshots/radialBar/circle-custom-angle.png
Binary file modified tests/e2e/snapshots/radialBar/circle-gradient.png
Binary file modified tests/e2e/snapshots/radialBar/semi-circle-chart.png
Binary file modified tests/e2e/snapshots/radialBar/stroked-gauge.png
Binary file modified tests/e2e/snapshots/rangeArea/basic-range-area.png
Binary file modified tests/e2e/snapshots/rangeArea/range-area-line-combo.png
Binary file modified tests/e2e/snapshots/scatter/scatter-basic.png
Binary file modified tests/e2e/snapshots/scatter/scatter-datetime.png
Binary file modified tests/e2e/snapshots/scatter/scatter-images.png
Binary file added tests/e2e/snapshots/slope/basic.png
Binary file added tests/e2e/snapshots/slope/slope-style-2.png
Binary file modified tests/e2e/snapshots/sparklines/sparklines.png
Binary file modified tests/e2e/snapshots/timelines/advanced.png
Binary file modified tests/e2e/snapshots/timelines/brush-rangebars.png
Binary file modified tests/e2e/snapshots/timelines/controlling-colors.png
Binary file modified tests/e2e/snapshots/timelines/dumbbell-chart-horizontal.png
Binary file modified tests/e2e/snapshots/timelines/multi-series-group-rows.png
Binary file modified tests/e2e/snapshots/timelines/multi-series.png
Binary file modified tests/e2e/snapshots/timelines/simple.png
Binary file modified tests/e2e/snapshots/treemap/basic.png
Binary file modified tests/e2e/snapshots/treemap/color-scale.png
Binary file modified tests/e2e/snapshots/treemap/distributed.png
Binary file modified tests/e2e/snapshots/treemap/multi-dimensional.png

0 comments on commit 8db9a19

Please sign in to comment.