Upgrade @gitlab/ui to v30.0.0

This @gitlab/ui version implements Pajamas-compliant toasts.
Under the hood, we have dropped vue-toasted in favor of BootsrapVue as
our toasts library.

Changelog: changed
parent 3925df42
...@@ -2,7 +2,7 @@ import { GlToast } from '@gitlab/ui'; ...@@ -2,7 +2,7 @@ import { GlToast } from '@gitlab/ui';
import Vue from 'vue'; import Vue from 'vue';
Vue.use(GlToast); Vue.use(GlToast);
const instance = new Vue(); export const instance = new Vue();
export default function showGlobalToast(...args) { export default function showGlobalToast(...args) {
return instance.$toast.show(...args); return instance.$toast.show(...args);
......
...@@ -47,11 +47,11 @@ end ...@@ -47,11 +47,11 @@ end
def check_undo_button_display def check_undo_button_display
expect(page).to have_content('template applied') expect(page).to have_content('template applied')
expect(page).to have_css('.toasted-container') expect(page).to have_css('.b-toaster')
end end
def check_content_reverted(template_content) def check_content_reverted(template_content)
find('.toasted-container a', text: 'Undo').click find('.b-toaster a', text: 'Undo').click
expect(page).not_to have_content(template_content) expect(page).not_to have_content(template_content)
expect(page).to have_css('.template-type-selector .dropdown-toggle-text') expect(page).to have_css('.template-type-selector .dropdown-toggle-text')
end end
......
...@@ -5,6 +5,7 @@ import * as actions from '~/emoji/awards_app/store/actions'; ...@@ -5,6 +5,7 @@ import * as actions from '~/emoji/awards_app/store/actions';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
jest.mock('@sentry/browser'); jest.mock('@sentry/browser');
jest.mock('~/vue_shared/plugins/global_toast');
describe('Awards app actions', () => { describe('Awards app actions', () => {
afterEach(() => { afterEach(() => {
......
import Vue from 'vue'; import toast, { instance } from '~/vue_shared/plugins/global_toast';
import toast from '~/vue_shared/plugins/global_toast';
describe('Global toast', () => { describe('Global toast', () => {
let spyFunc; let spyFunc;
beforeEach(() => { beforeEach(() => {
spyFunc = jest.spyOn(Vue.prototype.$toast, 'show').mockImplementation(() => {}); spyFunc = jest.spyOn(instance.$toast, 'show').mockImplementation(() => {});
}); });
afterEach(() => { afterEach(() => {
...@@ -18,7 +17,7 @@ describe('Global toast', () => { ...@@ -18,7 +17,7 @@ describe('Global toast', () => {
toast(arg1, arg2); toast(arg1, arg2);
expect(Vue.prototype.$toast.show).toHaveBeenCalledTimes(1); expect(instance.$toast.show).toHaveBeenCalledTimes(1);
expect(Vue.prototype.$toast.show).toHaveBeenCalledWith(arg1, arg2); expect(instance.$toast.show).toHaveBeenCalledWith(arg1, arg2);
}); });
}); });
...@@ -908,13 +908,12 @@ ...@@ -908,13 +908,12 @@
resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8" resolved "https://registry.yarnpkg.com/@gitlab/tributejs/-/tributejs-1.0.0.tgz#672befa222aeffc83e7d799b0500a7a4418e59b8"
integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw== integrity sha512-nmKw1+hB6MHvlmPz63yPwVs1qQkycHwsKgxpEbzmky16Y6mL4EJMk3w1b8QlOAF/AIAzjCERPhe/R4MJiohbZw==
"@gitlab/ui@29.38.1": "@gitlab/ui@30.0.0":
version "29.38.1" version "30.0.0"
resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-29.38.1.tgz#93ab2ad7cb8008b3050599b452b626c109630e97" resolved "https://registry.yarnpkg.com/@gitlab/ui/-/ui-30.0.0.tgz#1f7c4bb2dfa1a987f5673f865384ebcbbe3d7a3e"
integrity sha512-5sKdbZI9Q9S7KW3/ybN40tFS/KInm76cog8O0SMe2Ne026ZZ18CAHEMvkfoVXTN3XMkWZnMlk92s8f/WqM5//A== integrity sha512-+o8t4TVm8MOV6llX6zq9HKuggRWKuPDZfbmjptNJA0CwW3IGPV/WcgFuSozHW8x2lxE0ZfrD7vMwI0dfTwghwQ==
dependencies: dependencies:
"@babel/standalone" "^7.0.0" "@babel/standalone" "^7.0.0"
"@gitlab/vue-toasted" "^1.3.0"
bootstrap-vue "2.18.1" bootstrap-vue "2.18.1"
copy-to-clipboard "^3.0.8" copy-to-clipboard "^3.0.8"
dompurify "^2.2.9" dompurify "^2.2.9"
...@@ -932,11 +931,6 @@ ...@@ -932,11 +931,6 @@
resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.6.1.tgz#0d8f3ff9f51b05f7c80b9a107727703d48997e4e" resolved "https://registry.yarnpkg.com/@gitlab/visual-review-tools/-/visual-review-tools-1.6.1.tgz#0d8f3ff9f51b05f7c80b9a107727703d48997e4e"
integrity sha512-vY8K1igwZFoEOmU0h4E7XTLlilsQ4ylPr27O01UsSe6ZTKi6oEMREsRAEpNIUgRlxUARCsf+Opp4pgSFzFkFcw== integrity sha512-vY8K1igwZFoEOmU0h4E7XTLlilsQ4ylPr27O01UsSe6ZTKi6oEMREsRAEpNIUgRlxUARCsf+Opp4pgSFzFkFcw==
"@gitlab/vue-toasted@^1.3.0":
version "1.3.0"
resolved "https://registry.yarnpkg.com/@gitlab/vue-toasted/-/vue-toasted-1.3.0.tgz#f21550d4ce406ee5f99447a02abf36250ecc922d"
integrity sha512-xexu7YbbIkQS5FDqPaewrOTQ4/myth5VyU8+hWZ+Tj1e5CuAlDNha3dHbvwyLW8/2flm/2mfslFNPAX2DRe8ZQ==
"@istanbuljs/load-nyc-config@^1.0.0": "@istanbuljs/load-nyc-config@^1.0.0":
version "1.1.0" version "1.1.0"
resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment