Bird
0
0

You want to customize the default support file path to cypress/helpers/support.js. How do you configure Cypress to use this new support file?

hard📝 Application Q9 of 15
Cypress - Basics and Setup
You want to customize the default support file path to cypress/helpers/support.js. How do you configure Cypress to use this new support file?
AImport support.js inside plugins/index.js
BRename the file to index.js inside cypress/support
CSet "supportFile": "cypress/helpers/support.js" in cypress.config.js
DPlace support.js inside fixtures folder
Step-by-Step Solution
Solution:
  1. Step 1: Know how to change support file path

    Cypress allows changing support file path via supportFile option in cypress.config.js.
  2. Step 2: Apply correct configuration

    Setting supportFile to cypress/helpers/support.js tells Cypress to load that file instead of default.
  3. Final Answer:

    Set "supportFile": "cypress/helpers/support.js" in cypress.config.js -> Option C
  4. Quick Check:

    Use supportFile config to change support path [OK]
Quick Trick: Change supportFile in config to customize support path [OK]
Common Mistakes:
  • Renaming files without config change
  • Importing support in plugins
  • Placing support in fixtures

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes