diff --git a/packages/demo/src/examples/slickgrid/example19.ts b/packages/demo/src/examples/slickgrid/example19.ts index a34d7c444..18a677e79 100644 --- a/packages/demo/src/examples/slickgrid/example19.ts +++ b/packages/demo/src/examples/slickgrid/example19.ts @@ -220,8 +220,8 @@ export class Example19 { const itemDetail = item; // let's add some extra properties to our item for a better async simulation - itemDetail.assignee = randomNames[this.randomNumber(0, 10)]; - itemDetail.reporter = randomNames[this.randomNumber(0, 10)]; + itemDetail.assignee = randomNames[this.randomNumber(0, 9)]; + itemDetail.reporter = randomNames[this.randomNumber(0, 9)]; // resolve the data after delay specified resolve(itemDetail); diff --git a/test/cypress/e2e/example19.cy.ts b/test/cypress/e2e/example19.cy.ts index a5193b7a4..5194ee6e8 100644 --- a/test/cypress/e2e/example19.cy.ts +++ b/test/cypress/e2e/example19.cy.ts @@ -47,21 +47,21 @@ describe('Example 19 - Row Detail View', () => { const alertStub = cy.stub(); cy.on('window:alert', alertStub); - cy.get('#grid19') - .find('.slick-cell + .dynamic-cell-detail .innerDetailView_2 .container_2') - .as('detailContainer'); + cy.get('#grid19').find('.slick-cell + .dynamic-cell-detail .innerDetailView_2 .container_2').as('detailContainer'); cy.get('@detailContainer') .find('input') .invoke('val') - .then(text => assignee = text as string); + .then((text) => (assignee = `${text || ''}`)); + + cy.wait(10); cy.get('@detailContainer') .find('[data-test=assignee-btn]') .click() .then(() => { - if (assignee === '') { - expect(alertStub.getCall(0)).to.be.calledWith(`No one is assigned to this task.`); + if (!assignee) { + expect(alertStub.getCall(0)).to.be.calledWith('No one is assigned to this task.'); } else { expect(alertStub.getCall(0)).to.be.calledWith(`Assignee on this task is: ${assignee.toUpperCase()}`); }