mirror of
https://github.com/cypress-io/cypress.git
synced 2026-02-12 18:19:45 -06:00
test: fix studio windows tests (#31258)
This commit is contained in:
@@ -84,7 +84,7 @@ windowsWorkflowFilters: &windows-workflow-filters
|
||||
- equal: [ develop, << pipeline.git.branch >> ]
|
||||
# use the following branch as well to ensure that v8 snapshot cache updates are fully tested
|
||||
- equal: [ 'update-v8-snapshot-cache-on-develop', << pipeline.git.branch >> ]
|
||||
- equal: [ 'feat/implement_bidi', << pipeline.git.branch >> ]
|
||||
- equal: [ 'mschile/studio/windows_url_fix', << pipeline.git.branch >> ]
|
||||
- matches:
|
||||
pattern: /^release\/\d+\.\d+\.\d+$/
|
||||
value: << pipeline.git.branch >>
|
||||
|
||||
@@ -695,10 +695,11 @@ describe('studio functionality', () => {
|
||||
|
||||
cy.get('button.studio-copy').click()
|
||||
|
||||
cy.get('@writeText').should('have.been.calledOnceWith',
|
||||
`/* ==== Generated with Cypress Studio ==== */
|
||||
cy.get('#increment').click();
|
||||
/* ==== End Cypress Studio ==== */`)
|
||||
if (Cypress.platform === 'win32') {
|
||||
cy.get('@writeText').should('have.been.calledOnceWith', '/* ==== Generated with Cypress Studio ==== */\r\ncy.get(\'#increment\').click();\r\n/* ==== End Cypress Studio ==== */')
|
||||
} else {
|
||||
cy.get('@writeText').should('have.been.calledOnceWith', '/* ==== Generated with Cypress Studio ==== */\ncy.get(\'#increment\').click();\n/* ==== End Cypress Studio ==== */')
|
||||
}
|
||||
})
|
||||
|
||||
it('copies the studio commands to the clipboard using studio toolbar', () => {
|
||||
@@ -713,10 +714,11 @@ cy.get('#increment').click();
|
||||
|
||||
cy.findByTestId('studio-toolbar-controls').findByTestId('copy-commands').click()
|
||||
|
||||
cy.get('@writeText').should('have.been.calledOnceWith',
|
||||
`/* ==== Generated with Cypress Studio ==== */
|
||||
cy.get('#increment').click();
|
||||
/* ==== End Cypress Studio ==== */`)
|
||||
if (Cypress.platform === 'win32') {
|
||||
cy.get('@writeText').should('have.been.calledOnceWith', '/* ==== Generated with Cypress Studio ==== */\r\ncy.get(\'#increment\').click();\r\n/* ==== End Cypress Studio ==== */')
|
||||
} else {
|
||||
cy.get('@writeText').should('have.been.calledOnceWith', '/* ==== Generated with Cypress Studio ==== */\ncy.get(\'#increment\').click();\n/* ==== End Cypress Studio ==== */')
|
||||
}
|
||||
})
|
||||
|
||||
it('removes pending commands if the page is reloaded', () => {
|
||||
@@ -867,7 +869,12 @@ describe('studio functionality', () => {
|
||||
|
||||
cy.location().its('hash').should('equal', '#/specs').and('not.contain', 'testId=').and('not.contain', 'studio=')
|
||||
cy.findByTestId('alert').should('contain.text', 'Spec not found')
|
||||
cy.findByTestId('alert-body').should('contain.text', 'There is no spec matching the following location: cypress/e2e/spec.cy.js')
|
||||
|
||||
if (Cypress.platform === 'win32') {
|
||||
cy.findByTestId('alert-body').should('contain.text', 'There is no spec matching the following location: cypress\\e2e\\spec.cy.js')
|
||||
} else {
|
||||
cy.findByTestId('alert-body').should('contain.text', 'There is no spec matching the following location: cypress/e2e/spec.cy.js')
|
||||
}
|
||||
})
|
||||
|
||||
it('appends the studio commands to the commands added to the test on the file system when file watching is disabled', () => {
|
||||
|
||||
Reference in New Issue
Block a user