From ad0b2a37c2fe587f4efe4920d2e445eca5301600 Mon Sep 17 00:00:00 2001 From: Lachlan Miller Date: Fri, 20 Jan 2023 10:34:32 +1000 Subject: [PATCH] feat: support data-qa selector in selector playground (#25475) --- packages/driver/cypress/e2e/cypress/selector_playground.cy.js | 2 +- packages/driver/src/cypress/selector_playground.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/driver/cypress/e2e/cypress/selector_playground.cy.js b/packages/driver/cypress/e2e/cypress/selector_playground.cy.js index 0bff344d04de..ff938873647f 100644 --- a/packages/driver/cypress/e2e/cypress/selector_playground.cy.js +++ b/packages/driver/cypress/e2e/cypress/selector_playground.cy.js @@ -2,7 +2,7 @@ const { $ } = window.Cypress.$Cypress const SelectorPlayground = Cypress.SelectorPlayground const SELECTOR_DEFAULTS = [ - 'data-cy', 'data-test', 'data-testid', 'id', 'class', 'tag', 'attributes', 'nth-child', + 'data-cy', 'data-test', 'data-testid', 'data-qa', 'id', 'class', 'tag', 'attributes', 'nth-child', ] describe('src/cypress/selector_playground', () => { diff --git a/packages/driver/src/cypress/selector_playground.ts b/packages/driver/src/cypress/selector_playground.ts index 60cf9e1446e7..1b776c8801b6 100644 --- a/packages/driver/src/cypress/selector_playground.ts +++ b/packages/driver/src/cypress/selector_playground.ts @@ -4,7 +4,7 @@ import uniqueSelector from '@cypress/unique-selector' import $utils from './utils' import $errUtils from './error_utils' -const SELECTOR_PRIORITIES = 'data-cy data-test data-testid id class tag attributes nth-child'.split(' ') +const SELECTOR_PRIORITIES = 'data-cy data-test data-testid data-qa id class tag attributes nth-child'.split(' ') type Defaults = { onElement: Cypress.SelectorPlaygroundDefaultsOptions['onElement'] | null