@@ -1339,6 +1339,14 @@ describe('Migration', { viewportWidth: 1200, retries: { openMode: 2, runMode: 2
1339
1339
cy . get ( 'button' ) . contains ( 'Cancel' ) . click ( )
1340
1340
cy . get ( 'h2' ) . should ( 'not.contain' , 'Change the existing spec file extension' )
1341
1341
} )
1342
+
1343
+ it ( 'shows error if plugins file throws an error' , ( ) => {
1344
+ scaffoldAndVisitLaunchpad ( 'migration-e2e-plugins-throw-error' )
1345
+
1346
+ cy . contains ( 'cypress/plugins/index.js file threw an error.' )
1347
+ cy . contains ( 'Please ensure your pluginsFile is valid and relaunch the migration tool to migrate to Cypress version 10.0.0.' )
1348
+ cy . contains ( 'throw new Error(\'New error from plugin\')' )
1349
+ } )
1342
1350
} )
1343
1351
1344
1352
describe ( 'Migrate custom config files' , ( ) => {
@@ -1509,6 +1517,13 @@ describe('Migrate custom config files', () => {
1509
1517
scaffoldAndVisitLaunchpad ( 'migration-custom-config-file-with-existing-v10-config-file' , [ '--config-file' , 'customConfig.json' ] )
1510
1518
1511
1519
cy . contains ( 'There is both a customConfig.config.js and a customConfig.json file at the location below:' )
1512
- cy . contains ( 'ypress no longer supports customConfig.json, please remove it from your project.' )
1520
+ cy . contains ( 'Cypress no longer supports customConfig.json, please remove it from your project.' )
1521
+ } )
1522
+
1523
+ it ( 'shows error if plugins file do not exist' , ( ) => {
1524
+ scaffoldAndVisitLaunchpad ( 'migration' , [ '--config-file' , 'erroredConfigFiles/incorrectPluginsFile.json' ] )
1525
+
1526
+ cy . contains ( 'foo/bar file threw an error.' )
1527
+ cy . contains ( 'Please ensure your pluginsFile is valid and relaunch the migration tool to migrate to Cypress version 10.0.0.' )
1513
1528
} )
1514
1529
} )
0 commit comments