@@ -18,11 +18,11 @@ const mockOEmbedResponse = {
18
18
maxheight : 1000 ,
19
19
title : 'My title' ,
20
20
maxwidth : 1250 ,
21
- url : 'https://display.hubstairs.com /my-video' ,
21
+ url : 'https://display.nfinite.app /my-video' ,
22
22
html : `<iframe
23
23
width="200px"
24
24
height="160px"
25
- src="https://display.hubstairs.com /my-video"
25
+ src="https://display.nfinite.app /my-video"
26
26
frameborder="0"
27
27
allow="autoplay; fullscreen; vr"
28
28
allowvr
@@ -32,7 +32,7 @@ webkitallowfullscreen="true"
32
32
>
33
33
</iframe>` ,
34
34
provider_name : 'Hubstairs' ,
35
- provider_url : 'http://www.hubstairs.com /' ,
35
+ provider_url : 'http://www.nfinite.app /' ,
36
36
}
37
37
38
38
const mockOEmbedResponseResponsive = {
@@ -43,11 +43,11 @@ const mockOEmbedResponseResponsive = {
43
43
width : 1250 ,
44
44
height : 1000 ,
45
45
title : 'My title' ,
46
- url : 'https://display.hubstairs.com /v1/my-video' ,
46
+ url : 'https://display.nfinite.app /v1/my-video' ,
47
47
html : `<div style="padding:125% 0 0 0;position:relative;">
48
48
<iframe
49
49
style="position:absolute;top:0;left:0;width:100%;height:100%;"
50
- src="https://display.hubstairs.com /v1/my-video"
50
+ src="https://display.nfinite.app /v1/my-video"
51
51
frameborder="0"
52
52
allow="autoplay; fullscreen; vr"
53
53
allowvr
@@ -58,7 +58,7 @@ webkitallowfullscreen="true"
58
58
</iframe>
59
59
</div>` ,
60
60
provider_name : 'Hubstairs' ,
61
- provider_url : 'http://www.hubstairs.com /' ,
61
+ provider_url : 'http://www.nfinite.app /' ,
62
62
}
63
63
64
64
beforeEach ( ( ) => {
@@ -94,13 +94,13 @@ describe('getOEmbedParameters', () => {
94
94
95
95
describe ( 'getOEmbedData' , ( ) => {
96
96
test ( 'doesn’t operate on non-Hubstairs urls' , async ( ) => {
97
- await expect ( getOEmbedData ( { url : 'https://nothubstairs .com' } ) ) . rejects . toThrowError ( HubstairsError )
97
+ await expect ( getOEmbedData ( { url : 'https://notnfinite .com' } ) ) . rejects . toThrowError ( HubstairsError )
98
98
} )
99
99
100
100
test ( 'returns a json oembed response' , async ( ) => {
101
101
expect . assertions ( 2 )
102
102
fetch . mockResponse ( JSON . stringify ( mockOEmbedResponse ) , { status : 200 } )
103
- const result = await getOEmbedData ( { url : 'https://display.hubstairs.com /v1/1234' } )
103
+ const result = await getOEmbedData ( { url : 'https://display.nfinite.app /v1/1234' } )
104
104
expect ( typeof result ) . toBe ( 'object' )
105
105
expect ( result . type ) . toBe ( 'rich' )
106
106
} )
@@ -115,34 +115,34 @@ describe('createEmbed', () => {
115
115
116
116
test ( 'returns the already-initialized iframe' , ( ) => {
117
117
const container = html `< div data-hubstairs-initialized > </ div > `
118
- const iframe = html `< iframe src ="https://display.hubstairs.com /v1/5e417dbac5d2651adbe509ec "> </ iframe > `
118
+ const iframe = html `< iframe src ="https://display.nfinite.app /v1/5e417dbac5d2651adbe509ec "> </ iframe > `
119
119
container . appendChild ( iframe )
120
120
expect ( createEmbed ( { html : 'html' } , container ) ) . toEqual ( iframe )
121
121
} )
122
122
123
123
test ( 'creates an iframe from the oembed data' , ( ) => {
124
124
const container = html `< div > </ div > `
125
- const markup = '<iframe src="https://display.hubstairs.com /v1/5e417dbac5d2651adbe509ec"></iframe>'
125
+ const markup = '<iframe src="https://display.nfinite.app /v1/5e417dbac5d2651adbe509ec"></iframe>'
126
126
127
127
const embed = createEmbed ( { html : markup } , container )
128
128
expect ( container . getAttribute ( 'data-hubstairs-initialized' ) ) . toBe ( 'true' )
129
129
expect ( embed . outerHTML ) . toEqual (
130
- html `< iframe src ="https://display.hubstairs.com /v1/5e417dbac5d2651adbe509ec " style ="display: none; "> </ iframe > `
130
+ html `< iframe src ="https://display.nfinite.app /v1/5e417dbac5d2651adbe509ec " style ="display: none; "> </ iframe > `
131
131
. outerHTML ,
132
132
)
133
133
} )
134
134
135
135
test ( 'returns the iframe from a responsive embed' , ( ) => {
136
136
const container = html `< div > </ div > `
137
137
const markup =
138
- '<div style="position:relative;padding-bottom:42.5%;height:0"><iframe src="https://display.hubstairs.com /v1/5e417dbac5d2651adbe509ec" style="position:absolute;top:0;left:0;width:100%;height:100%" frameborder="0"></iframe></div>'
138
+ '<div style="position:relative;padding-bottom:42.5%;height:0"><iframe src="https://display.nfinite.app /v1/5e417dbac5d2651adbe509ec" style="position:absolute;top:0;left:0;width:100%;height:100%" frameborder="0"></iframe></div>'
139
139
140
140
const embed = createEmbed ( { html : markup } , container )
141
141
expect ( container . getAttribute ( 'data-hubstairs-initialized' ) ) . toBe ( 'true' )
142
142
expect ( embed . outerHTML ) . toEqual (
143
143
html `
144
144
< iframe
145
- src ="https://display.hubstairs.com /v1/5e417dbac5d2651adbe509ec "
145
+ src ="https://display.nfinite.app /v1/5e417dbac5d2651adbe509ec "
146
146
style ="position:absolute;top:0;left:0;width:100%;height:100% "
147
147
frameborder ="0 "
148
148
> </ iframe >
0 commit comments