-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: cy.press() #31398
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cy.press() #31398
Changes from 31 commits
c3f4f85
5abbb60
6f5da33
4748f31
f0f5dc0
98063fc
7ec4c8b
c8b61e8
6600009
30bfc52
a12e15f
2e84355
a33bcef
a1f9a27
1ca097c
3637665
7744213
2636de5
fe3a435
8956584
39ffe62
9d60c4d
1b183e5
dc42d30
14d8822
a13c69d
da743c3
98b12c7
9af2e37
a9ac681
e01d3df
c30265b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# Bump this version to force CI to re-create the cache from scratch. | ||
|
||
3-18-2024:4:25 | ||
4-3-2025 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,9 @@ | |
"jsdoc-format": false, | ||
// for now keep the Cypress NPM module API | ||
// in its own file for simplicity | ||
"no-single-declare-module": false | ||
"no-single-declare-module": false, | ||
// This is detecting necessary qualifiers as unnecessary | ||
"no-unnecessary-qualifier": false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. whats the reason we are doing this? is it related to the keys only having one value in it, i.e "tab"? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was getting thrown by L#1758 - tslint thinks the ( |
||
}, | ||
"linterOptions": { | ||
"exclude": [ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,21 @@ | ||
describe('__placeholder__/commands/actions/press', () => { | ||
describe('src/cy/commands/actions/press', () => { | ||
it('dispatches the tab keypress to the AUT', () => { | ||
cy.visit('/fixtures/input_events.html') | ||
// Non-BiDi firefox is not supported | ||
if (Cypress.browser.family === 'firefox' && Cypress.browserMajorVersion() < 135) { | ||
return | ||
} | ||
|
||
cy.get('#focus').focus().then(async () => { | ||
try { | ||
await Cypress.automation('key:press', { key: 'Tab' }) | ||
} catch (e) { | ||
if (e.message && (e.message as string).includes('key:press')) { | ||
cy.log(e.message) | ||
// TODO: Webkit is not supported. https://github.com/cypress-io/cypress/issues/31054 | ||
if (Cypress.isBrowser('webkit')) { | ||
return | ||
} | ||
|
||
return | ||
} | ||
cy.visit('/fixtures/input_events.html') | ||
|
||
throw e | ||
} | ||
cy.press(Cypress.Keyboard.Keys.TAB) | ||
|
||
cy.get('#keyup').should('have.value', 'Tab') | ||
cy.get('#keydown').should('have.value', 'Tab') | ||
|
||
cy.get('#keydown').should('have.value', 'Tab') | ||
}) | ||
cy.get('#keyup').should('have.value', 'Tab') | ||
}) | ||
}) |
Uh oh!
There was an error while loading. Please reload this page.