Closed tanuj-vishnoi closed 3 years ago
Hi @jennifer-shehane ,
Revisiting this, after updating to version Cypress 5.0.0 I'm still getting this redirect error. The message in the cypress client is different now though. You can see the redirect is still resolving to https://app.songtrust.com/__/#add/success/{id} (stripping out the /songwriter/ ).
The test is passing with this error when I run it locally, but fails command line (or in CI). Command line client crashes with "The automation client disconnected. Cannot continue running tests."
I am using experimentalSourceRewriting: true in my config.
Sample code:
`describe('Smoke Test', () => {
Cypress.on('uncaught:exception', (err, runnable) => {
// returning false here prevents Cypress from
// failing the test
return false
});
beforeEach(() => {
cy.server()
cy.route('POST', 'app.songtrust.com/api/v1/lod/').as('lod');
});
it('IMRO ', () => {
//Begin funnel workflow
cy.request({
method: 'POST',
url: 'app.songtrust.com/api/v1/user/login/',
body: {
username: 'demo@songtrust.com',
password: 'testing',
}
});
cy.visit('app.songtrust.com/songwriters/#add');
cy.findByTestId('show-lod-pros-button')
.click();
cy.findByTestId('lod-pro-selections')
.select('IMRO', {force:true});
cy.findByTestId('lod-pro-selections')
.should('have.value', 'IMRO');
cy.findByTestId('continue-to-form')
.click();
/////LOD Form - IMRO///////
cy.url()
.should('contains', '/songwriters/#add/lod-form'); //assert URL
cy.findByTestId('first-name')
.should('be.visible')
.type('Frank');
cy.findByTestId('middle-name')
.should('be.visible');
cy.findByTestId('last-name')
.should('be.visible')
.type('Ikiseh');
cy.findByTestId('id_email')
.should('be.visible')
.type('imro@songtrust.com');
cy.findByTestId('id_writer_id')
.should('be.visible')
.type('01047205098');
cy.findByTestId('lod-us-representation')
.should('be.visible')
.select('ASCAP', {force: true});
cy.findByTestId('pubco_no')
.should('be.visible');
cy.findByTestId('pubco_yes')
.should('be.visible')
.click();
cy.findByTestId('id_publishing_company')
.should('be.visible')
.type('Alpha Music');
cy.findByTestId('publishing_company_pro')
.should('be.visible')
.select('ASCAP', {force: true});
cy.findByTestId('id_publisher_id')
.should('be.visible')
.type('697403510');
//Signature Modal
cy.get('.type-toggle')
.should('be.visible')
.click();
cy.get('.typed-signature-field')
.should('be.visible')
.type('Frank Ikiseh');
//Submit Form - IMRO
cy.get('.standard')
.should('be.visible')
.click();
cy.wait('@lod').should((xhr) => {
expect(xhr.status, 'successfull POST').to.equal(201);
});
//Thank you modal - NOT WORKING DUE TO CYPRESS BUG
});
});
It seems to be an issue with the hash # in the URL, I still have the same issue.
Same problem here with the website http://automationpractice.com I am running Cypress 5.1.0, with or without experimentalSourceRewriting flag makes no difference. Sharing code is tricky since it happens on the account creation page.
Error: EISDIR: illegal operation on a directory, open 'C:\Users\SanderL\AppData\Roaming\Cypress\cy\production\projects\MyStore-a3d227b386b9f2d993939c6fc2b3ad9b\bundles'_
cypress.json:
{
"testFiles": "**/*.feature",
"viewportWidth": 1800,
"viewportHeight": 1000,
"defaultCommandTimeout": 10000,
"pageLoadTimeout": 30000,
"video": false,
"baseUrl": "http://automationpractice.com"
}
Hi, I got the same problem while using github actions. Here is my output:
Error: EISDIR: illegal operation on a directory, open '/github/home/.config/Cypress/cy/production/projects/workspace-3ef6b2ad9cc100f006a5d4a7217ff063/bundles'
It happens only on specific tests, I have other tests passing before this crash.
I have no issues locally, headless or not, only while working in a CI or when I reproduce locally the CI using https://github.com/nektos/act. I'm using Cypress 6.0.1, and I use the container cypress/included:6.0.1 when using act.
EDIT:
Using
´experimentalSourceRewriting: true´ in the cypress config solved it, but then I had others trouble such as JS illegal invocation at some places where there is window.location.reload()
. Looking at the code in the browser, it looks like the code added by cypress around mine make it crashed.
Same issue here. Using 6.0.0 (Also tried 6.0.1 and downgrades). The error shows up as soon as cypress starts, after running "npx cypress open" Adding "experimentalSourceRewriting": true, to cypress.json did not solve the issue.
Can reproduce still with this example, although the error is different.
it('illegal operation on a directory', () => {
cy.visit('https://www.staging.nutheorie.be/')
cy.get('select[name="city"]').eq(0).select('auto-theorie-cursus-amsterdam')
cy.wait(500)
cy.get('[name="course"]').select('ma 29 maart 2021')
cy.get('.btn-block > button[type="submit"]').eq(0).click()
})
The code for this is done in cypress-io/cypress#16394, but has yet to be released. We'll update this issue and reference the changelog when it's released.
Released in 7.3.0
.
This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v7.3.0, please open a new issue.
Current behavior:
Error message is thrown
Desired behavior:
On clicking signIn button user should land on dashboard page
How to reproduce:
Submit userId and password in respective fields and hit signIn
Test code:
Additional Info (images, stack traces, etc)