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'
let oEmbedProvidersFile = fs.readFileSync(
path.join(__dirname, '../../../../public/providers.json'),
path.join(__dirname, './providers.json'),
'utf8',
)
// some providers allow a format parameter
// we need JSON
oEmbedProvidersFile = oEmbedProvidersFile.replace(/\{format\}/g, 'json')

View File

@ -68,6 +68,8 @@ describe('EmbedComponent.vue', () => {
selector: '.embed-preview-image--clickable',
})
})
})
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...',
)
})
})
describe('onEmbed returned embed data with html', () => {
beforeEach(() => {
@ -141,7 +142,7 @@ describe('EmbedComponent.vue', () => {
expect(wrapper.vm.checkedAlwaysAllowEmbeds).toBe(true)
})
it('click do not show iframe', () => {
it('click cancel do not show iframe', () => {
wrapper.setData({ showOverlay: true })
wrapper.find('.ds-button-ghost').trigger('click')
expect(wrapper.vm.showOverlay).toBe(false)
@ -154,5 +155,6 @@ describe('EmbedComponent.vue', () => {
expect(wrapper.find('.embed-preview-image--clickable')).toEqual({})
})
})
})
})
})
})