mirror of
https://github.com/cypress-io/cypress.git
synced 2026-03-01 12:29:24 -06:00
fix: studio generated assertions now use proper past tense for assertions (#28593)
* Fix studio generated assertions to use proper past tense of assertions * changelog entry --------- Co-authored-by: Emily Rohrbough <emilyrohrbough@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
<!-- See the ../guides/writing-the-cypress-changelog.md for details on writing the changelog. -->
|
||||
## 13.6.3
|
||||
|
||||
_Released 1/2/2024 (PENDING)_
|
||||
|
||||
**Bugfixes:**
|
||||
|
||||
- When generating assertions via Cypress Studio, the preview of the generated assertions now correctly displays the past tense of 'expected' instead of 'expect'. Fixed in [#28593](https://github.com/cypress-io/cypress/pull/28593).
|
||||
|
||||
## 13.6.2
|
||||
|
||||
_Released 12/26/2023_
|
||||
|
||||
@@ -138,19 +138,19 @@ it('visits a basic html page', () => {
|
||||
cy.get('.command-name-assert').should('have.length', 5)
|
||||
|
||||
// (1) Assert Enabled
|
||||
cy.get('.command-name-assert').should('contain.text', 'expect <button#increment> to be enabled')
|
||||
cy.get('.command-name-assert').should('contain.text', 'expected <button#increment> to be enabled')
|
||||
|
||||
// (2) Assert Visible
|
||||
cy.get('.command-name-assert').should('contain.text', 'expect <button#increment> to be visible')
|
||||
cy.get('.command-name-assert').should('contain.text', 'expected <button#increment> to be visible')
|
||||
|
||||
// (3) Assert Text
|
||||
cy.get('.command-name-assert').should('contain.text', 'expect <button#increment> to have text Increment')
|
||||
cy.get('.command-name-assert').should('contain.text', 'expected <button#increment> to have text Increment')
|
||||
|
||||
// (4) Assert Id
|
||||
cy.get('.command-name-assert').should('contain.text', 'expect <button#increment> to have id increment')
|
||||
cy.get('.command-name-assert').should('contain.text', 'expected <button#increment> to have id increment')
|
||||
|
||||
// (5) Assert Attr
|
||||
cy.get('.command-name-assert').should('contain.text', 'expect <button#increment> to have attr onclick with the value increment()')
|
||||
cy.get('.command-name-assert').should('contain.text', 'expected <button#increment> to have attr onclick with the value increment()')
|
||||
})
|
||||
|
||||
cy.get('button').contains('Save Commands').click()
|
||||
|
||||
@@ -734,7 +734,7 @@ export const useStudioStore = defineStore('studioRecorder', {
|
||||
const elementString = stringifyActual($el)
|
||||
const assertionString = args[0].replace(/\./g, ' ')
|
||||
|
||||
let message = `expect **${elementString}** to ${assertionString}`
|
||||
let message = `expected **${elementString}** to ${assertionString}`
|
||||
|
||||
if (args[1]) {
|
||||
message = `${message} **${args[1]}**`
|
||||
|
||||
Reference in New Issue
Block a user