Skip to content
Snippets Groups Projects
Unverified Commit dc676e1e authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

Add custom warning message when leaving creating a model (#34527)

* Update isNavigationAllowed logic to prevent new model creation

* Rename tests

* Add routes for model creation

* Allow null card in setup

* Add test case for creating models in isNavigationAllowed

* Add simple model creation test

* Add workaround for metabase#34523

* Remove "Discard changes?" confirmation modal when creating a model
- use a single "Cancel" button
- remove custom cancel edit warning

* Update e2e test

* Remove redundant function bodies

* Bring back unsaved changes warning on cancel click when editing a model

* Add beforeunload event test for creating models

* Fix unit test

* Fix unit test and isNavigationAllowed

* Use regexp

* Add notebook prefix

* Drop mock prefix

* Use it.each

* Use it.each

* Use it.each

* Use it.each

* Use it.each

* Use it.each

* Refactor isNavigationAllowed

* Remove identifier

* Update comment

* Add a test for the cancel button

* Rename /home route to / so that redirection after cancelling creating a model works

* Add a test case for saving a new model

* Avoid using fetchMock directly in QueryBuilder unit tests

* Remove setupCollectionsEndpointsByIds in favor of setupCollectionByIdEndpoint

* Remove default value for card parameter
parent b48db691
Branches
Tags
No related merge requests found
Showing
with 354 additions and 186 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment