mirror of
https://github.com/apache/superset.git
synced 2026-08-05 13:32:41 +00:00
chore: rip antd-v4 from the app! (#33411)
This commit is contained in:
committed by
GitHub
parent
fcea7e4af9
commit
33f2ffd2a9
1
.github/workflows/superset-e2e.yml
vendored
1
.github/workflows/superset-e2e.yml
vendored
@@ -73,6 +73,7 @@ jobs:
|
||||
with:
|
||||
persist-credentials: false
|
||||
submodules: recursive
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
- name: Checkout using ref (workflow_dispatch)
|
||||
if: github.event_name == 'workflow_dispatch' && github.event.inputs.ref != ''
|
||||
uses: actions/checkout@v4
|
||||
|
||||
9
.github/workflows/superset-frontend.yml
vendored
9
.github/workflows/superset-frontend.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
|
||||
|
||||
- name: Check for File Changes
|
||||
id: check
|
||||
@@ -39,6 +41,10 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
echo "git rev-parse --short HEAD"
|
||||
git rev-parse --short HEAD
|
||||
echo "git show -s --format=raw HEAD"
|
||||
git show -s --format=raw HEAD
|
||||
docker buildx build \
|
||||
-t $TAG \
|
||||
--cache-from=type=registry,ref=apache/superset-cache:3.10-slim-bookworm \
|
||||
@@ -144,7 +150,8 @@ jobs:
|
||||
name: docker-image
|
||||
|
||||
- name: Load Docker Image
|
||||
run: docker load < docker-image.tar.gz
|
||||
run: |
|
||||
docker load < docker-image.tar.gz
|
||||
|
||||
- name: eslint
|
||||
run: |
|
||||
|
||||
@@ -63,10 +63,6 @@ const restrictedImportsRules = {
|
||||
name: 'antd',
|
||||
message: 'Please import Ant components from the index of src/components',
|
||||
},
|
||||
'no-antd-v5': {
|
||||
name: 'antd-v5',
|
||||
message: 'Please import Ant v5 components from the index of src/components',
|
||||
},
|
||||
'no-superset-theme': {
|
||||
name: '@superset-ui/core',
|
||||
importNames: ['supersetTheme'],
|
||||
@@ -295,9 +291,9 @@ module.exports = {
|
||||
'error',
|
||||
{
|
||||
paths: Object.values(restrictedImportsRules).filter(
|
||||
r => r.name !== 'antd-v5',
|
||||
r => r.name !== 'antd',
|
||||
),
|
||||
patterns: ['antd/*'],
|
||||
patterns: [],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
@@ -23,7 +23,7 @@ import thunk from 'redux-thunk';
|
||||
import { Provider } from 'react-redux';
|
||||
import reducerIndex from 'spec/helpers/reducerIndex';
|
||||
import { Global } from '@emotion/react';
|
||||
import { App, Layout, Space, Content } from 'antd-v5';
|
||||
import { App, Layout, Space, Content } from 'antd';
|
||||
|
||||
import 'src/theme.ts';
|
||||
import './storybook.css';
|
||||
@@ -39,7 +39,7 @@ export const GlobalStylesOverrides = () => (
|
||||
min-height: 100vh !important;
|
||||
}
|
||||
|
||||
.antd5-app {
|
||||
.ant-app {
|
||||
min-height: 100vh !important;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -47,12 +47,12 @@ describe.skip('Dashboard top-level controls', () => {
|
||||
// Solution: pause the network before clicking, assert, then unpause network.
|
||||
cy.get('[data-test="refresh-chart-menu-item"]').should(
|
||||
'have.class',
|
||||
'antd5-dropdown-menu-item-disabled',
|
||||
'ant-dropdown-menu-item-disabled',
|
||||
);
|
||||
waitForChartLoad(mapSpec);
|
||||
cy.get('[data-test="refresh-chart-menu-item"]').should(
|
||||
'not.have.class',
|
||||
'antd5-dropdown-menu-item-disabled',
|
||||
'ant-dropdown-menu-item-disabled',
|
||||
);
|
||||
});
|
||||
});
|
||||
@@ -65,7 +65,7 @@ describe.skip('Dashboard top-level controls', () => {
|
||||
cy.get('[aria-label="ellipsis"]').click();
|
||||
cy.get('[data-test="refresh-dashboard-menu-item"]').should(
|
||||
'not.have.class',
|
||||
'antd5-dropdown-menu-item-disabled',
|
||||
'ant-dropdown-menu-item-disabled',
|
||||
);
|
||||
|
||||
cy.get('[data-test="refresh-dashboard-menu-item"]').click({
|
||||
@@ -73,7 +73,7 @@ describe.skip('Dashboard top-level controls', () => {
|
||||
});
|
||||
cy.get('[data-test="refresh-dashboard-menu-item"]').should(
|
||||
'have.class',
|
||||
'antd5-dropdown-menu-item-disabled',
|
||||
'ant-dropdown-menu-item-disabled',
|
||||
);
|
||||
|
||||
// wait all charts force refreshed.
|
||||
@@ -94,7 +94,7 @@ describe.skip('Dashboard top-level controls', () => {
|
||||
cy.get('[aria-label="ellipsis"]').click();
|
||||
cy.get('[data-test="refresh-dashboard-menu-item"]').and(
|
||||
'not.have.class',
|
||||
'antd5-dropdown-menu-item-disabled',
|
||||
'ant-dropdown-menu-item-disabled',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -54,14 +54,14 @@ const drillBy = (targetDrillByColumn: string, isLegacy = false) => {
|
||||
interceptV1ChartData();
|
||||
}
|
||||
|
||||
cy.get('.antd5-dropdown:not(.antd5-dropdown-hidden)')
|
||||
cy.get('.ant-dropdown:not(.ant-dropdown-hidden)')
|
||||
.should('be.visible')
|
||||
.find("[role='menu'] [role='menuitem']")
|
||||
.contains(/^Drill by$/)
|
||||
.trigger('mouseover', { force: true });
|
||||
|
||||
cy.get(
|
||||
'.antd5-dropdown-menu-submenu:not(.antd5-dropdown-menu-submenu-hidden) [data-test="drill-by-submenu"]',
|
||||
'.ant-dropdown-menu-submenu:not(.ant-dropdown-menu-submenu-hidden) [data-test="drill-by-submenu"]',
|
||||
)
|
||||
.should('be.visible')
|
||||
.find('[role="menuitem"]')
|
||||
@@ -130,7 +130,7 @@ const testEchart = (
|
||||
.should('contain', chartName);
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -185,7 +185,7 @@ const testEchart = (
|
||||
// undo - back to drill by state
|
||||
interceptV1ChartData('drillByUndo');
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -210,7 +210,7 @@ const testEchart = (
|
||||
});
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -269,7 +269,7 @@ describe('Drill by modal', () => {
|
||||
.should('be.visible');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -318,7 +318,7 @@ describe('Drill by modal', () => {
|
||||
interceptV1ChartData('drillByUndo');
|
||||
interceptFormDataKey();
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -350,7 +350,7 @@ describe('Drill by modal', () => {
|
||||
.and('contain', 'sum__num');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -414,7 +414,7 @@ describe('Drill by modal', () => {
|
||||
.should('contain', 'Drill by: Pivot Table');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -465,7 +465,7 @@ describe('Drill by modal', () => {
|
||||
interceptV1ChartData('drillByUndo');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -499,7 +499,7 @@ describe('Drill by modal', () => {
|
||||
.and('contain', 'sum__num');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -636,7 +636,7 @@ describe('Drill by modal', () => {
|
||||
.should('contain', 'Mixed Chart');
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -672,7 +672,7 @@ describe('Drill by modal', () => {
|
||||
// undo - back to drill by state
|
||||
interceptV1ChartData('drillByUndo');
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
@@ -692,7 +692,7 @@ describe('Drill by modal', () => {
|
||||
});
|
||||
|
||||
cy.get('@drillByModal')
|
||||
.find('.antd5-breadcrumb')
|
||||
.find('.ant-breadcrumb')
|
||||
.should('be.visible')
|
||||
.and('contain', 'gender (boy)')
|
||||
.and('contain', '/')
|
||||
|
||||
@@ -34,8 +34,8 @@ function openModalFromMenu(chartType: string) {
|
||||
cy.get(
|
||||
`[data-test-viz-type='${chartType}'] [aria-label='More Options']`,
|
||||
).click();
|
||||
cy.get('.antd5-dropdown')
|
||||
.not('.antd5-dropdown-hidden')
|
||||
cy.get('.ant-dropdown')
|
||||
.not('.ant-dropdown-hidden')
|
||||
.find("[role='menu'] [role='menuitem']")
|
||||
.eq(5)
|
||||
.should('contain', 'Drill to detail')
|
||||
@@ -46,8 +46,8 @@ function openModalFromMenu(chartType: string) {
|
||||
function drillToDetail(targetMenuItem: string) {
|
||||
interceptSamples();
|
||||
|
||||
cy.get('.antd5-dropdown')
|
||||
.not('.antd5-dropdown-hidden')
|
||||
cy.get('.ant-dropdown')
|
||||
.not('.ant-dropdown-hidden')
|
||||
.first()
|
||||
.find("[role='menu'] [role='menuitem']")
|
||||
.contains(new RegExp(`^${targetMenuItem}$`))
|
||||
@@ -61,14 +61,14 @@ function drillToDetail(targetMenuItem: string) {
|
||||
const drillToDetailBy = (targetDrill: string) => {
|
||||
interceptSamples();
|
||||
|
||||
cy.get('.antd5-dropdown:not(.antd5-dropdown-hidden)')
|
||||
cy.get('.ant-dropdown:not(.ant-dropdown-hidden)')
|
||||
.should('be.visible')
|
||||
.find("[role='menu'] [role='menuitem']")
|
||||
.contains(/^Drill to detail by$/)
|
||||
.trigger('mouseover', { force: true });
|
||||
|
||||
cy.get(
|
||||
'.antd5-dropdown-menu-submenu:not(.antd5-dropdown-menu-submenu-hidden) [data-test="drill-to-detail-by-submenu"]',
|
||||
'.ant-dropdown-menu-submenu:not(.ant-dropdown-menu-submenu-hidden) [data-test="drill-to-detail-by-submenu"]',
|
||||
)
|
||||
.should('be.visible')
|
||||
.find('[role="menuitem"]')
|
||||
@@ -146,7 +146,7 @@ describe('Drill to detail modal', () => {
|
||||
it('refreshes the data', () => {
|
||||
openModalFromMenu('big_number_total');
|
||||
// move to the last page
|
||||
cy.get('.antd5-pagination-item').eq(5).click();
|
||||
cy.get('.ant-pagination-item').eq(5).click();
|
||||
// skips error on pagination
|
||||
cy.on('uncaught:exception', () => false);
|
||||
cy.wait('@samples');
|
||||
@@ -154,7 +154,7 @@ describe('Drill to detail modal', () => {
|
||||
cy.get("[aria-label='Reload']").click();
|
||||
cy.wait('@samples');
|
||||
// make sure it started back from first page
|
||||
cy.get('.antd5-pagination-item-active').should('contain', '1');
|
||||
cy.get('.ant-pagination-item-active').should('contain', '1');
|
||||
});
|
||||
|
||||
it('paginates', () => {
|
||||
@@ -165,13 +165,13 @@ describe('Drill to detail modal', () => {
|
||||
expect($rows).to.contain('Amy');
|
||||
});
|
||||
// checking the paginated data
|
||||
cy.get('.antd5-pagination-item')
|
||||
cy.get('.ant-pagination-item')
|
||||
.should('have.length', 6)
|
||||
.should($pages => {
|
||||
expect($pages).to.contain('1');
|
||||
expect($pages).to.contain('1514');
|
||||
});
|
||||
cy.get('.antd5-pagination-item').eq(4).click();
|
||||
cy.get('.ant-pagination-item').eq(4).click();
|
||||
// skips error on pagination
|
||||
cy.on('uncaught:exception', () => false);
|
||||
cy.wait('@samples');
|
||||
@@ -184,7 +184,7 @@ describe('Drill to detail modal', () => {
|
||||
|
||||
cy.get('.virtual-grid').contains('Juan').should('not.be.visible');
|
||||
|
||||
cy.get('.antd5-pagination-item').eq(0).click();
|
||||
cy.get('.ant-pagination-item').eq(0).click();
|
||||
|
||||
cy.get('.virtual-grid').contains('Aaron').should('be.visible');
|
||||
});
|
||||
@@ -455,7 +455,7 @@ describe('Drill to detail modal', () => {
|
||||
// checking the filter
|
||||
cy.getBySel('filter-val').should('contain', 'boy');
|
||||
cy.getBySel('row-count-label').should('contain', '39.2k rows');
|
||||
cy.get('.antd5-pagination-item')
|
||||
cy.get('.ant-pagination-item')
|
||||
.should('have.length', 6)
|
||||
.then($pages => {
|
||||
expect($pages).to.contain('1');
|
||||
@@ -463,11 +463,11 @@ describe('Drill to detail modal', () => {
|
||||
});
|
||||
|
||||
// close the filter and test that data was reloaded
|
||||
cy.getBySel('filter-col').find("[aria-label='close']").click();
|
||||
cy.getBySel('filter-col').find("[aria-label='Close']").click();
|
||||
cy.wait('@samples');
|
||||
cy.getBySel('row-count-label').should('contain', '75.7k rows');
|
||||
cy.get('.antd5-pagination-item-active').should('contain', '1');
|
||||
cy.get('.antd5-pagination-item')
|
||||
cy.get('.ant-pagination-item-active').should('contain', '1');
|
||||
cy.get('.ant-pagination-item')
|
||||
.should('have.length', 6)
|
||||
.then($pages => {
|
||||
expect($pages).to.contain('1');
|
||||
|
||||
@@ -44,7 +44,7 @@ function openProperties() {
|
||||
cy.getBySel('header-actions-menu')
|
||||
.contains('Edit properties')
|
||||
.click({ force: true });
|
||||
cy.get('.antd5-modal-body').should('be.visible');
|
||||
cy.get('.ant-modal-body').should('be.visible');
|
||||
}
|
||||
|
||||
function assertMetadata(text: string) {
|
||||
@@ -61,7 +61,7 @@ function assertMetadata(text: string) {
|
||||
}
|
||||
|
||||
function openAdvancedProperties() {
|
||||
cy.get('.antd5-modal-body')
|
||||
cy.get('.ant-modal-body')
|
||||
.contains('Advanced')
|
||||
.should('be.visible')
|
||||
.click({ force: true });
|
||||
@@ -157,7 +157,7 @@ function saveAndGo(dashboard = 'Tabbed Dashboard') {
|
||||
cy.getBySel('query-save-button').click();
|
||||
cy.getBySel('save-modal-body').then($modal => {
|
||||
cy.wrap($modal)
|
||||
.find("div[aria-label='Select a dashboard'] .antd5-select-selection-item")
|
||||
.find("div[aria-label='Select a dashboard'] .ant-select-selection-item")
|
||||
.should('have.text', dashboard);
|
||||
cy.getBySel('save-overwrite-radio').should('not.be.disabled');
|
||||
cy.getBySel('save-overwrite-radio').click();
|
||||
@@ -1089,7 +1089,7 @@ describe('Dashboard edit', () => {
|
||||
cy.allowConsoleErrors(['Error: A valid color scheme is required']);
|
||||
writeMetadata('{"color_scheme":"wrongcolorscheme"}');
|
||||
applyChanges();
|
||||
cy.get('.antd5-modal-body')
|
||||
cy.get('.ant-modal-body')
|
||||
.contains('A valid color scheme is required')
|
||||
.should('be.visible');
|
||||
});
|
||||
|
||||
@@ -57,16 +57,16 @@ function setFilterBarOrientation(orientation: 'vertical' | 'horizontal') {
|
||||
.trigger('mouseover');
|
||||
|
||||
if (orientation === 'vertical') {
|
||||
cy.get('.antd5-dropdown-menu-item-selected')
|
||||
cy.get('.ant-dropdown-menu-item-selected')
|
||||
.contains('Horizontal (Top)')
|
||||
.should('exist');
|
||||
cy.get('.antd5-dropdown-menu-item').contains('Vertical (Left)').click();
|
||||
cy.get('.ant-dropdown-menu-item').contains('Vertical (Left)').click();
|
||||
cy.getBySel('dashboard-filters-panel').should('exist');
|
||||
} else {
|
||||
cy.get('.antd5-dropdown-menu-item-selected')
|
||||
cy.get('.ant-dropdown-menu-item-selected')
|
||||
.contains('Vertical (Left)')
|
||||
.should('exist');
|
||||
cy.get('.antd5-dropdown-menu-item').contains('Horizontal (Top)').click();
|
||||
cy.get('.ant-dropdown-menu-item').contains('Horizontal (Top)').click();
|
||||
cy.getBySel('loading-indicator').should('exist');
|
||||
cy.getBySel('filter-bar').should('exist');
|
||||
cy.getBySel('dashboard-filters-panel').should('not.exist');
|
||||
@@ -197,7 +197,7 @@ describe('Horizontal FilterBar', () => {
|
||||
applyNativeFilterValueWithIndex(8, testItems.filterDefaultValue);
|
||||
cy.get(nativeFilters.applyFilter).click({ force: true });
|
||||
cy.wait('@chart');
|
||||
cy.get('.antd5-scroll-number.antd5-badge-count').should(
|
||||
cy.get('.ant-scroll-number.ant-badge-count').should(
|
||||
'have.attr',
|
||||
'title',
|
||||
'1',
|
||||
@@ -228,7 +228,7 @@ describe('Horizontal FilterBar', () => {
|
||||
});
|
||||
cy.getBySel('filter-status-popover').contains('test_9').click();
|
||||
cy.getBySel('dropdown-content').should('be.visible');
|
||||
cy.get('.antd5-select-focused').should('be.visible');
|
||||
cy.get('.ant-select-focused').should('be.visible');
|
||||
});
|
||||
|
||||
it.skip('should show tag count and one plain tag on focus and only count on blur in select ', () => {
|
||||
@@ -238,13 +238,13 @@ describe('Horizontal FilterBar', () => {
|
||||
setFilterBarOrientation('horizontal');
|
||||
enterNativeFilterEditModal();
|
||||
inputNativeFilterDefaultValue('Albania');
|
||||
cy.get('.antd5-select-selection-search-input').clear({ force: true });
|
||||
cy.get('.ant-select-selection-search-input').clear({ force: true });
|
||||
inputNativeFilterDefaultValue('Algeria', true);
|
||||
saveNativeFilterSettings([SAMPLE_CHART]);
|
||||
cy.getBySel('filter-bar').within(() => {
|
||||
cy.get(nativeFilters.filterItem).contains('Albania').should('be.visible');
|
||||
cy.get(nativeFilters.filterItem).contains('+ 1 ...').should('be.visible');
|
||||
cy.get('.antd5-select-selection-search-input').click();
|
||||
cy.get('.ant-select-selection-search-input').click();
|
||||
cy.get(nativeFilters.filterItem).contains('+ 2 ...').should('be.visible');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -33,7 +33,7 @@ const TABLE = { name: 'Names Sorted by Num in California', viz: 'table' };
|
||||
function topLevelTabs() {
|
||||
cy.getBySel('dashboard-component-tabs')
|
||||
.first()
|
||||
.find('[data-test="nav-list"] .antd5-tabs-nav-list > .antd5-tabs-tab')
|
||||
.find('[data-test="nav-list"] .ant-tabs-nav-list > .ant-tabs-tab')
|
||||
.as('top-level-tabs');
|
||||
}
|
||||
|
||||
@@ -60,20 +60,20 @@ describe('Dashboard tabs', () => {
|
||||
cy.get('@top-level-tabs').first().click();
|
||||
cy.get('@top-level-tabs')
|
||||
.first()
|
||||
.should('have.class', 'antd5-tabs-tab-active');
|
||||
.should('have.class', 'ant-tabs-tab-active');
|
||||
cy.get('@top-level-tabs')
|
||||
.last()
|
||||
.should('not.have.class', 'antd5-tabs-tab-active');
|
||||
.should('not.have.class', 'ant-tabs-tab-active');
|
||||
cy.get('[data-test-chart-name="Box plot"]').should('not.exist');
|
||||
cy.get('[data-test-chart-name="Trends"]').should('not.exist');
|
||||
|
||||
cy.get('@top-level-tabs').last().click();
|
||||
cy.get('@top-level-tabs')
|
||||
.last()
|
||||
.should('have.class', 'antd5-tabs-tab-active');
|
||||
.should('have.class', 'ant-tabs-tab-active');
|
||||
cy.get('@top-level-tabs')
|
||||
.first()
|
||||
.should('not.have.class', 'antd5-tabs-tab-active');
|
||||
.should('not.have.class', 'ant-tabs-tab-active');
|
||||
waitForChartLoad(BOX_PLOT);
|
||||
|
||||
cy.get('[data-test-chart-name="Box plot"]').should('exist');
|
||||
@@ -83,7 +83,7 @@ describe('Dashboard tabs', () => {
|
||||
// click row level tab, see 1 more chart
|
||||
cy.getBySel('dashboard-component-tabs')
|
||||
.eq(2)
|
||||
.find('[data-test="nav-list"] .antd5-tabs-nav-list > .antd5-tabs-tab')
|
||||
.find('[data-test="nav-list"] .ant-tabs-nav-list > .ant-tabs-tab')
|
||||
.as('row-level-tabs');
|
||||
|
||||
cy.get('@row-level-tabs').last().click();
|
||||
@@ -118,7 +118,7 @@ describe('Dashboard tabs', () => {
|
||||
|
||||
cy.intercept('**/superset/explore_json/?*').as('legacyChartData');
|
||||
// click row level tab, send 1 more query
|
||||
cy.get('.antd5-tabs-tab').contains('row tab 2').click();
|
||||
cy.get('.ant-tabs-tab').contains('row tab 2').click();
|
||||
|
||||
cy.wait('@legacyChartData').then(({ request }) => {
|
||||
const requestBody = parsePostForm(request.body);
|
||||
@@ -134,7 +134,7 @@ describe('Dashboard tabs', () => {
|
||||
cy.intercept('POST', '**/api/v1/chart/data?*').as('v1ChartData');
|
||||
|
||||
// click top level tab, send 1 more query
|
||||
cy.get('.antd5-tabs-tab').contains('Tab B').click();
|
||||
cy.get('.ant-tabs-tab').contains('Tab B').click();
|
||||
|
||||
cy.wait('@v1ChartData').then(({ request }) => {
|
||||
expect(request.body.queries[0].filters[0]).deep.eq({
|
||||
@@ -146,8 +146,8 @@ describe('Dashboard tabs', () => {
|
||||
|
||||
getChartAliasBySpec(BOX_PLOT).then(boxPlotAlias => {
|
||||
// navigate to filter and clear filter
|
||||
cy.get('.antd5-tabs-tab').contains('Tab A').click();
|
||||
cy.get('.antd5-tabs-tab').contains('row tab 1').click();
|
||||
cy.get('.ant-tabs-tab').contains('Tab A').click();
|
||||
cy.get('.ant-tabs-tab').contains('row tab 1').click();
|
||||
|
||||
cy.get('.Select__clear-indicator').click();
|
||||
cy.get('.filter button:not(:disabled)').contains('Apply').click();
|
||||
@@ -170,7 +170,7 @@ describe('Dashboard tabs', () => {
|
||||
cy.get('@top-level-tabs').last().click();
|
||||
cy.get('@top-level-tabs')
|
||||
.last()
|
||||
.should('have.class', 'antd5-tabs-tab-active');
|
||||
.should('have.class', 'ant-tabs-tab-active');
|
||||
|
||||
expandFilterOnLeftPanel();
|
||||
|
||||
@@ -179,7 +179,7 @@ describe('Dashboard tabs', () => {
|
||||
cy.get('@top-level-tabs').first().click();
|
||||
cy.get('@top-level-tabs')
|
||||
.first()
|
||||
.should('have.class', 'antd5-tabs-tab-active');
|
||||
.should('have.class', 'ant-tabs-tab-active');
|
||||
|
||||
cy.wait(1000);
|
||||
|
||||
|
||||
@@ -456,19 +456,19 @@ export function applyAdvancedTimeRangeFilterOnDashboard(
|
||||
endRange?: string,
|
||||
) {
|
||||
cy.get('.control-label').contains('RANGE TYPE').should('be.visible');
|
||||
cy.get('.antd5-popover-content .antd5-select-selector')
|
||||
cy.get('.ant-popover-content .ant-select-selector')
|
||||
.should('be.visible')
|
||||
.click();
|
||||
cy.get(`[label="Advanced"]`).should('be.visible').click();
|
||||
cy.get('.section-title').contains('Advanced Time Range').should('be.visible');
|
||||
if (startRange) {
|
||||
cy.get('.antd5-popover-inner-content')
|
||||
cy.get('.ant-popover-inner-content')
|
||||
.find('[class^=ant-input]')
|
||||
.first()
|
||||
.type(`${startRange}`);
|
||||
}
|
||||
if (endRange) {
|
||||
cy.get('.antd5-popover-inner-content')
|
||||
cy.get('.ant-popover-inner-content')
|
||||
.find('[class^=ant-input]')
|
||||
.last()
|
||||
.type(`${endRange}`);
|
||||
@@ -499,7 +499,7 @@ export function inputNativeFilterDefaultValue(
|
||||
)
|
||||
.eq(1)
|
||||
.within(() => {
|
||||
cy.get('.antd5-select-selection-search-input').type(
|
||||
cy.get('.ant-select-selection-search-input').type(
|
||||
`${defaultValue}{enter}`,
|
||||
{ force: true },
|
||||
);
|
||||
@@ -507,10 +507,8 @@ export function inputNativeFilterDefaultValue(
|
||||
});
|
||||
} else {
|
||||
cy.getBySel('default-input').within(() => {
|
||||
cy.get('.antd5-select-selection-search-input').click();
|
||||
cy.get('.antd5-select-item-option-content')
|
||||
.contains(defaultValue)
|
||||
.click();
|
||||
cy.get('.ant-select-selection-search-input').click();
|
||||
cy.get('.ant-select-item-option-content').contains(defaultValue).click();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ describe('Dashboards list', () => {
|
||||
it('should bulk select in list mode', () => {
|
||||
toggleBulkSelect();
|
||||
cy.get('[aria-label="Select all"]').click();
|
||||
cy.get('.antd5-checkbox-input')
|
||||
cy.get('.ant-checkbox-input')
|
||||
.should('be.checked')
|
||||
.should('have.length', 6);
|
||||
cy.getBySel('bulk-select-copy').contains('5 Selected');
|
||||
|
||||
@@ -66,7 +66,7 @@ describe('Add database', () => {
|
||||
cy.focused().type('badhost', { force: true });
|
||||
cy.get('input[name="port"]').focus();
|
||||
cy.focused().type('5432', { force: true });
|
||||
cy.get('.antd5-form-item-explain-error').contains(
|
||||
cy.get('.ant-form-item-explain-error').contains(
|
||||
"The hostname provided can't be resolved",
|
||||
);
|
||||
});
|
||||
@@ -79,6 +79,6 @@ describe('Add database', () => {
|
||||
cy.get('input[name="port"]').focus();
|
||||
cy.focused().type('123', { force: true });
|
||||
cy.get('input[name="database"]').focus();
|
||||
cy.get('.antd5-form-item-explain-error').contains('The port is closed');
|
||||
cy.get('.ant-form-item-explain-error').contains('The port is closed');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,8 +44,8 @@ describe.skip('AdhocFilters', () => {
|
||||
|
||||
// antd tabs do lazy loading, so we need to click on tab with ace editor
|
||||
cy.get('#filter-edit-popover').within(() => {
|
||||
cy.get('.antd5-tabs-tab').contains('Custom SQL').click();
|
||||
cy.get('.antd5-tabs-tab').contains('Simple').click();
|
||||
cy.get('.ant-tabs-tab').contains('Custom SQL').click();
|
||||
cy.get('.ant-tabs-tab').contains('Simple').click();
|
||||
});
|
||||
|
||||
cy.get('script').then(nodes => {
|
||||
|
||||
@@ -29,11 +29,11 @@ describe('Advanced analytics', () => {
|
||||
cy.visitChartByName('Num Births Trend');
|
||||
cy.verifySliceSuccess({ waitAlias: '@v1Data' });
|
||||
|
||||
cy.get('.antd5-collapse-header')
|
||||
cy.get('.ant-collapse-header')
|
||||
.contains('Advanced analytics')
|
||||
.click({ force: true });
|
||||
|
||||
cy.get('[data-test=time_compare]').find('.antd5-select').click();
|
||||
cy.get('[data-test=time_compare]').find('.ant-select').click();
|
||||
cy.get('[data-test=time_compare]')
|
||||
.find('input[type=search]')
|
||||
.type('28 days{enter}');
|
||||
@@ -52,14 +52,14 @@ describe('Advanced analytics', () => {
|
||||
waitAlias: '@v1Data',
|
||||
});
|
||||
cy.wait('@getExplore');
|
||||
cy.get('.antd5-collapse-header')
|
||||
cy.get('.ant-collapse-header')
|
||||
.contains('Advanced analytics')
|
||||
.click({ force: true });
|
||||
cy.get('[data-test=time_compare]')
|
||||
.find('.antd5-select-selector')
|
||||
.find('.ant-select-selector')
|
||||
.contains('28 days');
|
||||
cy.get('[data-test=time_compare]')
|
||||
.find('.antd5-select-selector')
|
||||
.find('.ant-select-selector')
|
||||
.contains('1 year');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -31,35 +31,35 @@ const SAMPLE_DASHBOARDS_INDEXES = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
|
||||
|
||||
function openDashboardsAddedTo() {
|
||||
cy.getBySel('actions-trigger').should('be.visible').click();
|
||||
cy.get('.antd5-dropdown-menu-submenu-title')
|
||||
cy.get('.ant-dropdown-menu-submenu-title')
|
||||
.contains('On dashboards')
|
||||
.trigger('mouseover', { force: true });
|
||||
}
|
||||
|
||||
function closeDashboardsAddedTo() {
|
||||
cy.get('.antd5-dropdown-menu-submenu-title')
|
||||
cy.get('.ant-dropdown-menu-submenu-title')
|
||||
.contains('On dashboards')
|
||||
.trigger('mouseout', { force: true });
|
||||
cy.getBySel('actions-trigger').click();
|
||||
}
|
||||
|
||||
function verifyDashboardsSubmenuItem(dashboardName) {
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup').contains(dashboardName);
|
||||
cy.get('.ant-dropdown-menu-submenu-popup').contains(dashboardName);
|
||||
closeDashboardsAddedTo();
|
||||
}
|
||||
|
||||
function verifyDashboardSearch() {
|
||||
openDashboardsAddedTo();
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup').trigger('mouseover');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup')
|
||||
cy.get('.ant-dropdown-menu-submenu-popup').trigger('mouseover');
|
||||
cy.get('.ant-dropdown-menu-submenu-popup')
|
||||
.find('input[placeholder="Search"]')
|
||||
.type('1');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup').contains('1 - Sample dashboard');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup')
|
||||
cy.get('.ant-dropdown-menu-submenu-popup').contains('1 - Sample dashboard');
|
||||
cy.get('.ant-dropdown-menu-submenu-popup')
|
||||
.find('input[placeholder="Search"]')
|
||||
.type('Blahblah');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup').contains('No results found');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup')
|
||||
cy.get('.ant-dropdown-menu-submenu-popup').contains('No results found');
|
||||
cy.get('.ant-dropdown-menu-submenu-popup')
|
||||
.find('[aria-label="close-circle"]')
|
||||
.click();
|
||||
closeDashboardsAddedTo();
|
||||
@@ -68,8 +68,8 @@ function verifyDashboardSearch() {
|
||||
function verifyDashboardLink() {
|
||||
interceptDashboardGet();
|
||||
openDashboardsAddedTo();
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup').trigger('mouseover');
|
||||
cy.get('.antd5-dropdown-menu-submenu-popup a')
|
||||
cy.get('.ant-dropdown-menu-submenu-popup').trigger('mouseover');
|
||||
cy.get('.ant-dropdown-menu-submenu-popup a')
|
||||
.first()
|
||||
.invoke('removeAttr', 'target')
|
||||
.click();
|
||||
|
||||
@@ -40,18 +40,18 @@ describe('Datasource control', () => {
|
||||
// create new metric
|
||||
cy.get('[data-test="crud-add-table-item"]', { timeout: 10000 }).click();
|
||||
cy.wait(1000);
|
||||
cy.get('.antd5-table-body [data-test="textarea-editable-title-input"]')
|
||||
cy.get('.ant-table-body [data-test="textarea-editable-title-input"]')
|
||||
.first()
|
||||
.click();
|
||||
|
||||
cy.get('.antd5-table-body [data-test="textarea-editable-title-input"]')
|
||||
cy.get('.ant-table-body [data-test="textarea-editable-title-input"]')
|
||||
.first()
|
||||
.focus();
|
||||
cy.focused().clear({ force: true });
|
||||
cy.focused().type(`${newMetricName}{enter}`, { force: true });
|
||||
|
||||
cy.get('[data-test="datasource-modal-save"]').click();
|
||||
cy.get('.antd5-modal-confirm-btns button').contains('OK').click();
|
||||
cy.get('.ant-modal-confirm-btns button').contains('OK').click();
|
||||
// select new metric
|
||||
cy.get('[data-test=metrics]')
|
||||
.contains('Drop columns/metrics here or click')
|
||||
@@ -66,7 +66,7 @@ describe('Datasource control', () => {
|
||||
// delete metric
|
||||
cy.get('[data-test="datasource-menu-trigger"]').click();
|
||||
cy.get('[data-test="edit-dataset"]').click();
|
||||
cy.get('.antd5-modal-content').within(() => {
|
||||
cy.get('.ant-modal-content').within(() => {
|
||||
cy.get('[data-test="collection-tab-Metrics"]')
|
||||
.contains('Metrics')
|
||||
.click();
|
||||
@@ -77,7 +77,7 @@ describe('Datasource control', () => {
|
||||
.find('[data-test="crud-delete-icon"]')
|
||||
.click();
|
||||
cy.get('[data-test="datasource-modal-save"]').click();
|
||||
cy.get('.antd5-modal-confirm-btns button').contains('OK').click();
|
||||
cy.get('.ant-modal-confirm-btns button').contains('OK').click();
|
||||
cy.get('[data-test="metrics"]').contains(newMetricName).should('not.exist');
|
||||
});
|
||||
});
|
||||
@@ -92,10 +92,10 @@ describe('Color scheme control', () => {
|
||||
|
||||
it('should show color options with and without tooltips', () => {
|
||||
cy.get('#controlSections-tab-CUSTOMIZE').click();
|
||||
cy.get('.antd5-select-selection-item .color-scheme-label').contains(
|
||||
cy.get('.ant-select-selection-item .color-scheme-label').contains(
|
||||
'Superset Colors',
|
||||
);
|
||||
cy.get('.antd5-select-selection-item .color-scheme-label').trigger(
|
||||
cy.get('.ant-select-selection-item .color-scheme-label').trigger(
|
||||
'mouseover',
|
||||
);
|
||||
cy.get('.color-scheme-tooltip').should('be.visible');
|
||||
@@ -129,7 +129,7 @@ describe('VizType control', () => {
|
||||
|
||||
cy.contains('View all charts').click();
|
||||
|
||||
cy.get('.antd5-modal-content').within(() => {
|
||||
cy.get('.ant-modal-content').within(() => {
|
||||
cy.get('button').contains('KPI').click(); // change categories
|
||||
cy.get('[role="button"]').contains('Big Number').click();
|
||||
cy.get('button').contains('Select').click();
|
||||
@@ -159,7 +159,7 @@ describe('Test datatable', () => {
|
||||
).as('Samples');
|
||||
cy.contains('Samples').click();
|
||||
cy.wait('@Samples');
|
||||
cy.get('.antd5-tabs-tab-active').contains('Samples');
|
||||
cy.get('.ant-tabs-tab-active').contains('Samples');
|
||||
cy.get('[data-test="row-count-label"]').contains('1k rows');
|
||||
cy.get('.ant-empty-description').should('not.exist');
|
||||
});
|
||||
|
||||
@@ -42,8 +42,8 @@ describe('Test explore links', () => {
|
||||
cy.wait('@chartData').then(() => {
|
||||
cy.get('code');
|
||||
});
|
||||
cy.get('.antd5-modal-content').within(() => {
|
||||
cy.get('button.antd5-modal-close').first().click({ force: true });
|
||||
cy.get('.ant-modal-content').within(() => {
|
||||
cy.get('button.ant-modal-close').first().click({ force: true });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -124,7 +124,7 @@ describe('Test explore links', () => {
|
||||
.find('input[aria-label="Select a dashboard"]')
|
||||
.type(`${dashboardTitle}`, { force: true });
|
||||
|
||||
cy.get(`.antd5-select-item[title="${dashboardTitle}"]`).click({
|
||||
cy.get(`.ant-select-item[title="${dashboardTitle}"]`).click({
|
||||
force: true,
|
||||
});
|
||||
|
||||
@@ -157,7 +157,7 @@ describe('Test explore links', () => {
|
||||
.find('input[aria-label="Select a dashboard"]')
|
||||
.type(`${dashboardTitle}{enter}`, { force: true });
|
||||
|
||||
cy.get(`.antd5-select-item[title="${dashboardTitle}"]`).click({
|
||||
cy.get(`.ant-select-item[title="${dashboardTitle}"]`).click({
|
||||
force: true,
|
||||
});
|
||||
|
||||
|
||||
@@ -83,11 +83,11 @@ export function saveChartToDashboard(chartName: string, dashboardName: string) {
|
||||
cy.wait(500);
|
||||
cy.wrap($modal)
|
||||
.find(
|
||||
'.antd5-select-selection-search-input[aria-label="Select a dashboard"]',
|
||||
'.ant-select-selection-search-input[aria-label="Select a dashboard"]',
|
||||
)
|
||||
.type(dashboardName, { force: true });
|
||||
cy.wrap($modal)
|
||||
.find(`.antd5-select-item-option[title="${dashboardName}"]`)
|
||||
.find(`.ant-select-item-option[title="${dashboardName}"]`)
|
||||
.click();
|
||||
cy.getBySel('btn-modal-save').click();
|
||||
cy.wait('@update');
|
||||
|
||||
@@ -54,7 +54,7 @@ describe('Visualization > Box Plot', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('supersetColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="supersetColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="supersetColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('Visualization > Bubble', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('supersetColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="supersetColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="supersetColors"]',
|
||||
).should('exist');
|
||||
cy.get('[data-test=run-query-button]').click();
|
||||
cy.get('.bubble .nv-legend .nv-legend-symbol').should(
|
||||
|
||||
@@ -94,7 +94,7 @@ describe('Visualization > Compare', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('supersetColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="supersetColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="supersetColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -36,10 +36,10 @@ describe('Download Chart > Bar chart', () => {
|
||||
};
|
||||
|
||||
cy.visitChartByParams(formData);
|
||||
cy.get('.header-with-actions .antd5-dropdown-trigger').click();
|
||||
cy.get(':nth-child(3) > .antd5-dropdown-menu-submenu-title').click();
|
||||
cy.get('.header-with-actions .ant-dropdown-trigger').click();
|
||||
cy.get(':nth-child(3) > .ant-dropdown-menu-submenu-title').click();
|
||||
cy.get(
|
||||
'.antd5-dropdown-menu-submenu > .antd5-dropdown-menu li:nth-child(3)',
|
||||
'.ant-dropdown-menu-submenu > .ant-dropdown-menu li:nth-child(3)',
|
||||
).click();
|
||||
cy.verifyDownload('.jpg', {
|
||||
contains: true,
|
||||
|
||||
@@ -69,7 +69,7 @@ describe('Visualization > Gauge', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('bnbColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="bnbColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="bnbColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -85,7 +85,7 @@ describe('Visualization > Graph', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('bnbColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="bnbColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="bnbColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -76,7 +76,7 @@ describe('Visualization > Pie', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('supersetColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="supersetColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="supersetColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -91,7 +91,7 @@ describe('Visualization > Sunburst', () => {
|
||||
cy.get('.Control[data-test="color_scheme"] input[type="search"]').focus();
|
||||
cy.focused().type('supersetColors{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="color_scheme"] .antd5-select-selection-item [data-test="supersetColors"]',
|
||||
'.Control[data-test="color_scheme"] .ant-select-selection-item [data-test="supersetColors"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -194,7 +194,7 @@ describe('Visualization > Table', () => {
|
||||
|
||||
// should display in raw records mode
|
||||
cy.get(
|
||||
'div[data-test="query_mode"] .antd5-radio-button-wrapper-checked',
|
||||
'div[data-test="query_mode"] .ant-radio-button-wrapper-checked',
|
||||
).contains('Raw records');
|
||||
cy.get('div[data-test="all_columns"]').should('be.visible');
|
||||
cy.get('div[data-test="groupby"]').should('not.exist');
|
||||
@@ -203,11 +203,11 @@ describe('Visualization > Table', () => {
|
||||
cy.get('[data-test="row-count-label"]').contains('100 rows');
|
||||
|
||||
// should allow switch back to aggregate mode
|
||||
cy.get('div[data-test="query_mode"] .antd5-radio-button-wrapper')
|
||||
cy.get('div[data-test="query_mode"] .ant-radio-button-wrapper')
|
||||
.contains('Aggregate')
|
||||
.click();
|
||||
cy.get(
|
||||
'div[data-test="query_mode"] .antd5-radio-button-wrapper-checked',
|
||||
'div[data-test="query_mode"] .ant-radio-button-wrapper-checked',
|
||||
).contains('Aggregate');
|
||||
cy.get('div[data-test="all_columns"]').should('not.exist');
|
||||
cy.get('div[data-test="groupby"]').should('be.visible');
|
||||
@@ -276,7 +276,7 @@ describe('Visualization > Table', () => {
|
||||
|
||||
// Type 200000 and press enter to select the option
|
||||
cy.get('div[aria-label="Row limit"]')
|
||||
.find('.antd5-select-selection-search-input:visible')
|
||||
.find('.ant-select-selection-search-input:visible')
|
||||
.type('200000{enter}');
|
||||
|
||||
// Verify that there is no error tooltip when server pagination is enabled
|
||||
@@ -292,14 +292,14 @@ describe('Visualization > Table', () => {
|
||||
cy.get('[data-test="error-tooltip"]').trigger('mouseover');
|
||||
|
||||
// Verify tooltip content
|
||||
cy.get('.antd5-tooltip-inner').should('be.visible');
|
||||
cy.get('.antd5-tooltip-inner').should(
|
||||
cy.get('.ant-tooltip-inner').should('be.visible');
|
||||
cy.get('.ant-tooltip-inner').should(
|
||||
'contain',
|
||||
'Server pagination needs to be enabled for values over',
|
||||
);
|
||||
|
||||
// Hide the tooltip by adding display:none style
|
||||
cy.get('.antd5-tooltip').invoke('attr', 'style', 'display: none');
|
||||
cy.get('.ant-tooltip').invoke('attr', 'style', 'display: none');
|
||||
|
||||
// Enable server pagination again
|
||||
cy.get(serverPaginationSelector).click();
|
||||
@@ -310,7 +310,7 @@ describe('Visualization > Table', () => {
|
||||
|
||||
// Type 1000000
|
||||
cy.get('div[aria-label="Row limit"]')
|
||||
.find('.antd5-select-selection-search-input:visible')
|
||||
.find('.ant-select-selection-search-input:visible')
|
||||
.type('1000000');
|
||||
|
||||
// Wait for 1 second
|
||||
@@ -318,7 +318,7 @@ describe('Visualization > Table', () => {
|
||||
|
||||
// Press enter
|
||||
cy.get('div[aria-label="Row limit"]')
|
||||
.find('.antd5-select-selection-search-input:visible')
|
||||
.find('.ant-select-selection-search-input:visible')
|
||||
.type('{enter}');
|
||||
|
||||
// Wait for error tooltip to appear and verify its content
|
||||
@@ -327,11 +327,11 @@ describe('Visualization > Table', () => {
|
||||
.trigger('mouseover');
|
||||
|
||||
// Wait for tooltip content and verify
|
||||
cy.get('.antd5-tooltip-inner').should('exist');
|
||||
cy.get('.antd5-tooltip-inner').should('be.visible');
|
||||
cy.get('.ant-tooltip-inner').should('exist');
|
||||
cy.get('.ant-tooltip-inner').should('be.visible');
|
||||
|
||||
// Verify tooltip content separately
|
||||
cy.get('.antd5-tooltip-inner').should('contain', 'Value cannot exceed');
|
||||
cy.get('.ant-tooltip-inner').should('contain', 'Value cannot exceed');
|
||||
});
|
||||
|
||||
it('Test sorting with server pagination enabled', () => {
|
||||
@@ -452,11 +452,11 @@ describe('Visualization > Table', () => {
|
||||
|
||||
cy.get('.search-select').click();
|
||||
|
||||
cy.get('.antd5-select-dropdown').should('be.visible');
|
||||
cy.get('.ant-select-dropdown').should('be.visible');
|
||||
|
||||
cy.get('.antd5-select-item-option').contains('state').should('be.visible');
|
||||
cy.get('.ant-select-item-option').contains('state').should('be.visible');
|
||||
|
||||
cy.get('.antd5-select-item-option').contains('state').click();
|
||||
cy.get('.ant-select-item-option').contains('state').click();
|
||||
|
||||
cy.get(searchInputSelector).clear();
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ describe('Visualization > World Map', () => {
|
||||
).focus();
|
||||
cy.focused().type('greens{enter}');
|
||||
cy.get(
|
||||
'.Control[data-test="linear_color_scheme"] .antd5-select-selection-item [data-test="greens"]',
|
||||
'.Control[data-test="linear_color_scheme"] .ant-select-selection-item [data-test="greens"]',
|
||||
).should('exist');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ describe('SqlLab query panel', () => {
|
||||
cy.wait('@queryFinished');
|
||||
|
||||
cy.get(
|
||||
'.SouthPane .antd5-tabs-content > .antd5-tabs-tabpane-active > div button:first',
|
||||
'.SouthPane .ant-tabs-content > .ant-tabs-tabpane-active > div button:first',
|
||||
{ timeout: 10000 },
|
||||
).click();
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@ describe('SqlLab query tabs', () => {
|
||||
// configure some editor settings
|
||||
cy.get(editorInput).type('some random query string', { force: true });
|
||||
cy.get(queryLimitSelector).parent().click({ force: true });
|
||||
cy.get('.antd5-dropdown-menu')
|
||||
cy.get('.ant-dropdown-menu')
|
||||
.last()
|
||||
.find('.antd5-dropdown-menu-item')
|
||||
.find('.ant-dropdown-menu-item')
|
||||
.first()
|
||||
.click({ force: true });
|
||||
|
||||
|
||||
@@ -25,43 +25,43 @@ export function dataTestChartName(chartName: string): string {
|
||||
|
||||
export const pageHeader = {
|
||||
logo: '.navbar-brand > img',
|
||||
headerNavigationItem: '.antd5-menu-submenu-title',
|
||||
headerNavigationItem: '.ant-menu-submenu-title',
|
||||
headerNavigationDropdown: "[aria-label='triangle-down']",
|
||||
headerNavigationItemMenu: '.antd5-menu-item-group-list',
|
||||
plusIcon: ':nth-child(2) > .antd5-menu-submenu-title',
|
||||
headerNavigationItemMenu: '.ant-menu-item-group-list',
|
||||
plusIcon: ':nth-child(2) > .ant-menu-submenu-title',
|
||||
plusIconMenuOptions: {
|
||||
sqlQueryOption: dataTestLocator('menu-item-SQL query'),
|
||||
chartOption: dataTestLocator('menu-item-Chart'),
|
||||
dashboardOption: dataTestLocator('menu-item-Dashboard'),
|
||||
},
|
||||
plusMenu: '.antd5-menu-submenu-popup',
|
||||
plusMenu: '.ant-menu-submenu-popup',
|
||||
barButtons: '[role="presentation"]',
|
||||
sqlLabMenu: '[id="item_3$Menu"]',
|
||||
dataMenu: '[id="item_4$Menu"]',
|
||||
};
|
||||
|
||||
export const profile = {
|
||||
activeTab: '.antd5-tabs-tab-active',
|
||||
inactiveTab: '.antd5-tabs-tab',
|
||||
activeTab: '.ant-tabs-tab-active',
|
||||
inactiveTab: '.ant-tabs-tab',
|
||||
emptyFavoritedPlaceholder: '.ant-empty-normal',
|
||||
tableRow: '.table-row',
|
||||
favoritesSpace: '#rc-tabs-0-panel-2',
|
||||
};
|
||||
export const securityAccess = {
|
||||
rolesBubble: '.antd5-badge-count',
|
||||
rolesBubble: '.ant-badge-count',
|
||||
};
|
||||
export const homePage = {
|
||||
homeSection: {
|
||||
sectionArea: '.antd5-collapse-content-box',
|
||||
sectionElement: '.antd5-card-meta-title',
|
||||
sectionArea: '.ant-collapse-content-box',
|
||||
sectionElement: '.ant-card-meta-title',
|
||||
},
|
||||
sections: {
|
||||
expandedSection: '.antd5-collapse-item-active',
|
||||
expandedSection: '.ant-collapse-item-active',
|
||||
expandedSectionHeader: '[aria-expanded="true"]',
|
||||
collapseExpandButton: '.antd5-collapse-arrow',
|
||||
collapsedSection: '[class="antd5-collapse-item"]',
|
||||
collapseExpandButton: '.ant-collapse-arrow',
|
||||
collapsedSection: '[class="ant-collapse-item"]',
|
||||
collapsedSectionHeader: '[aria-expanded="false"]',
|
||||
section: '[class^="antd5-collapse-item"]',
|
||||
section: '[class^="ant-collapse-item"]',
|
||||
sectionsMenuContainer: "[role='navigation']",
|
||||
sectionsMenuItem: "[role='menuitem']",
|
||||
card: dataTestLocator('styled-card'),
|
||||
@@ -91,28 +91,28 @@ export const databasesPage = {
|
||||
preferredBlockSheets: '.preferred > :nth-child(6)',
|
||||
supportedDatabasesText: '.control-label',
|
||||
orChoose: '.available-label',
|
||||
dbDropdown: '[class="antd5-select-selection-search-input"]',
|
||||
dbDropdown: '[class="ant-select-selection-search-input"]',
|
||||
dbDropdownMenu: '.rc-virtual-list-holder-inner',
|
||||
dbDropdownMenuItem: '[class="antd5-select-item-option-content"]',
|
||||
infoAlert: '.antd5-alert',
|
||||
dbDropdownMenuItem: '[class="ant-select-item-option-content"]',
|
||||
infoAlert: '.ant-alert',
|
||||
serviceAccountInput: '[name="credentials_info"]',
|
||||
connectionStep: {
|
||||
modal: '.antd5-modal-content',
|
||||
modalBody: '.antd5-modal-body',
|
||||
modal: '.ant-modal-content',
|
||||
modalBody: '.ant-modal-body',
|
||||
stepTitle: '.css-7x6kk > h4',
|
||||
helperBottom: '.helper-bottom',
|
||||
postgresDatabase: '[name="database"]',
|
||||
dbInput: '[name="database_name"]',
|
||||
alertMessage: '.antd5-alert-message',
|
||||
alertMessage: '.ant-alert-message',
|
||||
errorField: '[role="alert"]',
|
||||
uploadJson: '[title="Upload JSON file"]',
|
||||
chooseFile: '[class="antd5-btn input-upload-btn"]',
|
||||
chooseFile: '[class="ant-btn input-upload-btn"]',
|
||||
additionalParameters: '[name="query_input"]',
|
||||
sqlAlchemyUriInput: dataTestLocator('sqlalchemy-uri-input'),
|
||||
advancedTab: '#rc-tabs-0-tab-2',
|
||||
activeTab: '.antd5-tabs-tab-active',
|
||||
activeTab: '.ant-tabs-tab-active',
|
||||
securitySubMenu:
|
||||
':nth-child(3) > .antd5-collapse-header > .anticon > svg > path',
|
||||
':nth-child(3) > .ant-collapse-header > .anticon > svg > path',
|
||||
aceTextInput: '.ace_text-input',
|
||||
aceContent: '.ace_content',
|
||||
connectButton: '.css-16i3wh7',
|
||||
@@ -136,21 +136,21 @@ export const sqlLabView = {
|
||||
},
|
||||
databaseInput: '[data-test=DatabaseSelector] > :nth-child(1)',
|
||||
emptyMenuOptionsPlaceholder: '[class="ant-empty-img-simple"]',
|
||||
removeTabButton: '.antd5-tabs-tab-remove > .anticon > svg',
|
||||
tabsNavList: "[class='antd5-tabs-nav-list']",
|
||||
tab: "[class='antd5-tabs-tab-btn']",
|
||||
removeTabButton: '.ant-tabs-tab-remove > .anticon > svg',
|
||||
tabsNavList: "[class='ant-tabs-nav-list']",
|
||||
tab: "[class='ant-tabs-tab-btn']",
|
||||
addTabButton: dataTestLocator('add-tab-icon'),
|
||||
tooltip: '.antd5-tooltip-content',
|
||||
tooltip: '.ant-tooltip-content',
|
||||
tabName: '.css-1suejie',
|
||||
schemaInput: '[data-test=DatabaseSelector] > :nth-child(2)',
|
||||
loadingIndicator: '.Select__loading-indicator',
|
||||
menuItem: '[class="antd5-select-item-option-content"]',
|
||||
menuItem: '[class="ant-select-item-option-content"]',
|
||||
examplesMenuItem: '[title="examples"]',
|
||||
tableInput: ':nth-child(4) > .select > :nth-child(1)',
|
||||
sqlEditor: '#brace-editor textarea',
|
||||
saveAsButton: '.SaveQuery > .antd5-btn',
|
||||
saveAsButton: '.SaveQuery > .ant-btn',
|
||||
saveAsModal: {
|
||||
footer: '.antd5-modal-footer',
|
||||
footer: '.ant-modal-footer',
|
||||
queryNameInput: 'input[class^="ant-input"]',
|
||||
},
|
||||
sqlToolbar: {
|
||||
@@ -158,15 +158,15 @@ export const sqlLabView = {
|
||||
runButton: '.css-d3dxop',
|
||||
},
|
||||
rowsLimit: {
|
||||
dropdown: '.antd5-dropdown-menu',
|
||||
limitButton: '.antd5-dropdown-menu-item',
|
||||
dropdown: '.ant-dropdown-menu',
|
||||
limitButton: '.ant-dropdown-menu-item',
|
||||
limitButtonText: '.css-151uxnz',
|
||||
limitTextWithValue: '[class="antd5-dropdown-trigger"]',
|
||||
limitTextWithValue: '[class="ant-dropdown-trigger"]',
|
||||
},
|
||||
renderedTableHeader: '.ReactVirtualized__Table__headerRow',
|
||||
renderedTableRow: '.ReactVirtualized__Table__row',
|
||||
errorBody: '.error-body',
|
||||
alertMessage: '.antd5-alert-message',
|
||||
alertMessage: '.ant-alert-message',
|
||||
historyTable: {
|
||||
header: '[role=columnheader]',
|
||||
table: '.QueryTable',
|
||||
@@ -195,16 +195,16 @@ export const savedQuery = {
|
||||
export const annotationLayersView = {
|
||||
emptyDescription: {
|
||||
description: '.ant-empty-description',
|
||||
addAnnotationLayerButton: '.ant-empty-footer > .antd5-btn',
|
||||
addAnnotationLayerButton: '.ant-empty-footer > .ant-btn',
|
||||
},
|
||||
modal: {
|
||||
content: {
|
||||
content: '.antd5-modal-body',
|
||||
title: '.antd5-modal-body > :nth-child(2) > input',
|
||||
content: '.ant-modal-body',
|
||||
title: '.ant-modal-body > :nth-child(2) > input',
|
||||
description: "[name='descr']",
|
||||
},
|
||||
footer: {
|
||||
footer: '.antd5-modal-footer',
|
||||
footer: '.ant-modal-footer',
|
||||
addButton: dataTestLocator('modal-confirm-button'),
|
||||
cancelButton: dataTestLocator('modal-cancel-button'),
|
||||
},
|
||||
@@ -216,7 +216,7 @@ export const datasetsList = {
|
||||
newDatasetModal: {
|
||||
inputField: '[class="section"]',
|
||||
addButton: dataTestLocator('modal-confirm-button'),
|
||||
body: '.antd5-modal-body',
|
||||
body: '.ant-modal-body',
|
||||
},
|
||||
table: {
|
||||
tableRow: {
|
||||
@@ -261,7 +261,7 @@ export const datasetsList = {
|
||||
},
|
||||
},
|
||||
deleteDatasetModal: {
|
||||
modal: '.antd5-modal-content',
|
||||
modal: '.ant-modal-content',
|
||||
deleteInput: dataTestLocator('delete-modal-input'),
|
||||
deleteButton: dataTestLocator('modal-confirm-button'),
|
||||
text: '.css-kxmt87',
|
||||
@@ -277,14 +277,14 @@ export const chartListView = {
|
||||
header: {
|
||||
cardView: '[aria-label="card-view"]',
|
||||
listView: '[aria-label="list-view"]',
|
||||
sort: '[class="antd5-select-selection-search-input"][aria-label="Sort"]',
|
||||
sort: '[class="ant-select-selection-search-input"][aria-label="Sort"]',
|
||||
sortRecentlyModifiedMenuOption: '[label="Recently modified"]',
|
||||
sortAlphabeticalMenuOption: '[label="Alphabetical"]',
|
||||
sortDropdown: '.Select__menu',
|
||||
},
|
||||
card: {
|
||||
card: dataTestLocator('styled-card'),
|
||||
cardCover: '[class="antd5-card-cover"]',
|
||||
cardCover: '[class="ant-card-cover"]',
|
||||
cardImage: '[class="gradient-container"]',
|
||||
starIcon: dataTestLocator('fave-unfave-icon'),
|
||||
},
|
||||
@@ -316,42 +316,42 @@ export const chartListView = {
|
||||
};
|
||||
export const nativeFilters = {
|
||||
modal: {
|
||||
container: '.antd5-modal',
|
||||
footer: '.antd5-modal-footer',
|
||||
container: '.ant-modal',
|
||||
footer: '.ant-modal-footer',
|
||||
saveButton: dataTestLocator('native-filter-modal-save-button'),
|
||||
cancelButton: dataTestLocator('native-filter-modal-cancel-button'),
|
||||
confirmCancelButton: dataTestLocator(
|
||||
'native-filter-modal-confirm-cancel-button',
|
||||
),
|
||||
alertXUnsavedFilters: '.antd5-alert-message',
|
||||
alertXUnsavedFilters: '.ant-alert-message',
|
||||
tabsList: {
|
||||
filterItemsContainer: dataTestLocator('filter-title-container'),
|
||||
tabsContainer: '[class="antd5-tabs-nav-list"]',
|
||||
tab: '.antd5-tabs-tab',
|
||||
tabsContainer: '[class="ant-tabs-nav-list"]',
|
||||
tab: '.ant-tabs-tab',
|
||||
removeTab: '[aria-label="delete"]',
|
||||
},
|
||||
addFilter: dataTestLocator('add-filter-button'),
|
||||
defaultValueCheck: '.antd5-checkbox-checked',
|
||||
defaultValueCheck: '.ant-checkbox-checked',
|
||||
addNewFilterButton: dataTestLocator('add-new-filter-button'),
|
||||
addNewDividerButton: dataTestLocator('add-new-divider-button'),
|
||||
},
|
||||
filtersPanel: {
|
||||
filterName: dataTestLocator('filters-config-modal__name-input'),
|
||||
datasetName: dataTestLocator('filters-config-modal__datasource-input'),
|
||||
filterInfoInput: '.antd5-select-selection-search-input',
|
||||
inputDropdown: '.antd5-select-item-option-content',
|
||||
columnEmptyInput: '.antd5-select-selection-placeholder',
|
||||
filterInfoInput: '.ant-select-selection-search-input',
|
||||
inputDropdown: '.ant-select-item-option-content',
|
||||
columnEmptyInput: '.ant-select-selection-placeholder',
|
||||
filterTypeInput: dataTestLocator('filters-config-modal__filter-type'),
|
||||
fieldInput: dataTestLocator('field-input'),
|
||||
filterTypeItem: '.antd5-select-selection-item',
|
||||
filterTypeItem: '.ant-select-selection-item',
|
||||
filterGear: dataTestLocator('filterbar-orientation-icon'),
|
||||
},
|
||||
filterFromDashboardView: {
|
||||
filterValueInput: '[class="antd5-select-selection-search-input"]',
|
||||
filterValueInput: '[class="ant-select-selection-search-input"]',
|
||||
expand: dataTestLocator('filter-bar__expand-button'),
|
||||
collapse: dataTestLocator('filter-bar__collapse-button'),
|
||||
filterName: dataTestLocator('filter-control-name'),
|
||||
filterContent: '.antd5-select-selection-item',
|
||||
filterContent: '.ant-select-selection-item',
|
||||
createFilterButton: dataTestLocator('filter-bar__create-filter'),
|
||||
timeRangeFilterContent: dataTestLocator('time-range-trigger'),
|
||||
},
|
||||
@@ -359,24 +359,24 @@ export const nativeFilters = {
|
||||
removeFilter: '[aria-label="remove"]',
|
||||
silentLoading: '.loading inline-centered css-101mkpk',
|
||||
filterConfigurationSections: {
|
||||
sectionHeader: '.antd5-collapse-header',
|
||||
sectionHeader: '.ant-collapse-header',
|
||||
displayedSection: 'div[style="height: 100%; overflow-y: auto;"]',
|
||||
collapseExpandButton: '.antd5-collapse-arrow',
|
||||
checkedCheckbox: '.antd5-checkbox-wrapper-checked',
|
||||
collapseExpandButton: '.ant-collapse-arrow',
|
||||
checkedCheckbox: '.ant-checkbox-wrapper-checked',
|
||||
infoTooltip: '[aria-label="Show info tooltip"]',
|
||||
parentFilterInput: dataTestLocator('parent-filter-input'),
|
||||
filterPlaceholder: '.antd5-select-selection-placeholder',
|
||||
collapsedSectionContainer: '[class="antd5-collapse-content-box"]',
|
||||
filterPlaceholder: '.ant-select-selection-placeholder',
|
||||
collapsedSectionContainer: '[class="ant-collapse-content-box"]',
|
||||
},
|
||||
filtersList: {
|
||||
list: '.antd5-tabs-nav-list',
|
||||
listItemNotActive: '[class="antd5-tabs-tab antd5-tabs-tab-with-remove"]',
|
||||
list: '.ant-tabs-nav-list',
|
||||
listItemNotActive: '[class="ant-tabs-tab ant-tabs-tab-with-remove"]',
|
||||
listItemActive:
|
||||
'[class="antd5-tabs-tab antd5-tabs-tab-with-remove antd5-tabs-tab-active"]',
|
||||
'[class="ant-tabs-tab ant-tabs-tab-with-remove ant-tabs-tab-active"]',
|
||||
removeIcon: '[aria-label="delete"]',
|
||||
},
|
||||
filterItem: dataTestLocator('form-item-value'),
|
||||
filterItemDropdown: '.antd5-select-selection-search',
|
||||
filterItemDropdown: '.ant-select-selection-search',
|
||||
applyFilter: dataTestLocator('filter-bar__apply-button'),
|
||||
defaultInput: dataTestLocator('default-input'),
|
||||
filterIcon: dataTestLocator('filter-icon'),
|
||||
@@ -398,7 +398,7 @@ export const dashboardListView = {
|
||||
},
|
||||
card: {
|
||||
card: dataTestLocator('styled-card'),
|
||||
cardCover: '[class="antd5-card-cover"]',
|
||||
cardCover: '[class="ant-card-cover"]',
|
||||
cardImage: '[class="gradient-container"]',
|
||||
selectedStarIcon: "[aria-label='star']",
|
||||
unselectedStarIcon: "[aria-label='star']",
|
||||
@@ -432,7 +432,7 @@ export const dashboardListView = {
|
||||
newDashboardButton: '.css-yff34v',
|
||||
},
|
||||
importModal: {
|
||||
selectFileButton: '.ant-upload > .antd5-btn > span',
|
||||
selectFileButton: '.ant-upload > .ant-btn > span',
|
||||
importButton: dataTestLocator('modal-confirm-button'),
|
||||
},
|
||||
header: {
|
||||
@@ -460,7 +460,7 @@ export const dashboardListView = {
|
||||
};
|
||||
export const exploreView = {
|
||||
openDatasourceMenu: dataTestLocator('open-datasource-tab'),
|
||||
sectionsHeader: '.antd5-collapse-header',
|
||||
sectionsHeader: '.ant-collapse-header',
|
||||
datasourceMenuThreeDots: dataTestLocator('datasource-menu-trigger'),
|
||||
threeDotsMenuDropdown: {
|
||||
editDataset: dataTestLocator('edit-dataset'),
|
||||
@@ -474,17 +474,17 @@ export const exploreView = {
|
||||
},
|
||||
chartAreaItem: '.nv-legend-text',
|
||||
viewQueryModal: {
|
||||
container: '.antd5-modal-content',
|
||||
closeButton: 'button.antd5-modal-close',
|
||||
container: '.ant-modal-content',
|
||||
closeButton: 'button.ant-modal-close',
|
||||
},
|
||||
embedCodeModal: {
|
||||
container: dataTestLocator('embed-code-popover'),
|
||||
textfield: dataTestLocator('embed-code-textarea'),
|
||||
},
|
||||
saveModal: {
|
||||
modal: '.antd5-modal-content',
|
||||
modal: '.ant-modal-content',
|
||||
chartNameInput: dataTestLocator('new-chart-name'),
|
||||
dashboardNameInput: '.antd5-select-selection-search-input',
|
||||
dashboardNameInput: '.ant-select-selection-search-input',
|
||||
addToDashboardInput: dataTestLocator(
|
||||
'save-chart-modal-select-dashboard-form',
|
||||
),
|
||||
@@ -495,7 +495,7 @@ export const exploreView = {
|
||||
},
|
||||
controlPanel: {
|
||||
panel: dataTestLocator('control-tabs'),
|
||||
categoryArea: '.antd5-collapse-content-box',
|
||||
categoryArea: '.ant-collapse-content-box',
|
||||
dragField: dataTestLocator('datasource'),
|
||||
metricsField: dataTestLocator('metrics'),
|
||||
optionField: dataTestLocator('option-label'),
|
||||
@@ -553,7 +553,7 @@ export const exploreView = {
|
||||
timeSection: {
|
||||
timeRangeFilter: dataTestLocator('time-range-trigger'),
|
||||
timeRangeFilterModal: {
|
||||
container: '.antd5-popover-content',
|
||||
container: '.ant-popover-content',
|
||||
footer: '.footer',
|
||||
cancelButton: dataTestLocator('cancel-button'),
|
||||
configureLastTimeRange: {
|
||||
@@ -578,15 +578,15 @@ export const exploreView = {
|
||||
},
|
||||
},
|
||||
editDatasetModal: {
|
||||
container: '.antd5-modal-content',
|
||||
container: '.ant-modal-content',
|
||||
datasetTabsContainer: dataTestLocator('edit-dataset-tabs'),
|
||||
saveButton: dataTestLocator('datasource-modal-save'),
|
||||
metricsTab: {
|
||||
addItem: dataTestLocator('crud-add-table-item'),
|
||||
rowsContainer: '.antd5-table-body',
|
||||
rowsContainer: '.ant-table-body',
|
||||
},
|
||||
confirmModal: {
|
||||
okButton: '.antd5-modal-confirm-btns .antd5-btn-primary',
|
||||
okButton: '.ant-modal-confirm-btns .ant-btn-primary',
|
||||
},
|
||||
},
|
||||
visualizationTypeModal: {
|
||||
@@ -594,8 +594,8 @@ export const exploreView = {
|
||||
},
|
||||
};
|
||||
export const createChartView = {
|
||||
chooseDatasetInput: '.antd5-select-selection-search-input',
|
||||
chooseDatasetOption: '.antd5-select-item-option-content',
|
||||
chooseDatasetInput: '.ant-select-selection-search-input',
|
||||
chooseDatasetOption: '.ant-select-item-option-content',
|
||||
chooseDatasetList: '.rc-virtual-list-holder-inner',
|
||||
tableVizType: "[alt='Table']",
|
||||
};
|
||||
@@ -606,8 +606,8 @@ export const editDashboardView = {
|
||||
discardChanges: dataTestLocator('discard-changes-button'),
|
||||
chartBox: dataTestLocator('chart-grid-component'),
|
||||
tabsList: {
|
||||
tabsContainer: '[class="antd5-tabs-nav-list"]',
|
||||
tab: '.antd5-tabs-tab',
|
||||
tabsContainer: '[class="ant-tabs-nav-list"]',
|
||||
tab: '.ant-tabs-tab',
|
||||
},
|
||||
};
|
||||
export const dashboardView = {
|
||||
@@ -617,12 +617,12 @@ export const dashboardView = {
|
||||
closeButton: dataTestLocator('close-button'),
|
||||
},
|
||||
saveModal: {
|
||||
modal: '.antd5-modal-content',
|
||||
modal: '.ant-modal-content',
|
||||
dashboardNameInput: '.ant-input',
|
||||
saveButton: dataTestLocator('modal-save-dashboard-button'),
|
||||
},
|
||||
dashboardProperties: {
|
||||
modal: '.antd5-modal-content',
|
||||
modal: '.ant-modal-content',
|
||||
dashboardTitleInput: dataTestLocator('dashboard-title-input'),
|
||||
modalButton: '[type="button"]',
|
||||
},
|
||||
@@ -631,7 +631,7 @@ export const dashboardView = {
|
||||
refreshChart: dataTestLocator('refresh-chart-menu-item'),
|
||||
},
|
||||
threeDotsMenuIcon:
|
||||
'.header-with-actions .right-button-panel .antd5-dropdown-trigger',
|
||||
'.header-with-actions .right-button-panel .ant-dropdown-trigger',
|
||||
threeDotsMenuDropdown: dataTestLocator('header-actions-menu'),
|
||||
refreshDashboard: dataTestLocator('refresh-dashboard-menu-item'),
|
||||
saveAsMenuOption: dataTestLocator('save-as-menu-item'),
|
||||
@@ -641,7 +641,7 @@ export const dashboardView = {
|
||||
secondTabSalesDashboard: dataTestLocator('dragdroppable-object'),
|
||||
},
|
||||
timeRangeModal: {
|
||||
rangeTypeField: '.antd5-select-selection-item',
|
||||
rangeTypeField: '.ant-select-selection-item',
|
||||
startTimeInputNumber: '.ant-input-number-input',
|
||||
datePicker: '.ant-picker-input',
|
||||
applyButton: dataTestLocator('date-filter-control__apply-button'),
|
||||
@@ -672,7 +672,7 @@ export const dashboardView = {
|
||||
tabsList: {
|
||||
tabsContainer: dataTestLocator('dashboard-component-tabs'),
|
||||
tabsNavList: dataTestLocator('nav-list'),
|
||||
tabs: '.antd5-tabs-nav-list',
|
||||
tab: '.antd5-tabs-tab',
|
||||
tabs: '.ant-tabs-nav-list',
|
||||
tab: '.ant-tabs-tab',
|
||||
},
|
||||
};
|
||||
|
||||
@@ -41,8 +41,8 @@ export function toggleBulkSelect() {
|
||||
|
||||
export function clearAllInputs() {
|
||||
cy.get('body').then($body => {
|
||||
if ($body.find('.antd5-select-clear').length) {
|
||||
cy.get('.antd5-select-clear').click({ multiple: true, force: true });
|
||||
if ($body.find('.ant-select-clear').length) {
|
||||
cy.get('.ant-select-clear').click({ multiple: true, force: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -165,7 +165,7 @@ export const setSelectSearchInput = (
|
||||
$input[0].dispatchEvent(new Event('input', { bubbles: true }));
|
||||
$input[0].dispatchEvent(new Event('change', { bubbles: true }));
|
||||
|
||||
cy.get('.antd5-select-item-option-content').should('exist').first().click({
|
||||
cy.get('.ant-select-item-option-content').should('exist').first().click({
|
||||
force: true,
|
||||
});
|
||||
};
|
||||
|
||||
@@ -16,10 +16,8 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
// timezone for unit tests
|
||||
process.env.TZ = 'America/New_York';
|
||||
|
||||
module.exports = {
|
||||
testRegex:
|
||||
'\\/superset-frontend\\/(spec|src|plugins|packages|tools)\\/.*(_spec|\\.test)\\.[jt]sx?$',
|
||||
@@ -55,7 +53,7 @@ module.exports = {
|
||||
],
|
||||
coverageReporters: ['lcov', 'json-summary', 'html', 'text'],
|
||||
transformIgnorePatterns: [
|
||||
'node_modules/(?!d3-(interpolate|color|time)|remark-gfm|markdown-table|micromark-*.|decode-named-character-reference|character-entities|mdast-util-*.|unist-util-*.|ccount|escape-string-regexp|nanoid|@rjsf/*.|sinon|echarts|zrender|fetch-mock|pretty-ms|parse-ms|ol|@babel/runtime|@emotion|cheerio|cheerio/lib|parse5|dom-serializer|entities|htmlparser2|rehype-sanitize|hast-util-sanitize|unified|unist-.*|hast-.*|rehype-.*|remark-.*|mdast-.*|micromark-.*|parse-entities|property-information|space-separated-tokens|comma-separated-tokens|bail|devlop|zwitch|longest-streak|jest-enzyme)',
|
||||
'node_modules/(?!d3-(interpolate|color|time)|remark-gfm|markdown-table|micromark-*.|decode-named-character-reference|character-entities|mdast-util-*.|unist-util-*.|ccount|escape-string-regexp|nanoid|@rjsf/*.|sinon|echarts|zrender|fetch-mock|pretty-ms|parse-ms|ol|@babel/runtime|@emotion|cheerio|cheerio/lib|parse5|dom-serializer|entities|htmlparser2|rehype-sanitize|hast-util-sanitize|unified|unist-.*|hast-.*|rehype-.*|remark-.*|mdast-.*|micromark-.*|parse-entities|property-information|space-separated-tokens|comma-separated-tokens|bail|devlop|zwitch|longest-streak|jest-enzyme|geostyler|geostyler-.*)',
|
||||
],
|
||||
preset: 'ts-jest',
|
||||
transform: {
|
||||
|
||||
1386
superset-frontend/package-lock.json
generated
1386
superset-frontend/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -126,8 +126,7 @@
|
||||
"ace-builds": "^1.36.3",
|
||||
"ag-grid-community": "33.1.1",
|
||||
"ag-grid-react": "33.1.1",
|
||||
"antd": "4.10.3",
|
||||
"antd-v5": "npm:antd@^5.24.6",
|
||||
"antd": "^5.24.6",
|
||||
"bootstrap": "^3.4.1",
|
||||
"brace": "^0.11.1",
|
||||
"chrono-node": "^2.7.8",
|
||||
@@ -145,9 +144,10 @@
|
||||
"fs-extra": "^11.2.0",
|
||||
"fuse.js": "^7.0.0",
|
||||
"geolib": "^2.0.24",
|
||||
"geostyler": "^12.0.2",
|
||||
"geostyler": "^14.1.3",
|
||||
"geostyler-data": "^1.0.0",
|
||||
"geostyler-openlayers-parser": "^4.3.0",
|
||||
"geostyler-qgis-parser": "^2.0.0",
|
||||
"geostyler-style": "^7.5.0",
|
||||
"geostyler-wfs-parser": "^2.0.3",
|
||||
"googleapis": "^130.0.0",
|
||||
|
||||
@@ -4194,7 +4194,7 @@
|
||||
"peerDependencies": {
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@types/react": "*",
|
||||
"antd": "^4.9.4",
|
||||
"antd": "^5.24.6",
|
||||
"react": "^16.13.1",
|
||||
"react-dom": "^16.13.1"
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
"@testing-library/react-hooks": "*",
|
||||
"@testing-library/user-event": "*",
|
||||
"ace-builds": "^1.4.14",
|
||||
"antd": "4.10.3",
|
||||
"antd": "^5.24.6",
|
||||
"brace": "^0.11.1",
|
||||
"memoize-one": "^5.1.1",
|
||||
"react": "^17.0.2",
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export { Dropdown, type DropDownProps } from 'antd-v5';
|
||||
export { Dropdown, type DropDownProps } from 'antd';
|
||||
|
||||
@@ -27,7 +27,7 @@ import {
|
||||
ThunderboltOutlined,
|
||||
QuestionCircleOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { Button } from 'antd-v5';
|
||||
import { Button } from 'antd';
|
||||
import { Tooltip, TooltipProps, TooltipPlacement } from './Tooltip';
|
||||
|
||||
export interface InfoTooltipWithTriggerProps {
|
||||
|
||||
@@ -17,4 +17,4 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
export { Menu, type MenuProps } from 'antd-v5';
|
||||
export { Menu, type MenuProps } from 'antd';
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
SafeMarkdown,
|
||||
SupersetTheme,
|
||||
} from '@superset-ui/core';
|
||||
import { Typography } from 'antd-v5';
|
||||
import { Typography } from 'antd';
|
||||
import { InfoTooltipWithTrigger } from './InfoTooltipWithTrigger';
|
||||
import { ColumnTypeLabel } from './ColumnTypeLabel/ColumnTypeLabel';
|
||||
import CertifiedIconWithTooltip from './CertifiedIconWithTooltip';
|
||||
|
||||
@@ -17,9 +17,9 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Popover } from 'antd-v5';
|
||||
import { Popover } from 'antd';
|
||||
import type ReactAce from 'react-ace';
|
||||
import type { PopoverProps } from 'antd-v5/es/popover';
|
||||
import type { PopoverProps } from 'antd/es/popover';
|
||||
import { CalculatorOutlined } from '@ant-design/icons';
|
||||
import { css, styled, useTheme, t } from '@superset-ui/core';
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import { useState, ReactNode } from 'react';
|
||||
import {
|
||||
Select as AntdSelect,
|
||||
type SelectProps as AntdSelectProps,
|
||||
} from 'antd-v5';
|
||||
} from 'antd';
|
||||
|
||||
export const { Option }: any = AntdSelect;
|
||||
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
*/
|
||||
|
||||
import { useTheme } from '@superset-ui/core';
|
||||
import { Tooltip as BaseTooltip } from 'antd-v5';
|
||||
import { Tooltip as BaseTooltip } from 'antd';
|
||||
import {
|
||||
TooltipProps as BaseTooltipProps,
|
||||
TooltipPlacement as BaseTooltipPlacement,
|
||||
} from 'antd-v5/es/tooltip';
|
||||
} from 'antd/es/tooltip';
|
||||
|
||||
export type TooltipProps = BaseTooltipProps;
|
||||
export type TooltipPlacement = BaseTooltipPlacement;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import { ReactNode } from 'react';
|
||||
import { JsonValue, useTheme } from '@superset-ui/core';
|
||||
import { Radio } from 'antd-v5';
|
||||
import { Radio } from 'antd';
|
||||
import { ControlHeader } from '../../components/ControlHeader';
|
||||
|
||||
// [value, label]
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"timezone-mock": "1.3.6"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"antd-v5": "npm:antd@^5.18.0",
|
||||
"antd": "^5.24.6",
|
||||
"@emotion/cache": "^11.4.0",
|
||||
"@emotion/react": "^11.4.1",
|
||||
"@emotion/styled": "^11.3.0",
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { CSSProperties, ReactNode } from 'react';
|
||||
import { Table, type TableColumnsType } from 'antd-v5';
|
||||
import { Table, type TableColumnsType } from 'antd';
|
||||
|
||||
interface TooltipRowData {
|
||||
key: string | number;
|
||||
|
||||
@@ -48,19 +48,19 @@ export const GlobalStyles = () => {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.antd5-dropdown,
|
||||
.ant-dropdown,
|
||||
.ant-dropdown,
|
||||
.ant-select-dropdown,
|
||||
.antd5-modal-wrap,
|
||||
.antd5-modal-mask,
|
||||
.antd5-picker-dropdown,
|
||||
.ant-modal-wrap,
|
||||
.ant-modal-mask,
|
||||
.ant-picker-dropdown,
|
||||
.ant-popover,
|
||||
.antd5-popover {
|
||||
.ant-popover {
|
||||
z-index: ${theme.zIndexPopupBase} !important;
|
||||
}
|
||||
|
||||
.column-config-popover {
|
||||
& .antd5-input-number {
|
||||
& .ant-input-number {
|
||||
width: 100%;
|
||||
}
|
||||
&& .btn-group svg {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { theme as antdThemeImport } from 'antd-v5';
|
||||
import { theme as antdThemeImport } from 'antd';
|
||||
import { Theme } from './Theme';
|
||||
import { AnyThemeConfig } from './types';
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
/* eslint-disable react-prefer-function-component/react-prefer-function-component */
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
import React from 'react';
|
||||
import { theme as antdThemeImport, ConfigProvider } from 'antd-v5';
|
||||
import { theme as antdThemeImport, ConfigProvider } from 'antd';
|
||||
import tinycolor from 'tinycolor2';
|
||||
|
||||
import {
|
||||
@@ -300,7 +300,7 @@ export class Theme {
|
||||
<EmotionCacheProvider value={themeState.emotionCache}>
|
||||
<EmotionThemeProvider theme={themeState.theme}>
|
||||
<GlobalStyles />
|
||||
<ConfigProvider theme={themeState.antdConfig} prefixCls="antd5">
|
||||
<ConfigProvider theme={themeState.antdConfig}>
|
||||
{children}
|
||||
</ConfigProvider>
|
||||
</EmotionThemeProvider>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
import emotionStyled from '@emotion/styled';
|
||||
import { useTheme as useThemeBasic } from '@emotion/react';
|
||||
// import { theme as antdThemeImport } from 'antd-v5';
|
||||
// import { theme as antdThemeImport } from 'antd';
|
||||
import { Theme } from './Theme';
|
||||
import type { SupersetTheme, SerializableThemeConfig } from './types';
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
*/
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
import { theme as antdThemeImport } from 'antd-v5';
|
||||
import { theme as antdThemeImport } from 'antd';
|
||||
|
||||
/**
|
||||
* Get AntdThemeConfig type from the theme object
|
||||
*/
|
||||
import type { ThemeConfig } from 'antd-v5';
|
||||
import type { ThemeConfig } from 'antd';
|
||||
|
||||
/**
|
||||
* Grab all antd tokens via getDesignToken(...).
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { theme as antdThemeImport } from 'antd-v5';
|
||||
import { theme as antdThemeImport } from 'antd';
|
||||
import {
|
||||
isSerializableConfig,
|
||||
deserializeThemeConfig,
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { theme as antdThemeImport } from 'antd-v5';
|
||||
import { theme as antdThemeImport } from 'antd';
|
||||
import tinycolor from 'tinycolor2';
|
||||
import {
|
||||
AntdThemeConfig,
|
||||
|
||||
@@ -42,7 +42,6 @@
|
||||
"@storybook/react": "8.1.11",
|
||||
"@storybook/types": "8.4.7",
|
||||
"@types/react-loadable": "^5.5.11",
|
||||
"antd": "4.10.3",
|
||||
"core-js": "3.40.0",
|
||||
"gh-pages": "^6.2.0",
|
||||
"jquery": "^3.7.1",
|
||||
@@ -64,6 +63,7 @@
|
||||
"typescript": "^5.7.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"antd": "^5.24.6",
|
||||
"@encodable/color": "=1.1.1",
|
||||
"@superset-ui/core": "*",
|
||||
"@superset-ui/legacy-plugin-chart-calendar": "*",
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
SupersetApiError,
|
||||
t,
|
||||
} from '@superset-ui/core';
|
||||
import { Button } from 'antd-v5';
|
||||
import { Button } from 'antd';
|
||||
import ErrorMessage from './ErrorMessage';
|
||||
|
||||
export type Props = {
|
||||
|
||||
@@ -16,16 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import {
|
||||
Layout,
|
||||
Menu,
|
||||
Button,
|
||||
Card,
|
||||
Alert,
|
||||
Input,
|
||||
Table,
|
||||
Space,
|
||||
} from 'antd-v5';
|
||||
import { Layout, Menu, Button, Card, Alert, Input, Table, Space } from 'antd';
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
import { Icons } from 'src/components/Icons';
|
||||
|
||||
|
||||
@@ -37,8 +37,7 @@
|
||||
"@ant-design/icons": "^5.2.6",
|
||||
"@superset-ui/chart-controls": "*",
|
||||
"@superset-ui/core": "*",
|
||||
"antd": "^4.10.3",
|
||||
"geostyler": "^12.0.0",
|
||||
"geostyler": "^14.1.3",
|
||||
"geostyler-data": "^1.0.0",
|
||||
"geostyler-openlayers-parser": "^4.0.0",
|
||||
"geostyler-style": "^7.2.0",
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { t } from '@superset-ui/core';
|
||||
import { SelectValue } from 'antd/lib/select';
|
||||
import { ControlPanelConfig } from '@superset-ui/chart-controls';
|
||||
|
||||
/**
|
||||
@@ -26,6 +25,7 @@ import { ControlPanelConfig } from '@superset-ui/chart-controls';
|
||||
* @param controlPanel The control panel
|
||||
* @returns The layer configuration object or undefined if not found
|
||||
*/
|
||||
|
||||
export const getLayerConfig = (controlPanel: ControlPanelConfig) => {
|
||||
let layerConfig: any;
|
||||
controlPanel.controlPanelSections.forEach(section => {
|
||||
@@ -57,7 +57,7 @@ export const getLayerConfig = (controlPanel: ControlPanelConfig) => {
|
||||
*/
|
||||
export const selectedChartMutator = (
|
||||
response: Record<string, any>,
|
||||
value: SelectValue | undefined,
|
||||
value: any,
|
||||
) => {
|
||||
if (!response?.result) {
|
||||
if (value && typeof value === 'string') {
|
||||
|
||||
@@ -33,11 +33,11 @@
|
||||
"memoize-one": "^5.2.1",
|
||||
"react-table": "^7.8.0",
|
||||
"regenerator-runtime": "^0.14.1",
|
||||
"xss": "^1.0.15",
|
||||
"antd-v5": "npm:antd@^5.24.6"
|
||||
"xss": "^1.0.15"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ant-design/icons": "^5.2.6",
|
||||
"antd": "^5.24.6",
|
||||
"@superset-ui/chart-controls": "*",
|
||||
"@superset-ui/core": "*",
|
||||
"@testing-library/dom": "^8.20.1",
|
||||
|
||||
@@ -25,7 +25,7 @@ import {
|
||||
Ref,
|
||||
} from 'react';
|
||||
import { Row, FilterValue } from 'react-table';
|
||||
import { Input, type InputRef, Space } from 'antd-v5';
|
||||
import { Input, type InputRef, Space } from 'antd';
|
||||
import useAsyncState from '../utils/useAsyncState';
|
||||
|
||||
export interface SearchInputProps {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
*/
|
||||
/* eslint-disable import/no-extraneous-dependencies */
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { Select } from 'antd-v5';
|
||||
import { Select } from 'antd';
|
||||
import { SearchOption } from '../../types';
|
||||
|
||||
const StyledSelect = styled(Select)`
|
||||
@@ -29,7 +29,7 @@ const StyledSelect = styled(Select)`
|
||||
interface SearchSelectDropdownProps {
|
||||
/** The currently selected search column value */
|
||||
value?: string;
|
||||
/** Callback triggered when a new search column is selected */
|
||||
/** Function triggered when a new search column is selected */
|
||||
onChange: (searchCol: string) => void;
|
||||
/** Available search column options to populate the dropdown */
|
||||
searchOptions: SearchOption[];
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import { memo } from 'react';
|
||||
import { css, t } from '@superset-ui/core';
|
||||
import { formatSelectOptions } from '@superset-ui/chart-controls';
|
||||
import { Select } from 'antd-v5';
|
||||
import { Select } from 'antd';
|
||||
|
||||
export type SizeOption = [number, string];
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ import {
|
||||
TableOutlined,
|
||||
} from '@ant-design/icons';
|
||||
import { isEmpty, debounce, isEqual } from 'lodash';
|
||||
import { Input, Space, Select } from 'antd-v5';
|
||||
import { Input, Space, Select } from 'antd';
|
||||
import {
|
||||
ColorSchemeEnum,
|
||||
DataColumnMeta,
|
||||
|
||||
@@ -68,19 +68,19 @@ const SqlLabStyles = styled.div`
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.antd5-tabs-content-holder {
|
||||
.ant-tabs-content-holder {
|
||||
/* This is needed for Safari */
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.antd5-tabs-content {
|
||||
.ant-tabs-content {
|
||||
height: 100%;
|
||||
position: relative;
|
||||
background-color: ${theme.colorBgContainer};
|
||||
overflow-x: auto;
|
||||
overflow-y: auto;
|
||||
|
||||
> .antd5-tabs-tabpane {
|
||||
> .ant-tabs-tabpane {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@@ -89,11 +89,11 @@ const SqlLabStyles = styled.div`
|
||||
}
|
||||
}
|
||||
|
||||
.ResultsModal .antd5-modal-body {
|
||||
.ResultsModal .ant-modal-body {
|
||||
min-height: ${theme.sizeUnit * 140}px;
|
||||
}
|
||||
|
||||
.antd5-modal-body {
|
||||
.ant-modal-body {
|
||||
overflow: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ const StyledTooltip = (props: any) => {
|
||||
{({ css }) => (
|
||||
<Tooltip
|
||||
overlayClassName={css`
|
||||
.antd5-tooltip-inner {
|
||||
.ant-tooltip-inner {
|
||||
max-width: ${theme.sizeUnit * 125}px;
|
||||
word-wrap: break-word;
|
||||
text-align: center;
|
||||
|
||||
@@ -41,7 +41,7 @@ interface QueryHistoryProps {
|
||||
|
||||
const StyledEmptyStateWrapper = styled.div`
|
||||
height: 100%;
|
||||
.antd5-empty-image img {
|
||||
.ant-empty-image img {
|
||||
margin-right: 28px;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ type Props = {
|
||||
|
||||
const StyledEmptyStateWrapper = styled.div`
|
||||
height: 100%;
|
||||
.antd5-empty-image img {
|
||||
.ant-empty-image img {
|
||||
margin-right: 28px;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ const TABS_KEYS = {
|
||||
const StyledPane = styled.div<StyledPaneProps>`
|
||||
width: 100%;
|
||||
height: ${props => props.height}px;
|
||||
.antd5-tabs .antd5-tabs-content-holder {
|
||||
.ant-tabs .ant-tabs-content-holder {
|
||||
overflow: visible;
|
||||
}
|
||||
.SouthPaneTabs {
|
||||
@@ -73,7 +73,7 @@ const StyledPane = styled.div<StyledPaneProps>`
|
||||
overflow-y: auto;
|
||||
}
|
||||
}
|
||||
.antd5-tabs-tabpane {
|
||||
.ant-tabs-tabpane {
|
||||
.scrollable {
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
@@ -1,137 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
* OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// @ant-prefix: antd4;
|
||||
|
||||
// Core styles and dependencies
|
||||
@import '~antd/lib/style/themes/default.less'; // Use default theme instead of index
|
||||
@import '~antd/lib/style/mixins/index';
|
||||
|
||||
// Base styles with prefix
|
||||
@import '~antd/lib/style/core/base';
|
||||
@import '~antd/lib/style/core/iconfont';
|
||||
@import '~antd/lib/style/core/motion';
|
||||
|
||||
// All component styles
|
||||
@import '~antd/lib/style/components.less';
|
||||
|
||||
|
||||
/*
|
||||
Theme variables here: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less
|
||||
*/
|
||||
/* Core Colors */
|
||||
@primary-color: #2893b3;
|
||||
@info-color: #66bcfe;
|
||||
@processing-color: #525252;
|
||||
@success-color: #5ac189;
|
||||
@error-color: #e04355;
|
||||
@highlight-color: #e04355;
|
||||
@normal-color: #d1d1d1;
|
||||
|
||||
// Menu-related
|
||||
@menu-highlight-color: #2893b3;
|
||||
@menu-item-active-bg: ;
|
||||
@menu-item-color: #18586b;
|
||||
@menu-popup-bg: #ffffff;
|
||||
@menu-bg: #ffffff;
|
||||
|
||||
@tabs-card-head-background: #ffffff;
|
||||
@component-background: #ffffff;
|
||||
@select-item-selected-bg: #e4f1f2;
|
||||
@select-item-active-bg: #e4f1f2;
|
||||
@select-item-hover-bg: #e4f1f2;
|
||||
|
||||
@item-hover-bg: #ffffff;
|
||||
@menu-item-hover-bg: #ffffff;
|
||||
|
||||
// GPT generated:
|
||||
|
||||
/* Backgrounds */
|
||||
@layout-body-background: #f5f5f5;
|
||||
@layout-header-background: #ffffff;
|
||||
@layout-footer-background: #ffffff;
|
||||
@layout-sider-background: #ffffff;
|
||||
@background-color-light: #ffffff;
|
||||
@background-color-base: #ffffff;
|
||||
@background-elevated: #ffffff;
|
||||
|
||||
/* Text */
|
||||
@text-color: rgba(0,0,0,0.88);
|
||||
@text-color-secondary: rgba(0,0,0,0.65);
|
||||
@text-color-tertiary: rgba(0,0,0,0.45);
|
||||
@text-color-quaternary: rgba(0,0,0,0.25);
|
||||
@heading-color: #ffffff;
|
||||
@disabled-color: rgba(0,0,0,0.65);
|
||||
@input-placeholder-color: rgba(0,0,0,0.65);
|
||||
|
||||
/* Borders */
|
||||
@border-color-base: #d9d9d9;
|
||||
@border-color-split: #f0f0f0;
|
||||
@border-radius-base: 6;
|
||||
@border-radius-sm: 4;
|
||||
@border-radius-lg: 8;
|
||||
|
||||
/* Buttons */
|
||||
@btn-primary-bg: #2893b3;
|
||||
@btn-default-bg: #ffffff;
|
||||
@btn-default-border: #d9d9d9;
|
||||
@btn-danger-bg: #e04355;
|
||||
@btn-danger-border: #e04355;
|
||||
|
||||
/* Inputs */
|
||||
//@input-bg: ;
|
||||
@input-border-color: #d9d9d9;
|
||||
@input-hover-border-color: #6ebccc;
|
||||
|
||||
/* Menus */
|
||||
@menu-bg: #ffffff;
|
||||
@menu-popup-bg: #ffffff;
|
||||
@menu-item-color: rgba(0,0,0,0.88);
|
||||
@menu-inline-submenu-bg: #ffffff;
|
||||
@menu-highlight-color: rgba(0,0,0,0.88);
|
||||
@menu-highlight-danger-color: #e04355;
|
||||
@menu-item-active-bg: #2893b3;
|
||||
@menu-item-active-danger-bg: #fff0f0;
|
||||
@menu-item-group-title-color: rgba(0,0,0,0.88);
|
||||
|
||||
/* Typography */
|
||||
@font-family: 'Inter', Helvetica, Arial;
|
||||
@font-family-code: 'Fira Code', 'Courier New', monospace;
|
||||
@font-size-base: 14px;
|
||||
@font-size-sm: 12px;
|
||||
@font-size-lg: 16px;
|
||||
@line-height-base: 1.5714285714285714;
|
||||
@line-height-sm: 1.6666666666666667;
|
||||
@line-height-lg: 1.5;
|
||||
|
||||
/* Tables */
|
||||
@table-header-bg: #ffffff;
|
||||
@table-row-hover-bg: #ffffff;
|
||||
@table-selected-row-bg: #e4f1f2;
|
||||
|
||||
/* Motion */
|
||||
@motion-duration-fast: 0.1s;
|
||||
@motion-duration-mid: 0.2s;
|
||||
@motion-duration-slow: 0.3s;
|
||||
@motion-ease-out: cubic-bezier(0.215, 0.61, 0.355, 1);
|
||||
@motion-ease-in-out: cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||
|
||||
/* headers */
|
||||
@heading-color: rgba(0,0,0,0.88);
|
||||
@collapse-header-bg: #ffffff;
|
||||
@collapse-header-padding: 4px 4px;
|
||||
@@ -1,137 +0,0 @@
|
||||
/**
|
||||
* Licensed to the Apache Software Foundation (ASF) under one
|
||||
* or more contributor license agreements. See the NOTICE file
|
||||
* distributed with this work for additional information
|
||||
* regarding copyright ownership. The ASF licenses this file
|
||||
* to you under the Apache License, Version 2.0 (the
|
||||
* "License"); you may not use this file except in compliance
|
||||
* with the License. You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
|
||||
* OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
// @ant-prefix: antd4;
|
||||
|
||||
// Core styles and dependencies
|
||||
@import '~antd/lib/style/themes/default.less'; // Use default theme instead of index
|
||||
@import '~antd/lib/style/mixins/index';
|
||||
|
||||
// Base styles with prefix
|
||||
@import '~antd/lib/style/core/base';
|
||||
@import '~antd/lib/style/core/iconfont';
|
||||
@import '~antd/lib/style/core/motion';
|
||||
|
||||
// All component styles
|
||||
@import '~antd/lib/style/components.less';
|
||||
|
||||
|
||||
/*
|
||||
Theme variables here: https://github.com/ant-design/ant-design/blob/master/components/style/themes/default.less
|
||||
*/
|
||||
/* Core Colors */
|
||||
@primary-color: {{theme.colorPrimary}};
|
||||
@info-color: {{theme.colorInfo}};
|
||||
@processing-color: {{theme.colors.grayscale.dark2}};
|
||||
@success-color: {{theme.colorSuccess}};
|
||||
@error-color: {{theme.colorError}};
|
||||
@highlight-color: {{theme.colorError}};
|
||||
@normal-color: {{theme.colors.grayscale.light3}};
|
||||
|
||||
// Menu-related
|
||||
@menu-highlight-color: {{theme.colorPrimary}};
|
||||
@menu-item-active-bg: {{theme.colorElevated}};
|
||||
@menu-item-color: {{theme.colors.primary.dark3}};
|
||||
@menu-popup-bg: {{theme.colorBgContainer}};
|
||||
@menu-bg: {{theme.colorBgContainer}};
|
||||
|
||||
@tabs-card-head-background: {{theme.colorBgElevated}};
|
||||
@component-background: {{theme.colorBgContainer}};
|
||||
@select-item-selected-bg: {{theme.colorPrimaryBg}};
|
||||
@select-item-active-bg: {{theme.colorPrimaryBg}};
|
||||
@select-item-hover-bg: {{theme.colorPrimaryBg}};
|
||||
|
||||
@item-hover-bg: {{theme.colorBgElevated}};
|
||||
@menu-item-hover-bg: {{theme.colorBgElevated}};
|
||||
|
||||
// GPT generated:
|
||||
|
||||
/* Backgrounds */
|
||||
@layout-body-background: {{theme.colorBgLayout}};
|
||||
@layout-header-background: {{theme.colorBgContainer}};
|
||||
@layout-footer-background: {{theme.colorBgContainer}};
|
||||
@layout-sider-background: {{theme.colorBgContainer}};
|
||||
@background-color-light: {{theme.colorBgContainer}};
|
||||
@background-color-base: {{theme.colorBgContainer}};
|
||||
@background-elevated: {{theme.colorBgElevated}};
|
||||
|
||||
/* Text */
|
||||
@text-color: {{theme.colorText}};
|
||||
@text-color-secondary: {{theme.colorTextSecondary}};
|
||||
@text-color-tertiary: {{theme.colorTextTertiary}};
|
||||
@text-color-quaternary: {{theme.colorTextQuaternary}};
|
||||
@heading-color: {{theme.colorBgContainer}};
|
||||
@disabled-color: {{theme.colorTextSecondary}};
|
||||
@input-placeholder-color: {{theme.colorTextSecondary}};
|
||||
|
||||
/* Borders */
|
||||
@border-color-base: {{theme.colorBorder}};
|
||||
@border-color-split: {{theme.colorBorderSecondary}};
|
||||
@border-radius-base: {{theme.borderRadius}};
|
||||
@border-radius-sm: {{theme.borderRadiusSM}};
|
||||
@border-radius-lg: {{theme.borderRadiusLG}};
|
||||
|
||||
/* Buttons */
|
||||
@btn-primary-bg: {{theme.colorPrimary}};
|
||||
@btn-default-bg: {{theme.colorBgContainer}};
|
||||
@btn-default-border: {{theme.colorBorder}};
|
||||
@btn-danger-bg: {{theme.colorError}};
|
||||
@btn-danger-border: {{theme.colorError}};
|
||||
|
||||
/* Inputs */
|
||||
//@input-bg: {{theme.colorBgInput}};
|
||||
@input-border-color: {{theme.colorBorder}};
|
||||
@input-hover-border-color: {{theme.colorPrimaryBorderHover}};
|
||||
|
||||
/* Menus */
|
||||
@menu-bg: {{theme.colorBgContainer}};
|
||||
@menu-popup-bg: {{theme.colorBgContainer}};
|
||||
@menu-item-color: {{theme.colorText}};
|
||||
@menu-inline-submenu-bg: {{theme.colorBgContainer}};
|
||||
@menu-highlight-color: {{theme.colorText}};
|
||||
@menu-highlight-danger-color: {{theme.colorError}};
|
||||
@menu-item-active-bg: {{theme.colorPrimary}};
|
||||
@menu-item-active-danger-bg: {{theme.colorErrorBg}};
|
||||
@menu-item-group-title-color: {{theme.colorText}};
|
||||
|
||||
/* Typography */
|
||||
@font-family: {{theme.fontFamily}};
|
||||
@font-family-code: {{theme.fontFamilyCode}};
|
||||
@font-size-base: {{theme.fontSize}}px;
|
||||
@font-size-sm: {{theme.fontSizeSM}}px;
|
||||
@font-size-lg: {{theme.fontSizeLG}}px;
|
||||
@line-height-base: {{theme.lineHeight}};
|
||||
@line-height-sm: {{theme.lineHeightSM}};
|
||||
@line-height-lg: {{theme.lineHeightLG}};
|
||||
|
||||
/* Tables */
|
||||
@table-header-bg: {{theme.colorBgContainer}};
|
||||
@table-row-hover-bg: {{theme.colorBgElevated}};
|
||||
@table-selected-row-bg: {{theme.colorPrimaryBg}};
|
||||
|
||||
/* Motion */
|
||||
@motion-duration-fast: {{theme.motionDurationFast}};
|
||||
@motion-duration-mid: {{theme.motionDurationMid}};
|
||||
@motion-duration-slow: {{theme.motionDurationSlow}};
|
||||
@motion-ease-out: {{theme.motionEaseOut}};
|
||||
@motion-ease-in-out: {{theme.motionEaseInOut}};
|
||||
|
||||
/* headers */
|
||||
@heading-color: {{theme.colorText}};
|
||||
@collapse-header-bg: {{theme.colorBgContainer}};
|
||||
@collapse-header-padding: {{theme.sizeUnit}}px {{theme.sizeUnit}}px;
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { Alert as AntdAlert } from 'antd-v5';
|
||||
import { Alert as AntdAlert } from 'antd';
|
||||
import type { AlertProps } from './types';
|
||||
|
||||
export const Alert = (props: AlertProps) => {
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import type { PropsWithChildren } from 'react';
|
||||
import type { AlertProps as AntdAlertProps } from 'antd-v5/es/alert';
|
||||
import type { AlertProps as AntdAlertProps } from 'antd/es/alert';
|
||||
|
||||
export type AlertProps = PropsWithChildren<
|
||||
Omit<AntdAlertProps, 'children'> & { roomBelow?: boolean }
|
||||
|
||||
@@ -17,13 +17,11 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { ConfigProvider, type ConfigProviderProps } from 'antd-v5';
|
||||
import { ConfigProvider, type ConfigProviderProps } from 'antd';
|
||||
|
||||
export const AntdThemeProvider = ({
|
||||
children,
|
||||
...rest
|
||||
}: ConfigProviderProps) => (
|
||||
<ConfigProvider prefixCls="antd5" {...rest}>
|
||||
{children}
|
||||
</ConfigProvider>
|
||||
<ConfigProvider {...rest}>{children}</ConfigProvider>
|
||||
);
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export { AutoComplete } from 'antd-v5';
|
||||
export { AutoComplete } from 'antd';
|
||||
export type { AutoCompleteProps } from './types';
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export type { AutoCompleteProps } from 'antd-v5/es/auto-complete';
|
||||
export type { AutoCompleteProps } from 'antd/es/auto-complete';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
import { Avatar as AntdAvatar } from 'antd-v5';
|
||||
import { Avatar as AntdAvatar } from 'antd';
|
||||
import type { AvatarProps, GroupProps as AvatarGroupProps } from './types';
|
||||
|
||||
export function Avatar(props: AvatarProps) {
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import type { AvatarProps, GroupProps } from 'antd-v5/es/avatar';
|
||||
import type { AvatarProps, GroupProps } from 'antd/es/avatar';
|
||||
|
||||
export type { AvatarProps, GroupProps };
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { Badge as AntdBadge } from 'antd-v5';
|
||||
import { Badge as AntdBadge } from 'antd';
|
||||
import type { BadgeProps } from './types';
|
||||
|
||||
export const Badge = styled((props: BadgeProps) => <AntdBadge {...props} />)`
|
||||
${({ theme, color, count }) => `
|
||||
& > sup,
|
||||
& > sup.antd5-badge-count {
|
||||
& > sup.ant-badge-count {
|
||||
${
|
||||
count !== undefined ? `background: ${color || theme.colorPrimary};` : ''
|
||||
}
|
||||
|
||||
@@ -16,6 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import type { BadgeProps } from 'antd-v5/es/badge';
|
||||
import type { BadgeProps } from 'antd/es/badge';
|
||||
|
||||
export type { BadgeProps };
|
||||
|
||||
@@ -16,5 +16,5 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export { Breadcrumb } from 'antd-v5';
|
||||
export { Breadcrumb } from 'antd';
|
||||
export type { BreadcrumbProps } from './types';
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export type { BreadcrumbProps } from 'antd-v5/es/breadcrumb';
|
||||
export type { BreadcrumbProps } from 'antd/es/breadcrumb';
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
import { Children, ReactElement, Fragment } from 'react';
|
||||
|
||||
import cx from 'classnames';
|
||||
import { Button as AntdButton } from 'antd-v5';
|
||||
import { Button as AntdButton } from 'antd';
|
||||
import { useTheme } from '@superset-ui/core';
|
||||
import { Tooltip } from '../Tooltip';
|
||||
import type {
|
||||
|
||||
@@ -23,7 +23,7 @@ import type {
|
||||
ButtonType,
|
||||
ButtonVariantType,
|
||||
ButtonColorType,
|
||||
} from 'antd-v5/es/button';
|
||||
} from 'antd/es/button';
|
||||
import { IconType } from 'src/components/Icons/types';
|
||||
import type { TooltipPlacement } from '../Tooltip/types';
|
||||
|
||||
|
||||
@@ -17,14 +17,14 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { SupersetTheme } from '@superset-ui/core';
|
||||
import { Card as AntdCard } from 'antd-v5';
|
||||
import { Card as AntdCard } from 'antd';
|
||||
import type { CardProps } from './types';
|
||||
|
||||
const CustomCard = ({ padded, ...props }: CardProps) => (
|
||||
<AntdCard
|
||||
{...props}
|
||||
css={(theme: SupersetTheme) => ({
|
||||
'.antd5-card-body': {
|
||||
'.ant-card-body': {
|
||||
padding: padded ? theme.sizeUnit * 4 : theme.sizeUnit,
|
||||
},
|
||||
})}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import type { CardProps as AntdCardProps } from 'antd-v5/es/card';
|
||||
import type { CardProps as AntdCardProps } from 'antd/es/card';
|
||||
|
||||
export interface CardProps extends AntdCardProps {
|
||||
padded?: boolean;
|
||||
|
||||
@@ -52,7 +52,7 @@ import {
|
||||
cachedSupersetGet,
|
||||
supersetGetCache,
|
||||
} from 'src/utils/cachedSupersetGet';
|
||||
import { InputRef } from 'antd-v5';
|
||||
import { InputRef } from 'antd';
|
||||
import { MenuItemTooltip } from '../DisabledMenuItemTooltip';
|
||||
import { getSubmenuYOffset } from '../utils';
|
||||
import { MenuItemWithTruncation } from '../MenuItemWithTruncation';
|
||||
|
||||
@@ -461,7 +461,7 @@ export default function DrillByModal({
|
||||
return (
|
||||
<Modal
|
||||
css={css`
|
||||
.antd5-modal-footer {
|
||||
.ant-modal-footer {
|
||||
border-top: none;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -117,7 +117,7 @@ export default function DrillDetailModal({
|
||||
show={showModal}
|
||||
onHide={onHideModal ?? (() => null)}
|
||||
css={css`
|
||||
.antd5-modal-body {
|
||||
.ant-modal-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -101,6 +101,6 @@ test('should remove the filters on close', () => {
|
||||
expect(screen.getByText('platform')).toBeInTheDocument();
|
||||
expect(screen.getByText('GB')).toBeInTheDocument();
|
||||
|
||||
userEvent.click(screen.getByRole('img', { name: 'close' }));
|
||||
userEvent.click(screen.getByLabelText('Close'));
|
||||
expect(setFilters).toHaveBeenCalledWith([]);
|
||||
});
|
||||
|
||||
@@ -21,7 +21,7 @@ import { ReactNode, CSSProperties } from 'react';
|
||||
import { css, truncationCSS, useCSSTextTruncation } from '@superset-ui/core';
|
||||
import { Menu } from 'src/components/Menu';
|
||||
import { Tooltip } from 'src/components';
|
||||
import { MenuItemProps } from 'antd-v5';
|
||||
import { MenuItemProps } from 'antd';
|
||||
|
||||
export type MenuItemWithTruncationProps = {
|
||||
tooltipText: ReactNode;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import { Checkbox } from 'antd-v5';
|
||||
import { Checkbox } from 'antd';
|
||||
|
||||
export { Checkbox };
|
||||
export type { CheckboxProps, CheckboxChangeEvent } from './types';
|
||||
|
||||
@@ -16,4 +16,4 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
export type { CheckboxProps, CheckboxChangeEvent } from 'antd-v5/es/checkbox';
|
||||
export type { CheckboxProps, CheckboxChangeEvent } from 'antd/es/checkbox';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
* under the License.
|
||||
*/
|
||||
import { styled } from '@superset-ui/core';
|
||||
import { Collapse as AntdCollapse } from 'antd-v5';
|
||||
import { Collapse as AntdCollapse } from 'antd';
|
||||
import type { CollapseProps } from './types';
|
||||
|
||||
export const Collapse = styled((props: CollapseProps) => (
|
||||
@@ -30,9 +30,9 @@ export const Collapse = styled((props: CollapseProps) => (
|
||||
border-left: 0;
|
||||
border-right: 0;
|
||||
`}
|
||||
.antd5-collapse-item {
|
||||
.antd5-collapse-header {
|
||||
.antd5-collapse-arrow svg {
|
||||
.ant-collapse-item {
|
||||
.ant-collapse-header {
|
||||
.ant-collapse-arrow svg {
|
||||
transition: ${({ animateArrows }) =>
|
||||
animateArrows ? 'transform 0.24s' : 'none'};
|
||||
}
|
||||
@@ -41,7 +41,7 @@ export const Collapse = styled((props: CollapseProps) => (
|
||||
expandIconPosition &&
|
||||
expandIconPosition === 'right' &&
|
||||
`
|
||||
.anticon.anticon-right.antd5-collapse-arrow > svg {
|
||||
.anticon.anticon-right.ant-collapse-arrow > svg {
|
||||
transform: rotate(90deg) !important;
|
||||
}
|
||||
`}
|
||||
@@ -53,10 +53,10 @@ export const Collapse = styled((props: CollapseProps) => (
|
||||
`
|
||||
border-bottom: 1px solid ${theme.colorBorderSecondary};
|
||||
`}
|
||||
.antd5-collapse-content {
|
||||
.ant-collapse-content {
|
||||
color: ${({ theme }) => theme.colorText};
|
||||
|
||||
.antd5-collapse-content-box {
|
||||
.ant-collapse-content-box {
|
||||
.loading.inline {
|
||||
margin: ${({ theme }) => theme.sizeUnit * 12}px auto;
|
||||
display: block;
|
||||
@@ -65,17 +65,17 @@ export const Collapse = styled((props: CollapseProps) => (
|
||||
}
|
||||
}
|
||||
|
||||
.hidden-collapse-header .antd5-collapse-header {
|
||||
.hidden-collapse-header .ant-collapse-header {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.antd5-collapse-item-active {
|
||||
.antd5-collapse-header {
|
||||
.ant-collapse-item-active {
|
||||
.ant-collapse-header {
|
||||
${({ expandIconPosition }) =>
|
||||
expandIconPosition &&
|
||||
expandIconPosition === 'right' &&
|
||||
`
|
||||
.anticon.anticon-right.antd5-collapse-arrow > svg {
|
||||
.anticon.anticon-right.ant-collapse-arrow > svg {
|
||||
transform: rotate(-90deg) !important;
|
||||
}
|
||||
`}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import type { CollapseProps as AntdCollapseProps } from 'antd-v5';
|
||||
import type { CollapseProps as AntdCollapseProps } from 'antd';
|
||||
|
||||
export interface CollapseProps extends AntdCollapseProps {
|
||||
animateArrows?: boolean;
|
||||
|
||||
@@ -169,9 +169,9 @@ export const CronPicker = styled((props: CronProps) => (
|
||||
|
||||
/* Sizing of select container */
|
||||
|
||||
.react-js-cron-select.antd5-select {
|
||||
.react-js-cron-select.ant-select {
|
||||
width: 100%;
|
||||
.antd5-select-selector {
|
||||
.ant-select-selector {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
}
|
||||
@@ -184,12 +184,12 @@ export const CronPicker = styled((props: CronProps) => (
|
||||
}
|
||||
}
|
||||
|
||||
.react-js-cron-custom-select .antd5-select-selection-placeholder {
|
||||
.react-js-cron-custom-select .ant-select-selection-placeholder {
|
||||
flex: auto;
|
||||
border-radius: ${theme.borderRadius}px;
|
||||
}
|
||||
|
||||
.react-js-cron-custom-select .antd5-select-selection-overflow-item {
|
||||
.react-js-cron-custom-select .ant-select-selection-overflow-item {
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ import {
|
||||
SORT_BY as DATASET_SORT_BY,
|
||||
} from 'src/features/datasets/constants';
|
||||
import withToasts from 'src/components/MessageToasts/withToasts';
|
||||
import { InputRef } from 'antd-v5';
|
||||
import { InputRef } from 'antd';
|
||||
import { Loading } from '../Loading';
|
||||
import { Input } from '../Input';
|
||||
import { FacePile } from '../FacePile';
|
||||
@@ -61,7 +61,7 @@ const CHANGE_WARNING_MSG = t(
|
||||
);
|
||||
|
||||
const CustomStyledModal = styled(Modal)`
|
||||
.antd5-modal-body {
|
||||
.ant-modal-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
@@ -28,12 +28,9 @@ const props = {
|
||||
};
|
||||
|
||||
test('renders a table', () => {
|
||||
const { length } = mockDatasource['7__table'].columns;
|
||||
const { getByRole } = render(<CollectionTable {...props} />);
|
||||
expect(getByRole('table')).toBeInTheDocument();
|
||||
expect(
|
||||
getByRole('table')
|
||||
.getElementsByTagName('tbody')[0]
|
||||
.getElementsByTagName('tr'),
|
||||
).toHaveLength(length + 1); // Ant design measure row;
|
||||
const { container } = render(<CollectionTable {...props} />);
|
||||
const tableBody = container.querySelector('.ant-table-tbody');
|
||||
expect(tableBody).toBeInTheDocument();
|
||||
const rows = tableBody?.getElementsByTagName('tr');
|
||||
expect(rows).toHaveLength(mockDatasource['7__table'].columns.length + 1);
|
||||
});
|
||||
|
||||
@@ -97,13 +97,13 @@ const FlexRowContainer = styled.div`
|
||||
|
||||
const StyledTableTabs = styled(Tabs)`
|
||||
overflow: visible;
|
||||
.antd5-tabs-content-holder {
|
||||
.ant-tabs-content-holder {
|
||||
overflow: visible;
|
||||
}
|
||||
`;
|
||||
|
||||
const StyledBadge = styled(Badge)`
|
||||
.antd5-badge-count {
|
||||
.ant-badge-count {
|
||||
line-height: ${({ theme }) => theme.sizeUnit * 4}px;
|
||||
height: ${({ theme }) => theme.sizeUnit * 4}px;
|
||||
margin-left: ${({ theme }) => theme.sizeUnit}px;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user