mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: Cancel alert is not appearing to all native filters modal fields (#15925)
This commit is contained in:
committed by
GitHub
parent
eb78f4332f
commit
cc704dd53a
@@ -119,22 +119,12 @@ describe('FiltersConfigModal', () => {
|
||||
expect(onCancel.mock.calls).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('shows correct alert message for an unsaved filter', async () => {
|
||||
it('shows correct alert message for unsaved filters', async () => {
|
||||
addFilter();
|
||||
await clickCancel();
|
||||
expect(onCancel.mock.calls).toHaveLength(0);
|
||||
expect(wrapper.find(Alert).text()).toContain(
|
||||
'Are you sure you want to cancel? "New filter" will not be saved.',
|
||||
);
|
||||
});
|
||||
|
||||
it('shows correct alert message for 2 unsaved filters', async () => {
|
||||
addFilter();
|
||||
addFilter();
|
||||
await clickCancel();
|
||||
expect(onCancel.mock.calls).toHaveLength(0);
|
||||
expect(wrapper.find(Alert).text()).toContain(
|
||||
'Are you sure you want to cancel? "New filter" and "New filter" will not be saved.',
|
||||
'There are unsaved changes.',
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user