change providers.json

This commit is contained in:
ogerly 2019-10-08 18:56:45 +02:00
parent 0424992358
commit e2da57287b
2 changed files with 7 additions and 4 deletions

View File

@ -3,9 +3,10 @@ import path from 'path'
import minimatch from 'minimatch' import minimatch from 'minimatch'
let oEmbedProvidersFile = fs.readFileSync( let oEmbedProvidersFile = fs.readFileSync(
path.join(__dirname, '../../../../public/providers.json'), path.join(__dirname, './providers.json'),
'utf8', 'utf8',
) )
// some providers allow a format parameter // some providers allow a format parameter
// we need JSON // we need JSON
oEmbedProvidersFile = oEmbedProvidersFile.replace(/\{format\}/g, 'json') oEmbedProvidersFile = oEmbedProvidersFile.replace(/\{format\}/g, 'json')

View File

@ -68,6 +68,8 @@ describe('EmbedComponent.vue', () => {
selector: '.embed-preview-image--clickable', selector: '.embed-preview-image--clickable',
}) })
}) })
}) })
describe('given a href with embed html', () => { describe('given a href with embed html', () => {
@ -91,7 +93,6 @@ describe('EmbedComponent.vue', () => {
'Shes incapable of controlling her limbs when her kitty is around. The obsession grows every day. Ps. Thats a sleep sack shes in. Not a starfish outfit. Al...', 'Shes incapable of controlling her limbs when her kitty is around. The obsession grows every day. Ps. Thats a sleep sack shes in. Not a starfish outfit. Al...',
) )
}) })
})
describe('onEmbed returned embed data with html', () => { describe('onEmbed returned embed data with html', () => {
beforeEach(() => { beforeEach(() => {
@ -141,7 +142,7 @@ describe('EmbedComponent.vue', () => {
expect(wrapper.vm.checkedAlwaysAllowEmbeds).toBe(true) expect(wrapper.vm.checkedAlwaysAllowEmbeds).toBe(true)
}) })
it('click do not show iframe', () => { it('click cancel do not show iframe', () => {
wrapper.setData({ showOverlay: true }) wrapper.setData({ showOverlay: true })
wrapper.find('.ds-button-ghost').trigger('click') wrapper.find('.ds-button-ghost').trigger('click')
expect(wrapper.vm.showOverlay).toBe(false) expect(wrapper.vm.showOverlay).toBe(false)
@ -155,4 +156,5 @@ describe('EmbedComponent.vue', () => {
}) })
}) })
}) })
})
}) })