File tree Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Expand file tree Collapse file tree 2 files changed +38
-1
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,36 @@ describe("capabilityHelper.js", () => {
44
44
} ) ;
45
45
} ) ;
46
46
47
+ it ( "handle cypress version passed" , ( ) => {
48
+ let zip_url = "bs://<random>" ;
49
+ let cypress_version = "version"
50
+ let bsConfig = {
51
+ auth : {
52
+ username : "random" ,
53
+ access_key : "random" ,
54
+ } ,
55
+ browsers : [
56
+ {
57
+ browser : "chrome" ,
58
+ os : "Windows 10" ,
59
+ versions : [ "78" , "77" ] ,
60
+ } ,
61
+ ] ,
62
+ cypress_version : cypress_version ,
63
+ connection_settings : {
64
+ local : true
65
+ }
66
+ } ;
67
+ return capabilityHelper
68
+ . caps ( bsConfig , { zip_url : zip_url } )
69
+ . then ( function ( data ) {
70
+ chai . assert . equal ( JSON . parse ( data ) . cypress_version , cypress_version ) ;
71
+ } )
72
+ . catch ( ( error ) => {
73
+ chai . assert . fail ( "Promise error" ) ;
74
+ } ) ;
75
+ } ) ;
76
+
47
77
it ( "handle empty test_suite" , ( ) => {
48
78
let zip_url = undefined ;
49
79
let incorrectBsConfig = {
Original file line number Diff line number Diff line change @@ -1135,8 +1135,15 @@ describe('utils', () => {
1135
1135
let message = constant . userMessages . FATAL_NETWORK_ERROR + '\n'
1136
1136
+ constant . userMessages . RETRY_LIMIT_EXCEEDED + '\n'
1137
1137
+ constant . userMessages . CHECK_DASHBOARD_AT + dashboard_url
1138
- utils . getNetworkErrorMessage ( dashboard_url ) ;
1139
1138
expect ( utils . getNetworkErrorMessage ( dashboard_url ) ) . to . eq ( chalk . red ( message ) )
1140
1139
} ) ;
1141
1140
} ) ;
1141
+
1142
+ describe ( '#versionChangedMessage' , ( ) => {
1143
+ it ( 'should return proper error message with placeholders replaced' , ( ) => {
1144
+ let preferredVersion = "v1" , actualVersion = "v2" ;
1145
+ let message = constant . userMessages . CYPRESS_VERSION_CHANGED . replace ( "<preferredVersion>" , preferredVersion ) . replace ( "<actualVersion>" , actualVersion ) ;
1146
+ expect ( utils . versionChangedMessage ( preferredVersion , actualVersion ) ) . to . eq ( message )
1147
+ } ) ;
1148
+ } )
1142
1149
} ) ;
You can’t perform that action at this time.
0 commit comments