Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ describe('table actions', () => {
fetchMock.callHistory.calls(getTableMetadataEndpoint),
).toHaveLength(1),
);
const refreshButton = getByRole('button', { name: 'sync' });
const refreshButton = getByRole('button', { name: 'Refresh table schema' });
fireEvent.click(refreshButton);
await waitFor(() =>
expect(
Expand All @@ -170,7 +170,9 @@ describe('table actions', () => {
fetchMock.callHistory.calls(getTableMetadataEndpoint),
).toHaveLength(1),
);
const viewButton = getByRole('button', { name: 'eye' });
const viewButton = getByRole('button', {
name: 'Show CREATE VIEW statement',
});
fireEvent.click(viewButton);
await waitFor(() =>
expect(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,9 +270,9 @@ describe('SavedQueryList', () => {

await screen.findByTestId('saved_query-list-view');

const queryButton = await screen.findByRole('button', {
name: /query/i,
});
// Scope to the create button's stable data-test: /query/i also matches the
// per-row "Query preview" and "Copy query URL" action buttons.
const queryButton = await screen.findByTestId('add-saved-query-button');
fireEvent.click(queryButton);

await waitFor(() => {
Expand Down
1 change: 1 addition & 0 deletions superset-frontend/src/pages/SavedQueryList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ function SavedQueryList({
icon: <Icons.PlusOutlined iconSize="m" />,
name: t('Query'),
buttonStyle: 'primary',
'data-test': 'add-saved-query-button',
onClick: () => {
// React Router's basename already includes the application root; passing
// a relative path ensures correct navigation under subdirectory deployments.
Expand Down
Loading