diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 492847eabb0..8d73b5515d7 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -56,7 +56,7 @@ "@visx/xychart": "^3.5.1", "ag-grid-community": "34.2.0", "ag-grid-react": "34.2.0", - "antd": "^5.24.6", + "antd": "^5.27.4", "chrono-node": "^2.7.8", "classnames": "^2.2.5", "content-disposition": "^0.5.4", @@ -10700,9 +10700,9 @@ } }, "node_modules/@rc-component/trigger": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.2.6.tgz", - "integrity": "sha512-/9zuTnWwhQ3S3WT1T8BubuFTT46kvnXgaERR9f4BTKyn61/wpf/BvbImzYBubzJibU707FxwbKszLlHjcLiv1Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@rc-component/trigger/-/trigger-2.3.0.tgz", + "integrity": "sha512-iwaxZyzOuK0D7lS+0AQEtW52zUWxoGqTGkke3dRyb8pYiShmRpCjB/8TzPI4R6YySCH7Vm9BZj/31VPiiQTLBg==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.23.2", @@ -18901,9 +18901,9 @@ } }, "node_modules/antd": { - "version": "5.25.4", - "resolved": "https://registry.npmjs.org/antd/-/antd-5.25.4.tgz", - "integrity": "sha512-yXdWqq1NJSZnD1HoPZWnWuQJGVYYnB3h0Ufsz4sbt3T0N9SdJ4G9GPpLMk8Gn9zWtwBekfR4THPVZ9uzAyhBHQ==", + "version": "5.27.4", + "resolved": "https://registry.npmjs.org/antd/-/antd-5.27.4.tgz", + "integrity": "sha512-rhArohoAUCxhkPjGI/BXthOrrjaElL4Fb7d4vEHnIR3DpxFXfegd4rN21IgGdiF+Iz4EFuUZu8MdS8NuJHLSVQ==", "license": "MIT", "dependencies": { "@ant-design/colors": "^7.2.1", @@ -18917,7 +18917,7 @@ "@rc-component/mutate-observer": "^1.1.0", "@rc-component/qrcode": "~1.0.0", "@rc-component/tour": "~1.15.1", - "@rc-component/trigger": "^2.2.6", + "@rc-component/trigger": "^2.3.0", "classnames": "^2.5.1", "copy-to-clipboard": "^3.3.3", "dayjs": "^1.11.11", @@ -18942,12 +18942,12 @@ "rc-resize-observer": "^1.4.3", "rc-segmented": "~2.7.0", "rc-select": "~14.16.8", - "rc-slider": "~11.1.8", + "rc-slider": "~11.1.9", "rc-steps": "~6.0.1", "rc-switch": "~4.1.0", - "rc-table": "~7.50.5", - "rc-tabs": "~15.6.1", - "rc-textarea": "~1.10.0", + "rc-table": "~7.53.0", + "rc-tabs": "~15.7.0", + "rc-textarea": "~1.10.2", "rc-tooltip": "~6.4.0", "rc-tree": "~5.13.1", "rc-tree-select": "~5.27.0", @@ -47634,9 +47634,9 @@ } }, "node_modules/rc-slider": { - "version": "11.1.8", - "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.8.tgz", - "integrity": "sha512-2gg/72YFSpKP+Ja5AjC5DPL1YnV8DEITDQrcc1eASrUYjl0esptaBVJBh5nLTXCCp15eD8EuGjwezVGSHhs9tQ==", + "version": "11.1.9", + "resolved": "https://registry.npmjs.org/rc-slider/-/rc-slider-11.1.9.tgz", + "integrity": "sha512-h8IknhzSh3FEM9u8ivkskh+Ef4Yo4JRIY2nj7MrH6GQmrwV6mcpJf5/4KgH5JaVI1H3E52yCdpOlVyGZIeph5A==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.1", @@ -47685,9 +47685,9 @@ } }, "node_modules/rc-table": { - "version": "7.50.5", - "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.50.5.tgz", - "integrity": "sha512-FDZu8aolhSYd3v9KOc3lZOVAU77wmRRu44R0Wfb8Oj1dXRUsloFaXMSl6f7yuWZUxArJTli7k8TEOX2mvhDl4A==", + "version": "7.53.1", + "resolved": "https://registry.npmjs.org/rc-table/-/rc-table-7.53.1.tgz", + "integrity": "sha512-firAd7Z+liqIDS5TubJ1qqcoBd6YcANLKWQDZhFf3rfoOTt/UNPj4n3O+2vhl+z4QMqwPEUVAil661WHA8H8Aw==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.1", @@ -47706,9 +47706,9 @@ } }, "node_modules/rc-tabs": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-15.6.1.tgz", - "integrity": "sha512-/HzDV1VqOsUWyuC0c6AkxVYFjvx9+rFPKZ32ejxX0Uc7QCzcEjTA9/xMgv4HemPKwzBNX8KhGVbbumDjnj92aA==", + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/rc-tabs/-/rc-tabs-15.7.0.tgz", + "integrity": "sha512-ZepiE+6fmozYdWf/9gVp7k56PKHB1YYoDsKeQA1CBlJ/POIhjkcYiv0AGP0w2Jhzftd3AVvZP/K+V+Lpi2ankA==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.11.2", @@ -47728,9 +47728,9 @@ } }, "node_modules/rc-textarea": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.10.0.tgz", - "integrity": "sha512-ai9IkanNuyBS4x6sOL8qu/Ld40e6cEs6pgk93R+XLYg0mDSjNBGey6/ZpDs5+gNLD7urQ14po3V6Ck2dJLt9SA==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/rc-textarea/-/rc-textarea-1.10.2.tgz", + "integrity": "sha512-HfaeXiaSlpiSp0I/pvWpecFEHpVysZ9tpDLNkxQbMvMz6gsr7aVZ7FpWP9kt4t7DB+jJXesYS0us1uPZnlRnwQ==", "license": "MIT", "dependencies": { "@babel/runtime": "^7.10.1", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index e51858cb4e1..5b9df82efa7 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -129,7 +129,7 @@ "@visx/xychart": "^3.5.1", "ag-grid-community": "34.2.0", "ag-grid-react": "34.2.0", - "antd": "^5.24.6", + "antd": "^5.27.4", "chrono-node": "^2.7.8", "classnames": "^2.2.5", "content-disposition": "^0.5.4", diff --git a/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx b/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx index 12a7fcbb24c..31152466e5c 100644 --- a/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx +++ b/superset-frontend/src/pages/ChartList/ChartList.listview.test.tsx @@ -218,7 +218,8 @@ describe('ChartList - List View Tests', () => { // Verify all expected headers are present expectedHeaders.forEach(headerText => { - expect(within(table).getByText(headerText)).toBeInTheDocument(); + const headers = within(table).getAllByText(headerText); + expect(headers.length).toBeGreaterThan(0); }); }); @@ -234,8 +235,8 @@ describe('ChartList - List View Tests', () => { expect(sortableHeaders).toHaveLength(3); - const nameHeader = within(table).getByText('Name'); - fireEvent.click(nameHeader); + const nameHeaders = within(table).getAllByText('Name'); + fireEvent.click(nameHeaders[0]); await waitFor(() => { const sortCalls = fetchMock diff --git a/superset-frontend/src/pages/RolesList/RolesList.test.tsx b/superset-frontend/src/pages/RolesList/RolesList.test.tsx index 23890199f3d..e7fd6d0d60d 100644 --- a/superset-frontend/src/pages/RolesList/RolesList.test.tsx +++ b/superset-frontend/src/pages/RolesList/RolesList.test.tsx @@ -158,11 +158,11 @@ describe('RolesList', () => { const table = screen.getByRole('table'); expect(table).toBeInTheDocument(); - const nameColumn = await within(table).findByText('Name'); - const actionsColumn = await within(table).findByText('Actions'); + const nameColumns = await within(table).findAllByText('Name'); + const actionsColumns = await within(table).findAllByText('Actions'); - expect(nameColumn).toBeInTheDocument(); - expect(actionsColumn).toBeInTheDocument(); + expect(nameColumns.length).toBeGreaterThan(0); + expect(actionsColumns.length).toBeGreaterThan(0); }); it('opens add modal when Add Role button is clicked', async () => { diff --git a/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx b/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx index c93dec0e449..3d8b3a18f26 100644 --- a/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx +++ b/superset-frontend/src/pages/RowLevelSecurityList/RowLevelSecurityList.test.tsx @@ -173,19 +173,19 @@ describe('RuleList RTL', () => { const table = screen.getByRole('table'); expect(table).toBeInTheDocument(); - const nameColumn = await within(table).findByText('Name'); - const filterTypeColumn = await within(table).findByText('Filter Type'); - const groupKeyColumn = await within(table).findByText('Group Key'); - const clauseColumn = await within(table).findByText('Clause'); - const modifiedColumn = await within(table).findByText('Last modified'); - const actionsColumn = await within(table).findByText('Actions'); - - expect(nameColumn).toBeInTheDocument(); - expect(filterTypeColumn).toBeInTheDocument(); - expect(groupKeyColumn).toBeInTheDocument(); - expect(clauseColumn).toBeInTheDocument(); - expect(modifiedColumn).toBeInTheDocument(); - expect(actionsColumn).toBeInTheDocument(); + const nameColumns = await within(table).findAllByText('Name'); + const filterTypeColumns = await within(table).findAllByText('Filter Type'); + const groupKeyColumns = await within(table).findAllByText('Group Key'); + const clauseColumns = await within(table).findAllByText('Clause'); + const modifiedColumns = await within(table).findAllByText('Last modified'); + const actionsColumns = await within(table).findAllByText('Actions'); + + expect(nameColumns.length).toBeGreaterThan(0); + expect(filterTypeColumns.length).toBeGreaterThan(0); + expect(groupKeyColumns.length).toBeGreaterThan(0); + expect(clauseColumns.length).toBeGreaterThan(0); + expect(modifiedColumns.length).toBeGreaterThan(0); + expect(actionsColumns.length).toBeGreaterThan(0); }); it('renders correct action buttons with write permission', async () => { diff --git a/superset-frontend/src/pages/UsersList/UsersList.test.tsx b/superset-frontend/src/pages/UsersList/UsersList.test.tsx index 361fe2bc00d..19ec8fe1b52 100644 --- a/superset-frontend/src/pages/UsersList/UsersList.test.tsx +++ b/superset-frontend/src/pages/UsersList/UsersList.test.tsx @@ -151,21 +151,21 @@ describe('UsersList', () => { const table = screen.getByRole('table'); expect(table).toBeInTheDocument(); - const fnameColumn = await within(table).findByText('First name'); - const lnameColumn = await within(table).findByText('Last name'); - const usernameColumn = await within(table).findByText('Username'); - const emailColumn = await within(table).findByText('Email'); - const rolesColumn = await within(table).findByText('Roles'); - const actionsColumn = await within(table).findByText('Actions'); - const activeColumn = await within(table).findByText('Is active?'); - - expect(fnameColumn).toBeInTheDocument(); - expect(lnameColumn).toBeInTheDocument(); - expect(usernameColumn).toBeInTheDocument(); - expect(emailColumn).toBeInTheDocument(); - expect(rolesColumn).toBeInTheDocument(); - expect(activeColumn).toBeInTheDocument(); - expect(actionsColumn).toBeInTheDocument(); + const fnameColumns = await within(table).findAllByText('First name'); + const lnameColumns = await within(table).findAllByText('Last name'); + const usernameColumns = await within(table).findAllByText('Username'); + const emailColumns = await within(table).findAllByText('Email'); + const rolesColumns = await within(table).findAllByText('Roles'); + const actionsColumns = await within(table).findAllByText('Actions'); + const activeColumns = await within(table).findAllByText('Is active?'); + + expect(fnameColumns.length).toBeGreaterThan(0); + expect(lnameColumns.length).toBeGreaterThan(0); + expect(usernameColumns.length).toBeGreaterThan(0); + expect(emailColumns.length).toBeGreaterThan(0); + expect(rolesColumns.length).toBeGreaterThan(0); + expect(activeColumns.length).toBeGreaterThan(0); + expect(actionsColumns.length).toBeGreaterThan(0); }); it('opens add modal when Add User button is clicked', async () => {