chore: Select component refactoring - SaveModal - Iteration 5 (#16446)

* Refactor Select

* Fix Cypress

* Reconcile with master

* Use onChange over onSelect

* Reconcile with latest changes

* Update Cypress

* Update Cypress test

* Fix lint
This commit is contained in:
Geido
2021-09-27 18:14:58 +03:00
committed by GitHub
parent ab9f8cb2ea
commit 271ec6ec75
5 changed files with 28 additions and 24 deletions

View File

@@ -142,12 +142,13 @@ describe('SaveModal', () => {
it('onChange', () => {
const wrapper = getWrapper();
const dashboardId = mockEvent.value;
wrapper.instance().onSliceNameChange(mockEvent);
expect(wrapper.state().newSliceName).toBe(mockEvent.target.value);
wrapper.instance().onDashboardSelectChange(mockEvent);
expect(wrapper.state().saveToDashboardId).toBe(mockEvent.value);
wrapper.instance().onDashboardSelectChange(dashboardId);
expect(wrapper.state().saveToDashboardId).toBe(dashboardId);
});
describe('saveOrOverwrite', () => {