Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update @gravity-ui/chartkit to v5.18.0 #1845

Merged
merged 4 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions jest/mocks/globals.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,11 @@ jest.mock(`../../src/ui/libs/userSettings/index.ts`, () => {
},
};
});

jest.mock('@gravity-ui/chartkit/d3', () => {
return {
CustomShapeRenderer: {
pieCenterText: () => {},
},
};
});
38 changes: 29 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@diplodoc/transform": "^4.20.0",
"@gravity-ui/app-layout": "^2.1.0",
"@gravity-ui/browserslist-config": "^4.3.0",
"@gravity-ui/chartkit": "^5.17.1",
"@gravity-ui/chartkit": "^5.18.1",
"@gravity-ui/dashkit": "^8.20.1",
"@gravity-ui/date-utils": "^2.3.0",
"@gravity-ui/expresskit": "^2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/opensource-suites/dash/base/loading.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const TEXTS = {
};

const SELECTORS = {
CHART_LINE_ITEM: '.chartkit-d3-axis',
CHART_LINE_ITEM: '.gcharts-d3-axis',
};

const waitForDashFirstResponseSentData = async ({
Expand Down
2 changes: 1 addition & 1 deletion tests/opensource-suites/dash/base/relations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {ConnectionsDialogQA, Feature} from '../../../../src/shared';
import {TestParametrizationConfig} from '../../../types/config';

const SELECTORS = {
CHART_LEGEND_ITEM: '.chartkit-d3-legend__item',
CHART_LEGEND_ITEM: '.gcharts-d3-legend__item',
CONTROL_SELECT_ITEMS_KEY: 'chartkit-control-select-items',
};
const PARAMS = {
Expand Down
2 changes: 1 addition & 1 deletion tests/opensource-suites/dash/relations/ignore.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {DashRelationTypes} from '../../../../src/shared';
import {TestParametrizationConfig} from '../../../types/config';

const SELECTORS = {
CHART_LEGEND_ITEM: '.chartkit-d3-legend__item',
CHART_LEGEND_ITEM: '.gcharts-d3-legend__item',
CONTROL_SELECT_ITEMS_KEY: 'chartkit-control-select-items',
};

Expand Down
2 changes: 1 addition & 1 deletion tests/opensource-suites/dash/relations/relations.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {DashCommonQa, DashRelationTypes} from '../../../../src/shared';
import {TestParametrizationConfig} from '../../../types/config';

const SELECTORS = {
CHART_LEGEND_ITEM: '.chartkit-d3-legend__item',
CHART_LEGEND_ITEM: '.gcharts-d3-legend__item',
CONTROL_SELECT_ITEMS_KEY: 'chartkit-control-select-items',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ datalensTest.describe('QL', () => {
const qlPage = new QLPage({page});

const previewLoader = page.locator('.grid-loader');
const chart = page.locator('.chartkit-graph,.chartkit-d3');
const chart = page.locator('.chartkit-graph,.gcharts-d3');

await qlPage.sectionVisualization.removeFieldByClick(
PlaceholderName.X,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ datalensTest.describe('QL', () => {
datalensTest('"Column names" in Labels section @screenshot', async ({page}) => {
const qlPage = new QLPage({page});
const previewLoader = page.locator('.grid-loader');
const chart = page.locator('.chartkit-graph,.chartkit-d3');
const chart = page.locator('.chartkit-graph,.gcharts-d3');

await qlPage.sectionVisualization.addFieldByClick(PlaceholderName.Labels, 'city');
await expect(previewLoader).not.toBeVisible();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ datalensTest.describe('QL', () => {

datalensTest('Visualization of the graph without errors', async ({page}) => {
const previewLoader = page.locator('.grid-loader');
const chart = page.locator('.chartkit-d3');
const chart = page.locator('.gcharts-d3');

await expect(previewLoader).not.toBeVisible();
await expect(chart).toBeVisible();
Expand Down
4 changes: 2 additions & 2 deletions tests/opensource-suites/wizard/edit-history/basic.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Make some changes, then undo them', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-graph,.chartkit-d3');
const chart = chartContainer.locator('.chartkit-graph,.gcharts-d3');

await expect(chart).toBeVisible();

Expand Down Expand Up @@ -62,7 +62,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Make some changes, then undo them, then redo them', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-graph,.chartkit-d3');
const chart = chartContainer.locator('.chartkit-graph,.gcharts-d3');

await expect(chart).toBeVisible();

Expand Down
2 changes: 1 addition & 1 deletion tests/opensource-suites/wizard/fields/parameters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ datalensTest.describe('Wizard', () => {
const datasetFields = page.locator(slct(SectionDatasetQA.DatasetFields));
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));
const chart = chartContainer.locator('.chartkit-graph,.chartkit-d3');
const chart = chartContainer.locator('.chartkit-graph,.gcharts-d3');
const noData = chartContainer.locator(slct('ERR.CK.NO_DATA'));

// Create parameter (value = 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Date and time on the Y axis @screenshot', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-graph,.chartkit-d3');
const chart = chartContainer.locator('.chartkit-graph,.gcharts-d3');

// Create dateTime field
const dateTimeMeasureField = 'MaxDate';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Auto coloring @screenshot', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-graph,.chartkit-d3');
const chart = chartContainer.locator('.chartkit-graph,.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

// 1. Only Measures placeholder is filled
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ datalensTest.describe('Wizard', () => {
async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-d3');
const chart = chartContainer.locator('.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

await wizardPage.sectionVisualization.addFieldByClick(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ datalensTest.describe('Wizard', () => {
await page.setViewportSize(SMALL_SCREENSHOT_VIEWPORT_SIZE);
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-d3');
const chart = chartContainer.locator('.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

await wizardPage.createNewFieldWithFormula(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ datalensTest.describe('Wizard', () => {
async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-d3');
const chart = chartContainer.locator('.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

await wizardPage.sectionVisualization.addFieldByClick(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Markdown dimension @screenshot', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-d3');
const chart = chartContainer.locator('.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

await wizardPage.createNewFieldWithFormula(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ datalensTest.describe('Wizard', () => {
datalensTest('Tooltip when hovering chart area @screenshot', async ({page}) => {
const wizardPage = new WizardPage({page});
const chartContainer = page.locator(slct(WizardPageQa.SectionPreview));
const chart = chartContainer.locator('.chartkit-d3');
const chart = chartContainer.locator('.gcharts-d3');
const previewLoader = chartContainer.locator(slct(ChartKitQa.Loader));

await wizardPage.sectionVisualization.addFieldByClick(
Expand Down
2 changes: 1 addition & 1 deletion tests/page-objects/constants/chartkit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ export const COMMON_CHARTKIT_SELECTORS = {
scrollableNode: 'chartkit-scrollable-node',
tooltipContainer: 'highcharts-tooltip-container',
tooltipNameColumn: '_tooltip-rows__name-td',
chartLegendItem: '.chartkit-d3-legend__item',
chartLegendItem: '.gcharts-d3-legend__item',
};
2 changes: 1 addition & 1 deletion tests/page-objects/ql/QLPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ class QLPage extends ChartPage {

waitForSomeSuccessfulRender() {
return new Promise((resolve, reject) => {
this.page.waitForSelector('.chartkit .chartkit-d3').then(resolve, () => undefined);
this.page.waitForSelector('.chartkit .gcharts-d3').then(resolve, () => undefined);
this.page.waitForSelector('.chartkit .chartkit-graph').then(resolve, () => undefined);

const metricLocators = [
Expand Down
Loading