mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
change providers.json
This commit is contained in:
parent
0424992358
commit
e2da57287b
@ -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')
|
||||||
|
|||||||
@ -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', () => {
|
|||||||
'She’s incapable of controlling her limbs when her kitty is around. The obsession grows every day. Ps. That’s a sleep sack she’s in. Not a starfish outfit. Al...',
|
'She’s incapable of controlling her limbs when her kitty is around. The obsession grows every day. Ps. That’s a sleep sack she’s 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)
|
||||||
@ -154,5 +155,6 @@ describe('EmbedComponent.vue', () => {
|
|||||||
expect(wrapper.find('.embed-preview-image--clickable')).toEqual({})
|
expect(wrapper.find('.embed-preview-image--clickable')).toEqual({})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
Loading…
x
Reference in New Issue
Block a user