stable

Clone or download

Read-only

Refactoring: Fix mutations and actions

Part of story #11347 have a UI to access Move artifact No functional changes expected. - Add jasmine 3.2's async matchers for rest querier tests. It reminds of the jasmine-promise-matchers plugin we added for AngularJS and helps a little with asserting native promises. - Reworked the mutations. I'm sick of getter/setter in Vuex mutations. No more! Now we have meaningful operations. States that are changed together should be in the same mutation. Booleans are "reset" when switched to false. As a result, there is a lot fewer mutations. - Actions do the redirection. Since "window" can't be spied upon by jasmine, we need a little helper module that we can then rewire. Business as usual. As a result, there is no more "should_redirect" flag. Change-Id: Ib6607684b6e6e456d7377c1d3eb1174b083d3377

Modified Files

Name
M .eslintrc +2 −0 Go to diff View file
M package-lock.json +3 −3 Go to diff View file
M package.json +1 −1 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/api/rest-querier.spec.js +28 −30 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/app.spec.js +1 −1 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/components/MoveModal.vue +6 −26 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/components/TrackerSelector.vue +1 −3 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/store/actions.js +42 −48 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/store/actions.spec.js +68 −56 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/store/mutations.js +36 −39 Go to diff View file
M plugins/tracker/www/scripts/artifact-action-buttons/src/store/state.js +1 −1 Go to diff View file
A plugins/tracker/www/scripts/artifact-action-buttons/src/window-helper.js +22 −0 Go to diff View file