Challenge - 5 Problems
Percy Integration Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
❓ Predict Output
intermediate2:00remaining
Percy snapshot command output
What is the output result of running this Cypress test code with Percy integration?
Cypress
describe('Visual test', () => { it('takes a Percy snapshot', () => { cy.visit('https://example.com') cy.percySnapshot('Homepage') }) })
Attempts:
2 left
💡 Hint
Check if Percy plugin is properly installed and configured in Cypress.
✗ Incorrect
When Percy is correctly integrated, cy.percySnapshot sends a snapshot to Percy service and the test passes.
❓ assertion
intermediate2:00remaining
Correct assertion for Percy snapshot existence
Which assertion correctly verifies that a Percy snapshot was created during a Cypress test run?
Cypress
cy.percySnapshot('Login Page') // What assertion verifies snapshot creation?
Attempts:
2 left
💡 Hint
Percy snapshots are sent to an external service, not visible in the DOM.
✗ Incorrect
Percy snapshots are sent to the Percy service and not directly visible in the Cypress test DOM, so assertions in Cypress cannot verify snapshot creation.
🔧 Debug
advanced2:00remaining
Debugging Percy snapshot failure in Cypress
You run a Cypress test with cy.percySnapshot but no snapshots appear in Percy dashboard. What is the most likely cause?
Attempts:
2 left
💡 Hint
Check environment variables and Percy configuration.
✗ Incorrect
Without a valid Percy token, snapshots are not uploaded to Percy service, so they won't appear in the dashboard.
🧠 Conceptual
advanced2:00remaining
Understanding Percy snapshot timing in Cypress tests
When is the best time to call cy.percySnapshot in a Cypress test to capture the correct visual state?
Attempts:
2 left
💡 Hint
Think about when the page is fully ready visually.
✗ Incorrect
To capture the correct visual state, wait for the page to fully load and animations to finish before taking a Percy snapshot.
❓ framework
expert2:00remaining
Configuring Percy with Cypress in CI environment
Which configuration step is essential to ensure Percy snapshots are uploaded during CI runs with Cypress?
Attempts:
2 left
💡 Hint
Think about authentication with Percy service in CI.
✗ Incorrect
The PERCY_TOKEN authenticates the CI environment to upload snapshots to Percy. Without it, uploads fail silently.