cypress icon indicating copy to clipboard operation
cypress copied to clipboard

TypeError: Cannot read properties of undefined (reading 'indexOf')

Open bhanuprakash026 opened this issue 2 years ago • 1 comments

Current behavior

https://test2.glams.com/cms/api/cms/getall?studio=GLAMSQ&project=GLAMSQ&entity=Models&from=0&size=1000

https://test2.glams.com/cms/api/cms/get?key=DynamicQueryEntity_c4d76642-8f2d-417d-939c-eb44c7ac0c46

These are the API's

I wrote command line like this cy.get('.e-diagram.e-droppable').should('have.length', 1); Above line of code is executing between above two API's, Below I am attaching my img

image

Desired behavior

I want to execute cy.get('.e-diagram.e-droppable').should('have.length', 1) this line of code after above 2 API's calls are done

Test code to reproduce

/// import LoginPage from "../PageObjects/LoginPage"

describe("Test suites", () => { const loginApplication = new LoginPage() let data; before(() => { cy.fixture("testdata.json").then((testData) => { data = testData })
}) beforeEach("Visit the application", () => { loginApplication.visit(); cy.saveLocalStorage(); })

it('Should drag and drop DataModel', () => {
    cy.get('[data-uid="Database"] > .e-text-content > .e-icons', {timeout: 5000}).click();
    cy.get('[data-uid="ModelViews"] > .e-text-content > .e-icons').click();
    cy.get('li.e-list-item').contains('CyDepDataModelViewTest').click();
    // cy.wait(1000)
    const object = cy.get('.e-droppable.e-tooltip').should('have.length', 1)
    cy.log(object)
    cy.get('.list-group-item:last-child()')
        .trigger('mousedown', {button: 0}, {force: true})
        .trigger('mousemove', 320, -77, {force: true})
        object.should('have.length', 1).click()
        .trigger('mouseup', {force: true});
})

})

Cypress Version

12.17.1

Node version

18.15.0

Operating System

Windows

Debug Logs

No response

Other

No response

bhanuprakash026 avatar Jul 12 '23 14:07 bhanuprakash026

Hi @bhanuprakash026 , Issues in the repo are reserved for bugs and feature requests. Questions on using Cypress should be directed to Cypress Discord Community Discord chat, it can be helpful for debugging or answering questions on how to use Cypress.

nagash77 avatar Jul 12 '23 18:07 nagash77