@@ -948,14 +948,14 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
948948 } )
949949
950950 it ( 'calls Settings.write with projectRoot and attrs' , function ( ) {
951- return writeProjectId ( 'id-123' ) . then ( ( id ) => {
951+ return writeProjectId ( { id : 'id-123' } ) . then ( ( id ) => {
952952 expect ( id ) . to . eq ( 'id-123' )
953953 } )
954954 } )
955955
956956 // TODO: This
957957 xit ( 'sets generatedProjectIdTimestamp' , function ( ) {
958- return writeProjectId ( 'id-123' ) . then ( ( ) => {
958+ return writeProjectId ( { id : 'id-123' } ) . then ( ( ) => {
959959 expect ( this . project . generatedProjectIdTimestamp ) . to . be . a ( 'date' )
960960 } )
961961 } )
@@ -1016,33 +1016,34 @@ This option will not have an effect in Some-other-name. Tests that rely on web s
10161016
10171017 context ( '#createCiProject' , ( ) => {
10181018 const projectRoot = '/_test-output/path/to/project-e2e'
1019+ const configFile = 'cypress.config.js'
10191020
10201021 beforeEach ( function ( ) {
10211022 this . project = new ProjectBase ( { projectRoot, testingType : 'e2e' } )
10221023 this . newProject = { id : 'project-id-123' }
10231024
10241025 sinon . stub ( user , 'ensureAuthToken' ) . resolves ( 'auth-token-123' )
1025- sinon . stub ( settings , 'write' ) . resolves ( 'project-id-123' )
1026+ sinon . stub ( settings , 'write' ) . resolves ( )
10261027 sinon . stub ( commitInfo , 'getRemoteOrigin' ) . resolves ( 'remoteOrigin' )
10271028 sinon . stub ( api , 'createProject' )
10281029 . withArgs ( { foo : 'bar' } , 'remoteOrigin' , 'auth-token-123' )
10291030 . resolves ( this . newProject )
10301031 } )
10311032
10321033 it ( 'calls api.createProject with user session' , function ( ) {
1033- return createCiProject ( { foo : 'bar' } , projectRoot ) . then ( ( ) => {
1034+ return createCiProject ( { foo : 'bar' , projectRoot } ) . then ( ( ) => {
10341035 expect ( api . createProject ) . to . be . calledWith ( { foo : 'bar' } , 'remoteOrigin' , 'auth-token-123' )
10351036 } )
10361037 } )
10371038
10381039 it ( 'calls writeProjectId with id' , function ( ) {
1039- return createCiProject ( { foo : 'bar' } , projectRoot ) . then ( ( ) => {
1040- expect ( settings . write ) . to . be . calledWith ( projectRoot , { projectId : 'project-id-123' } )
1040+ return createCiProject ( { foo : 'bar' , projectRoot, configFile } ) . then ( ( ) => {
1041+ expect ( settings . write ) . to . be . calledWith ( projectRoot , { projectId : 'project-id-123' } , { configFile } )
10411042 } )
10421043 } )
10431044
10441045 it ( 'returns project id' , function ( ) {
1045- return createCiProject ( { foo : 'bar' } , projectRoot ) . then ( ( projectId ) => {
1046+ return createCiProject ( { foo : 'bar' , projectRoot } ) . then ( ( projectId ) => {
10461047 expect ( projectId ) . to . eql ( this . newProject )
10471048 } )
10481049 } )
0 commit comments