TypeError: Cannot read properties of undefined (reading 'indexOf')
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
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
///
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