mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Remove all code related to vue-portal
This commit is contained in:
parent
93a0e6654d
commit
2831af469a
@ -1,19 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<portal-target
|
||||
id="portal"
|
||||
name="modal"
|
||||
/>
|
||||
<report-modal />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ReportModal from './ReportModal.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
ReportModal
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1,17 +1,14 @@
|
||||
import { shallowMount, render, mount, createLocalVue } from '@vue/test-utils'
|
||||
import ReportModal from './ReportModal.vue'
|
||||
import ModalTestbed from './ModalTestbed.vue'
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import { getters, mutations } from '../store/modal'
|
||||
import Styleguide from '@human-connection/styleguide'
|
||||
import portal from 'portal-vue'
|
||||
|
||||
const localVue = createLocalVue()
|
||||
|
||||
localVue.use(Vuex)
|
||||
localVue.use(Styleguide)
|
||||
localVue.use(portal)
|
||||
|
||||
describe('ReportModal.vue', () => {
|
||||
let Wrapper
|
||||
@ -50,7 +47,7 @@ describe('ReportModal.vue', () => {
|
||||
'modal/SET_OPEN': mutations.SET_OPEN
|
||||
}
|
||||
})
|
||||
return mount(ModalTestbed, { store, mocks, localVue })
|
||||
return mount(ReportModal, { store, mocks, localVue })
|
||||
}
|
||||
|
||||
beforeEach(() => {
|
||||
@ -77,8 +74,8 @@ describe('ReportModal.vue', () => {
|
||||
describe('by default', () => {
|
||||
it('buttons enabled', () => {
|
||||
const expected = { disabled: 'disabled' }
|
||||
const cancelButton = wrapper.findAll('#portal footer button').at(0)
|
||||
const confirmButton = wrapper.findAll('#portal footer button').at(1)
|
||||
const cancelButton = wrapper.findAll('footer button').at(0)
|
||||
const confirmButton = wrapper.findAll('footer button').at(1)
|
||||
expect(cancelButton.attributes().disabled).toBeUndefined()
|
||||
expect(confirmButton.attributes().disabled).toBeUndefined()
|
||||
})
|
||||
@ -105,8 +102,8 @@ describe('ReportModal.vue', () => {
|
||||
// problem here. I made a workaround by checking the inital
|
||||
// in a separate test case above.
|
||||
clickAction()
|
||||
const cancelButton = wrapper.findAll('#portal footer button').at(0)
|
||||
const confirmButton = wrapper.findAll('#portal footer button').at(1)
|
||||
const cancelButton = wrapper.findAll('footer button').at(0)
|
||||
const confirmButton = wrapper.findAll('footer button').at(1)
|
||||
expect(cancelButton.attributes()).toEqual(
|
||||
expect.objectContaining(expected)
|
||||
)
|
||||
|
||||
@ -92,9 +92,6 @@
|
||||
</div>
|
||||
</ds-container>
|
||||
<div id="overlay" />
|
||||
<no-ssr>
|
||||
<portal-target name="modal" />
|
||||
</no-ssr>
|
||||
<no-ssr>
|
||||
<report-modal />
|
||||
</no-ssr>
|
||||
|
||||
@ -116,8 +116,7 @@ module.exports = {
|
||||
'cookie-universal-nuxt',
|
||||
'@nuxtjs/apollo',
|
||||
'@nuxtjs/axios',
|
||||
'@nuxtjs/style-resources',
|
||||
'portal-vue/nuxt'
|
||||
'@nuxtjs/style-resources'
|
||||
],
|
||||
|
||||
/*
|
||||
|
||||
@ -52,7 +52,6 @@
|
||||
"linkify-it": "~2.1.0",
|
||||
"nuxt": "~2.4.5",
|
||||
"nuxt-env": "~0.1.0",
|
||||
"portal-vue": "~1.5.1",
|
||||
"string-hash": "^1.1.3",
|
||||
"tiptap": "^1.14.0",
|
||||
"tiptap-extensions": "^1.13.0",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user