@@ -36,14 +36,14 @@ describe('The session Api', function() {
3636 } )
3737
3838 it ( 'returns connection' , function ( ) {
39- cy . openConnection ( { fileId } ) . then ( ( { connection } ) => {
39+ cy . openFileConnection ( { fileId } ) . then ( ( { connection } ) => {
4040 cy . wrap ( connection ) . its ( 'documentId' ) . should ( 'equal' , fileId )
4141 cy . closeConnection ( connection )
4242 } )
4343 } )
4444
4545 it ( 'provides initial content' , function ( ) {
46- cy . openConnection ( { fileId, filePath } ) . then ( ( { connection, data } ) => {
46+ cy . openFileConnection ( { fileId, filePath } ) . then ( ( { connection, data } ) => {
4747 cy . wrap ( data ) . its ( 'content' ) . should ( 'eql' , '## Hello world\n' )
4848 cy . closeConnection ( connection )
4949 } )
@@ -63,7 +63,7 @@ describe('The session Api', function() {
6363
6464 beforeEach ( function ( ) {
6565 cy . uploadTestFile ( )
66- . then ( ( fileId ) => cy . openConnection ( { fileId } ) )
66+ . then ( ( fileId ) => cy . openFileConnection ( { fileId } ) )
6767 . then ( ( { connection : con } ) => {
6868 connection = con
6969 } )
@@ -116,7 +116,7 @@ describe('The session Api', function() {
116116 cy . uploadTestFile ( )
117117 . then ( ( id ) => {
118118 fileId = id
119- return cy . openConnection ( { fileId, filePath } )
119+ return cy . openFileConnection ( { fileId, filePath } )
120120 } )
121121 . then ( ( { connection : con } ) => {
122122 connection = con
@@ -151,7 +151,7 @@ describe('The session Api', function() {
151151 documentState,
152152 manualSave : true ,
153153 } )
154- cy . openConnection ( { fileId, filePath } )
154+ cy . openFileConnection ( { fileId, filePath } )
155155 . as ( 'joining' )
156156 . its ( 'data.documentState' )
157157 . should ( 'eql' , documentState )
@@ -183,7 +183,7 @@ describe('The session Api', function() {
183183 . then ( ( ) => cy . clearCookies ( ) )
184184 . then ( ( ) => {
185185 return cy
186- . openConnection ( { filePath : '' , token : shareToken } )
186+ . openShareConnection ( { filePath : '' , token : shareToken } )
187187 . then ( ( { connection : con } ) => {
188188 connection = con
189189 } )
@@ -223,7 +223,7 @@ describe('The session Api', function() {
223223 documentState,
224224 manualSave : true ,
225225 } )
226- cy . openConnection ( { filePath : '' , token : shareToken } )
226+ cy . openShareConnection ( { filePath : '' , token : shareToken } )
227227 . as ( 'joining' )
228228 . its ( 'data.documentState' )
229229 . should ( 'eql' , documentState )
@@ -247,15 +247,15 @@ describe('The session Api', function() {
247247 cy . log ( token )
248248 shareToken = token
249249 cy . clearCookies ( )
250- cy . openConnection ( { filePath : '' , token : shareToken } ) . then ( ( { connection : con } ) => {
250+ cy . openShareConnection ( { filePath : '' , token : shareToken } ) . then ( ( { connection : con } ) => {
251251 connection = con
252252 } )
253253 } )
254254 } )
255255
256256 it ( 'does not send initial content if other session is alive but did not push any steps' , function ( ) {
257257 let joining
258- cy . openConnection ( { filePath : '' , token : shareToken } )
258+ cy . openShareConnection ( { filePath : '' , token : shareToken } )
259259 . then ( ( { connection : con , data } ) => {
260260 joining = con
261261 return data
@@ -271,7 +271,7 @@ describe('The session Api', function() {
271271 cy . pushSteps ( { connection, steps : [ messages . update ] , version } )
272272 . its ( 'version' )
273273 . should ( 'eql' , 0 )
274- cy . openConnection ( { filePath : '' , token : shareToken } )
274+ cy . openShareConnection ( { filePath : '' , token : shareToken } )
275275 . then ( ( { connection : con , data } ) => {
276276 joining = con
277277 return data
@@ -312,7 +312,7 @@ describe('The session Api', function() {
312312 . its ( 'version' )
313313 . should ( 'eql' , 0 )
314314 cy . log ( 'Other user creates session' )
315- cy . openConnection ( { filePath : '' , token : shareToken } ) . then ( ( { connection : con } ) => {
315+ cy . openShareConnection ( { filePath : '' , token : shareToken } ) . then ( ( { connection : con } ) => {
316316 joining = con
317317 } )
318318 cy . log ( 'Initial user closes session' )
@@ -330,7 +330,7 @@ describe('The session Api', function() {
330330 // Skipped for now since the behaviour chanced by not cleaning up the state on close/create
331331 it . skip ( 'ignores steps stored after close cleaned up' , function ( ) {
332332 cy . pushAndClose ( { connection, steps : [ messages . update ] , version } )
333- cy . openConnection ( { filePath : '' , token : shareToken } )
333+ cy . openShareConnection ( { filePath : '' , token : shareToken } )
334334 . then ( ( { connection : con , data } ) => {
335335 connection = con
336336 return data
0 commit comments