Skip to content

Commit

Permalink
revert tests changes
Browse files Browse the repository at this point in the history
  • Loading branch information
illetid committed Oct 24, 2024
1 parent 78a0250 commit 0cd7d11
Show file tree
Hide file tree
Showing 281 changed files with 373 additions and 373 deletions.
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/chart/crosshair.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function beforeInteractions(container) {
},
});

const mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const mainSeries = chart.addCandlestickSeries();
mainSeries.setData(generateBars());

const lineSeries = chart.addLineSeries({
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/series/bar-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function testSeriesApi(series) {
function beforeInteractions(container) {
const chart = LightweightCharts.createChart(container);

const mainSeries = chart.addSeries(LightweightCharts.BarSeries);
const mainSeries = chart.addBarSeries();

mainSeries.setData(generateBars());

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/series/candlestick-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function testSeriesApi(series) {
function beforeInteractions(container) {
const chart = LightweightCharts.createChart(container);

const mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const mainSeries = chart.addCandlestickSeries();

mainSeries.setData(generateBars());

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/series/price-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let priceLine1;
function beforeInteractions(container) {
const chart = LightweightCharts.createChart(container);

mainSeries = chart.addSeries(LightweightCharts.BarSeries);
mainSeries = chart.addBarSeries();

mainSeries.setData(generateBars());

Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/series/title.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let mainSeries;
function beforeInteractions(container) {
const chart = LightweightCharts.createChart(container);

mainSeries = chart.addSeries(LightweightCharts.BarSeries, {
mainSeries = chart.addBarSeries({
title: 'Initial title',
priceFormat: {
type: 'percent',
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/time-scale/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ let data;
function beforeInteractions(container) {
chart = LightweightCharts.createChart(container);

mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
mainSeries = chart.addCandlestickSeries();

data = generateBars();
mainSeries.setData(data);
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/coverage/test-cases/time-scale/hidden.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function beforeInteractions(container) {
},
});

const mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const mainSeries = chart.addCandlestickSeries();

mainSeries.setData(generateBars());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function generateData() {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { autoSize: true, layout: { attributionLogo: false } });

const series = chart.addSeries(LightweightCharts.CandlestickSeries);
const series = chart.addCandlestickSeries();

const data = generateData();
series.setData(data);
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/graphics/test-cases/add-series-after-time.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function runTestCase(container) {

return new Promise(resolve => {
setTimeout(() => {
const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();
mainSeries.setData(generateData());

resolve();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });
const series = chart.addSeries(LightweightCharts.AreaSeries);
const series = chart.addAreaSeries();
series.setData([
{ time: '1990-04-24', value: 0 },
{ time: '1990-04-25', value: 1 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function runTestCase(container) {
autoSize: true,
layout: { attributionLogo: false },
}));
const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();
series.setData(generateData());

return new Promise(resolve => {
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/graphics/test-cases/api/price-scale-width.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries, { priceScaleId: 'overlay-scale' });
const series = chart.addLineSeries({ priceScaleId: 'overlay-scale' });
series.setData([
{ time: '1990-04-24', value: 0 },
{ time: '1990-04-25', value: 1 },
Expand Down
8 changes: 4 additions & 4 deletions tests/e2e/graphics/test-cases/api/series-data-by-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function checkSeries(series, data, compareItemsFn) {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const lineSeries = chart.addSeries(LightweightCharts.LineSeries);
const lineSeries = chart.addLineSeries();
checkSeries(
lineSeries,
[
Expand All @@ -108,7 +108,7 @@ function runTestCase(container) {

chart.removeSeries(lineSeries);

const candlestickSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const candlestickSeries = chart.addCandlestickSeries();

checkSeries(
candlestickSeries,
Expand All @@ -118,7 +118,7 @@ function runTestCase(container) {

chart.removeSeries(candlestickSeries);

const areaSeries = chart.addSeries(LightweightCharts.AreaSeries);
const areaSeries = chart.addAreaSeries();

checkSeries(
areaSeries,
Expand All @@ -135,7 +135,7 @@ function runTestCase(container) {

chart.removeSeries(areaSeries);

const baselineSeries = chart.addSeries(LightweightCharts.BaselineSeries);
const baselineSeries = chart.addBaselineSeries();

checkSeries(
baselineSeries,
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/graphics/test-cases/api/series-markers.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function compare(markers, seriesApiMarkers) {

function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });
const series = chart.addSeries(LightweightCharts.AreaSeries);
const series = chart.addAreaSeries();
series.setData([
{ time: '1990-04-24', value: 0 },
{ time: '1990-04-25', value: 1 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function runTestCase(container) {
const chart = (window.chart = LightweightCharts.createChart(container, {
layout: { attributionLogo: false },
}));
const series = chart.addSeries(LightweightCharts.AreaSeries);
const series = chart.addAreaSeries();
series.setData([
{ time: '1990-04-24', value: 0 },
{ time: '1990-04-25', value: 1 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();

const data = [
{ time: '1990-04-24', value: 0 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();

const data = [
{ time: '1990-04-24', value: 0 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();

const data = [
{ time: '1990-04-24', value: 0 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();

const data = [
{ time: '1990-04-24', value: 0 },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();

mainSeries.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const bar = chart.addSeries(LightweightCharts.BarSeries, {
const bar = chart.addBarSeries({
upColor: 'green',
downColor: 'red',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const candlestick = chart.addSeries(LightweightCharts.CandlestickSeries, {
const candlestick = chart.addCandlestickSeries({
upColor: 'green',
downColor: 'red',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();

mainSeries.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();

mainSeries.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function generateData() {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const mainSeries = chart.addCandlestickSeries();

mainSeries.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function generateData() {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();
mainSeries.setData(generateData());
chart.timeScale().setVisibleLogicalRange({
from: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const series = chart.addSeries(LightweightCharts.LineSeries);
const series = chart.addLineSeries();

series.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.CandlestickSeries);
const mainSeries = chart.addCandlestickSeries();

mainSeries.setData(generateData());
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function generateData() {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();
mainSeries.setData(generateData());

chart.timeScale().applyOptions({ fixLeftEdge: true });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.BarSeries);
const mainSeries = chart.addBarSeries();

const data = generateData(0);
mainSeries.setData(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function runTestCase(container) {
},
layout: { attributionLogo: false },
});
const lineSeries = chart.addSeries(LightweightCharts.LineSeries, {
const lineSeries = chart.addLineSeries({
baseLineVisible: true,
});
const data = generateData();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function runTestCase(container) {
},
layout: { attributionLogo: false },
});
const lineSeries = chart.addSeries(LightweightCharts.LineSeries, {
const lineSeries = chart.addLineSeries({
visible: false,
baseLineVisible: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const mainSeries = chart.addSeries(LightweightCharts.LineSeries, {
const mainSeries = chart.addLineSeries({
lineWidth: 1,
color: '#ff0000',
priceScaleId: 'right',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function runTestCase(container) {
layout: { attributionLogo: false },
});

const firstSeries = chart.addSeries(LightweightCharts.LineSeries, {
const firstSeries = chart.addLineSeries({
priceScaleId: 'right',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ function generateData(offset) {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const firstSeries = chart.addSeries(LightweightCharts.LineSeries, {
const firstSeries = chart.addLineSeries({
lineWidth: 1,
color: '#ff0000',
});

firstSeries.setData(generateData());

const secondsSeries = chart.addSeries(LightweightCharts.LineSeries, {
const secondsSeries = chart.addLineSeries({
lineWidth: 1,
color: '#0000ff',
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function runTestCase(container) {
container.appendChild(box);

const chart = LightweightCharts.createChart(box, { autoSize: true, height: 200, width: 200, layout: { attributionLogo: false } });
const mainSeries = chart.addSeries(LightweightCharts.AreaSeries);
const mainSeries = chart.addAreaSeries();

mainSeries.setData(generateData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function generateData(startValue) {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const mainSeries = chart.addSeries(LightweightCharts.BarSeries);
const mainSeries = chart.addBarSeries();

const data = generateData(0);
mainSeries.setData(data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ function generateData(valueOffset) {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const firstSeries = chart.addSeries(LightweightCharts.LineSeries, {
const firstSeries = chart.addLineSeries({
color: 'blue',
});
const secondSeries = chart.addSeries(LightweightCharts.LineSeries, {
const secondSeries = chart.addLineSeries({
priceScaleId: 'first-overlay',
color: 'green',
});
Expand All @@ -31,7 +31,7 @@ function runTestCase(container) {
},
});

const thirdSeries = chart.addSeries(LightweightCharts.LineSeries, {
const thirdSeries = chart.addLineSeries({
priceScaleId: '',
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function generateData() {
function runTestCase(container) {
const chart = window.chart = LightweightCharts.createChart(container, { layout: { attributionLogo: false } });

const mainSeries = chart.addSeries(LightweightCharts.LineSeries);
const mainSeries = chart.addLineSeries();
mainSeries.setData(generateData());
chart.timeScale().setVisibleLogicalRange({
from: 0,
Expand Down
Loading

0 comments on commit 0cd7d11

Please sign in to comment.