Skip to content

Commit

Permalink
feat(gatsby-cypress): Add ability to pass in options in getTestElement (
Browse files Browse the repository at this point in the history
  • Loading branch information
sidharthachatterjee authored and GatsbyJS Bot committed Jul 15, 2019
1 parent c0ebd60 commit 8eaddef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby-cypress/src/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import apiHandler, { waitForAPI } from "./api-handler"

Cypress.Commands.add(`getTestElement`, selector =>
cy.get(`[data-testid="${selector}"]`)
Cypress.Commands.add(`getTestElement`, (selector, options = {}) =>
cy.get(`[data-testid="${selector}"]`, options)
)

const TIMEOUT = 9999
Expand Down

0 comments on commit 8eaddef

Please sign in to comment.