diff --git a/README.md b/README.md index 9a325e65b2..4bbb1f9a81 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,14 @@ yarn run lint-all:fix Make sure you've set up pre-commit hooks as described above. This will ensure that linting is automatically run on staged changes before every commit. +### Flower + +[Flower](https://flower.readthedocs.io/en/latest/) is a Celery monitoring dashboard. It is available on http://localhost:5555 after you run services: + +```bash +yarn run services +``` + ### Storybook Storybook is a development environment for UI components. If this is your first encounter with this tool, you can check [this presentation](https://docs.google.com/presentation/d/10JL4C9buygWsTbT62Ym149Yh9zSR9nY_ZqFumBKUY0o/edit?usp=sharing) or [its website](https://storybook.js.org/). You are encouraged to use it any time you need to develop a new UI component. It is especially suitable for smaller to middle size components that represent basic UI building blocks. diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Main.vue b/contentcuration/contentcuration/frontend/accounts/pages/Main.vue index 8c1574404c..46fabc4b92 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Main.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Main.vue @@ -167,7 +167,7 @@ } .links span:not(:last-child)::after { - margin: 0 8px; + margin: 0 8px 0 12px; font-size: 14pt; color: var(--v-grey-base); vertical-align: middle; diff --git a/contentcuration/contentcuration/frontend/administration/constants.js b/contentcuration/contentcuration/frontend/administration/constants.js index 622e4bb955..c0af1bb794 100644 --- a/contentcuration/contentcuration/frontend/administration/constants.js +++ b/contentcuration/contentcuration/frontend/administration/constants.js @@ -1,4 +1,4 @@ -export const RouterNames = { +export const RouteNames = { CHANNELS: 'CHANNELS', CHANNEL: 'CHANNEL', USERS: 'USERS', diff --git a/contentcuration/contentcuration/frontend/administration/pages/AdministrationAppError.vue b/contentcuration/contentcuration/frontend/administration/pages/AdministrationAppError.vue index 237e425896..353ed6c1b2 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/AdministrationAppError.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/AdministrationAppError.vue @@ -26,7 +26,7 @@ - - - diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/publish/__tests__/publishModal.spec.js b/contentcuration/contentcuration/frontend/channelEdit/components/publish/__tests__/publishModal.spec.js index d2525228c5..3a8def4786 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/publish/__tests__/publishModal.spec.js +++ b/contentcuration/contentcuration/frontend/channelEdit/components/publish/__tests__/publishModal.spec.js @@ -70,11 +70,17 @@ describe('publishModal', () => { wrapper.setData({ step: steps.VALIDATION, loading: false }); }); it('next button should go to the next step if enabled', () => { - wrapper.find('[data-test="next"]').trigger('click'); + wrapper + .find('[data-test="incomplete-modal"]') + .find('form') + .trigger('submit'); expect(wrapper.vm.step).toBe(steps.PUBLISH); }); it('cancel button should close modal', () => { - wrapper.find('[data-test="cancel"]').trigger('click'); + wrapper + .find('[data-test="incomplete-modal"]') + .find('button[name="cancel"]') + .trigger('click'); expect(wrapper.emitted('input')[0][0]).toBe(false); }); }); @@ -93,22 +99,38 @@ describe('publishModal', () => { publishChannel.mockReset(); }); it('publish button should trigger form validation', () => { - wrapper.vm.$refs.form.validate = jest.fn(); - wrapper.find('[data-test="publish"]').trigger('click'); - expect(wrapper.vm.$refs.form.validate).toHaveBeenCalled(); + expect(wrapper.text()).not.toContain( + "Please describe what's new in this version before publishing" + ); + wrapper + .find('[data-test="confirm-publish-modal"]') + .find('form') + .trigger('submit'); + expect(wrapper.text()).toContain( + "Please describe what's new in this version before publishing" + ); }); it('publishing should be blocked if no description is given', () => { - wrapper.find('[data-test="publish"]').trigger('click'); + wrapper + .find('[data-test="confirm-publish-modal"]') + .find('form') + .trigger('submit'); expect(publishChannel).not.toHaveBeenCalled(); }); it('publish button should call publishChannel if description is given', () => { let description = 'Version notes'; wrapper.setData({ publishDescription: description }); - wrapper.find('[data-test="publish"]').trigger('click'); + wrapper + .find('[data-test="confirm-publish-modal"]') + .find('form') + .trigger('submit'); expect(publishChannel).toHaveBeenCalled(); }); it('cancel button on publish step should also close modal', () => { - wrapper.find('[data-test="back"]').trigger('click'); + wrapper + .find('[data-test="confirm-publish-modal"]') + .find('button[name="cancel"]') + .trigger('click'); expect(wrapper.emitted('input')[0][0]).toBe(false); }); }); diff --git a/contentcuration/contentcuration/frontend/channelEdit/constants.js b/contentcuration/contentcuration/frontend/channelEdit/constants.js index c94d3adf4e..f36ebc5630 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/constants.js +++ b/contentcuration/contentcuration/frontend/channelEdit/constants.js @@ -1,6 +1,6 @@ import { AssessmentItemTypes } from 'shared/constants'; -export const RouterNames = { +export const RouteNames = { SANDBOX: 'SANDBOX', TREE_ROOT_VIEW: 'TREE_ROOT_VIEW', TREE_VIEW: 'TREE_VIEW', diff --git a/contentcuration/contentcuration/frontend/channelEdit/pages/AddNextStepsPage.vue b/contentcuration/contentcuration/frontend/channelEdit/pages/AddNextStepsPage.vue index 7c30a41377..c00ad6a9f8 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/pages/AddNextStepsPage.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/pages/AddNextStepsPage.vue @@ -12,7 +12,7 @@ diff --git a/contentcuration/contentcuration/frontend/shared/views/PrimaryDialog.vue b/contentcuration/contentcuration/frontend/shared/views/PrimaryDialog.vue deleted file mode 100644 index 0990b7405d..0000000000 --- a/contentcuration/contentcuration/frontend/shared/views/PrimaryDialog.vue +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - {{ title }} - - - {{ text }} - - - - - - - - - - - - - - - - - - diff --git a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelTokenModal.vue b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelTokenModal.vue index 951cbe3702..8cfb53b294 100644 --- a/contentcuration/contentcuration/frontend/shared/views/channel/ChannelTokenModal.vue +++ b/contentcuration/contentcuration/frontend/shared/views/channel/ChannelTokenModal.vue @@ -1,34 +1,27 @@ - + {{ $tr('copyTokenInstructions') }} - - - - {{ $tr('close') }} - - - +
- {{ title }} -
- {{ text }} -
{{ $tr('copyTokenInstructions') }}