Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
c91f2d3
feat: .should()/.and() are now queries.
BlueWinds Dec 28, 2022
de19704
Fixes for various issues in original commit
BlueWinds Dec 29, 2022
18206a8
Merge remote-tracking branch 'origin/develop' into issue-25134-should…
BlueWinds Dec 29, 2022
ef4a45f
Fix bad subject after verifyUpcomingAssertions [run ci]
BlueWinds Dec 29, 2022
e3e8bb5
Fixes for several more issues [run ci]
BlueWinds Dec 29, 2022
4d5e952
Merge remote-tracking branch 'origin/develop' into issue-25134-should…
BlueWinds Dec 29, 2022
d4e1f61
Update readFile() to be a query
BlueWinds Jan 3, 2023
04bdadf
Merge remote-tracking branch 'origin/develop' into issue-25134-should…
BlueWinds Jan 3, 2023
ac3f049
Fixes for various issues; still WIP
BlueWinds Jan 3, 2023
34c4650
Fix for remaining known failures [run ci]
BlueWinds Jan 4, 2023
55a50b2
Fix last two tests [run ci]
BlueWinds Jan 4, 2023
06c8362
Fix for remaining known failures [run ci]
BlueWinds Jan 4, 2023
58c53b8
Merge remote-tracking branch 'origin/develop' into issue-25134-should…
BlueWinds Jan 5, 2023
cdf8da7
Add additional assertion test, fix log message name [run ci]
BlueWinds Jan 11, 2023
cfc6551
Additional test fixes
BlueWinds Jan 11, 2023
4f5e65d
Fix for additional test failures [run ci]
BlueWinds Jan 11, 2023
e623112
Merge branch 'develop' into issue-25134-should-as-query
Jan 23, 2023
48ab58d
Merge branch 'develop' into issue-25134-should-as-query
Jan 24, 2023
11422b9
Update cypress-example-kitchensink commit hash
BlueWinds Jan 24, 2023
ed2e933
Clean up no-longer-needed stack trace logic
BlueWinds Jan 24, 2023
cc7b011
Merge branch 'develop' into issue-25134-should-as-query
Jan 24, 2023
26be2d7
Add entry to changelog
BlueWinds Jan 24, 2023
e0a97ee
Merge branch 'release/13.0.0' into issue-25134-should-as-query
Feb 1, 2023
04b5966
Merge branch 'issue-25134-should-as-query' of github.com:cypress-io/c…
BlueWinds Feb 1, 2023
4dc8617
Fix changelog again
BlueWinds Feb 2, 2023
9dc14b1
Fix changelog again
BlueWinds Feb 2, 2023
cba984e
Tweak changelog validation to work better on release branches
BlueWinds Feb 2, 2023
5bb5eaf
add versions.
emilyrohrbough Feb 2, 2023
d6ad5ab
Add existance assertion chaining tests
BlueWinds Feb 3, 2023
6e37fa5
Merge branch 'issue-25134-should-as-query' of github.com:cypress-io/c…
BlueWinds Feb 3, 2023
2cc4352
Update packages/driver/cypress/e2e/commands/assertions.cy.js
Feb 3, 2023
f4a4a08
Restore removed code that turns out to be necessary
BlueWinds Feb 6, 2023
273fe58
One more try at fixing stack pointers in all situations
BlueWinds Feb 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cli/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ _Released 01/31/2023 (PENDING)_

**Breaking Changes:**

- The [`.should()` and `.and()`](/api/commands/should) assertions are now queries. This means that they are fully retryable, and it is safe to chain further commands that interact with the DOM after them. Assertions are also now re-run as part of aliases. Addressed in [#25296](https://github.com/cypress-io/cypress/pull/25296).
- The [`cy.readFile()`](/api/commands/readfile) command is now retry-able as a [query command](https://on.cypress.io/retry-ability). This should not affect any tests using it; the functionality is unchanged. However, it can no longer be overwritten using [`Cypress.Commands.overwrite()`](/api/cypress-api/custom-commands#Overwrite-Existing-Commands). Addressed in [#25595](https://github.com/cypress-io/cypress/pull/25595).

## 12.5.1

_Released 02/10/2023 (PENDING)_
_Released 02/10/2023_

**Dependency Updates:**

Expand Down Expand Up @@ -46,6 +47,7 @@ _Released 01/27/2023_
**Dependency Updates:**

- Upgraded [`ua-parser-js`](https://github.com/faisalman/ua-parser-js) from `0.7.24` to `0.7.33` to address this [security vulnerability](https://github.com/faisalman/ua-parser-js/security/advisories/GHSA-fhg7-m89q-25r3) where crafting a very-very-long user-agent string with specific pattern, an attacker can turn the script to get stuck processing for a very long time which results in a denial of service (DoS) condition. Addressed in [#25561](https://github.com/cypress-io/cypress/pull/25561).
>>>>>>> e0a97ee948549138b35774a011ca7ef5da849a13

## 12.4.0

Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/settings/project/RecordKey.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ describe('<RecordKey />', () => {
cy.get('code').as('Record key input')
.should('be.visible')
.contains('code', key).should('not.exist')
.get('[aria-label="Record Key Visibility Toggle"]').as('Password Toggle')

cy.get('[aria-label="Record Key Visibility Toggle"]').as('Password Toggle')
.click()

cy.contains('code', key).should('be.visible')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,14 +205,14 @@ describe('<ExpandableFileChooser />', () => {
.type(newExtension, { delay: 0 })

// Validate it's in there
.get(extensionInputSelector)
cy.get(extensionInputSelector)
.should('have.value', newExtension)

// debounce should cause this to hit
.get('@onUpdateExtensionSpy').should('not.have.been.calledWith', newExtension)
cy.get('@onUpdateExtensionSpy').should('not.have.been.calledWith', newExtension)

// once the debounce is resolved, this will hit
.get('@onUpdateExtensionSpy').should('have.been.calledWith', newExtension)
cy.get('@onUpdateExtensionSpy').should('have.been.calledWith', newExtension)
})

it('renders expanded content slot when row is clicked', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/app/src/specs/generators/FileChooser.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,10 +237,10 @@ describe('<FileChooser />', () => {
.should('have.value', newExtension)

// debounce should cause this to hit
.get('@onUpdateExtensionSpy').should('not.have.been.calledWith', newExtension)
cy.get('@onUpdateExtensionSpy').should('not.have.been.calledWith', newExtension)

// once the debounce is resolved, this will hit
.get('@onUpdateExtensionSpy').should('have.been.calledWith', newExtension)
cy.get('@onUpdateExtensionSpy').should('have.been.calledWith', newExtension)
})

it('fires a selectFile event when a file is clicked on', () => {
Expand Down
19 changes: 19 additions & 0 deletions packages/driver/cypress/e2e/commands/aliasing.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,6 +511,25 @@ describe('src/cy/commands/aliasing', () => {
// so we just have the primitive value "3" as our subject.
cy.get('@itemCount').should('eq', 3)
})

it('retries assertions', () => {
const obj = { value: 'a' }

cy.on('command:retry', () => {
// On the first retry, set it to 0. After that, increment it.
obj.value = typeof obj.value === 'number' ? obj.value + 1 : 0
})

cy.wrap(obj).its('value').should('gt', 0).as('val')

cy.get('@val').should('eq', 2)
})

it('includes assertions in the subject chain', () => {
cy.get('#button').should('have.css', 'font-family').as('font')

cy.get('@font').should('be.a', 'string')
})
})

context('#getAlias', () => {
Expand Down
Loading