fix: wrap playground selectors in double quotes if not included (#18442)

Co-authored-by: Chris Breiding <chrisbreiding@gmail.com>
Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
This commit is contained in:
Manuel Abascal
2021-11-18 16:23:57 -05:00
committed by GitHub
parent 09e7efd0ca
commit e9accb4c8d
4 changed files with 10 additions and 10 deletions

View File

@@ -132,7 +132,7 @@ describe('src/cypress/selector_playground', () => {
selectorPriority: ['data-foo'],
})
expect(SelectorPlayground.getSelector($div)).to.eq('[data-foo=bar]')
expect(SelectorPlayground.getSelector($div)).to.eq('[data-foo="bar"]')
SelectorPlayground.defaults({
onElement ($el) {
@@ -148,7 +148,7 @@ describe('src/cypress/selector_playground', () => {
},
})
expect(SelectorPlayground.getSelector($div)).to.eq('[data-foo=bar]')
expect(SelectorPlayground.getSelector($div)).to.eq('[data-foo="bar"]')
})
})
})

View File

@@ -14,7 +14,7 @@
"@babel/code-frame": "7.8.3",
"@cypress/bower-kendo-ui": "0.0.2",
"@cypress/sinon-chai": "2.9.1",
"@cypress/unique-selector": "0.4.2",
"@cypress/unique-selector": "0.4.4",
"@cypress/webpack-preprocessor": "0.0.0-development",
"@cypress/what-is-circular": "1.0.1",
"@packages/config": "0.0.0-development",

View File

@@ -566,17 +566,17 @@ describe('studio record', () => {
getFrame().find('p').click()
verifyCommandLog(1, {
selector: '[data-cy=btn1]',
selector: '[data-cy="btn1"]',
name: 'click',
})
verifyCommandLog(2, {
selector: '[data-test=btn2]',
selector: '[data-test="btn2"]',
name: 'click',
})
verifyCommandLog(3, {
selector: '[data-testid=btn3]',
selector: '[data-testid="btn3"]',
name: 'click',
})

View File

@@ -2495,10 +2495,10 @@
resolved "https://registry.yarnpkg.com/@cypress/sinon-chai/-/sinon-chai-2.9.1.tgz#1705c0341bc286740979b1b1cac89b7f5d34d6bc"
integrity sha512-qwFQ1urghF3mv7CFSDw/LEqIQP12qqKLuW7p6mXR92HP5fPNlgNiZVITWVsupDg7JpOEKfeRTVearo9mkk/5eg==
"@cypress/unique-selector@0.4.2":
version "0.4.2"
resolved "https://registry.yarnpkg.com/@cypress/unique-selector/-/unique-selector-0.4.2.tgz#ac4f12d2a0306e9d8ac1d49a12ad40dfbf2f1aeb"
integrity sha512-eTzoodaUESR8lAJkgvTVnF9bs7M1P4aiDsH4jbywcszb3IjJRLLvrMRZp7VDWID33to79EiqyfOudOzXXpuJjQ==
"@cypress/unique-selector@0.4.4":
version "0.4.4"
resolved "https://registry.yarnpkg.com/@cypress/unique-selector/-/unique-selector-0.4.4.tgz#5e14be46ba5d7a4dad8eda07c0fd431a99227d83"
integrity sha512-hAvSShXUzIRpYDJNIC/OoQA/8stGcYGG2surkY/pMVElqWmAcfccjOWYbuii/ktP8zqUcPzxWKWCuFauJYWEfQ==
dependencies:
css.escape "^1.5.1"