Bird
0
0

Given the following Cypress test code, what will be the test name shown in the test report?

medium📝 Predict Output Q13 of 15
Cypress - Writing Tests
Given the following Cypress test code, what will be the test name shown in the test report?
describe('Login Page', () => {
  it('accepts valid credentials', () => {
    // test steps
  })
})
ALogin Page accepts valid credentials
Baccepts valid credentials
CLogin Page
Ddescribe Login Page it accepts valid credentials
Step-by-Step Solution
Solution:
  1. Step 1: Understand how Cypress combines test names

    Cypress combines the describe block name and the it test name separated by a space for the full test name.
  2. Step 2: Combine the strings

    The describe is 'Login Page' and the it is 'accepts valid credentials', so combined they form 'Login Page accepts valid credentials'.
  3. Final Answer:

    Login Page accepts valid credentials -> Option A
  4. Quick Check:

    Full test name = describe + it [OK]
Quick Trick: Test name = describe block + it block text [OK]
Common Mistakes:
  • Choosing only the it block name
  • Choosing only the describe block name
  • Including keywords like 'describe' or 'it' in the name

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Cypress Quizzes