Skip to content

Commit

Permalink
test: update cypress test to work with portalled draggable cell
Browse files Browse the repository at this point in the history
  • Loading branch information
mgadewoll committed Sep 13, 2024
1 parent 685ada5 commit 46b8699
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packages/eui/src/components/datagrid/data_grid.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ describe('EuiDataGrid', () => {
.realHover()
.realMouseDown({ position: 'center' })
.realMouseMove(0, 0) // start drag
.realMouseMove(200, 0) // move
.realMouseMove(200, 34) // move (absolute coordinates)
.realMouseUp();

cy.get('[data-test-subj=dataGridHeaderCell-a]').should(
Expand All @@ -585,7 +585,7 @@ describe('EuiDataGrid', () => {
.realHover()
.realMouseDown({ position: 'center' })
.realMouseMove(0, 0) // start drag
.realMouseMove(-200, 0) // move
.realMouseMove(0, 34) // move (absolute coordinates)
.realMouseUp();

cy.get('[data-test-subj=dataGridHeaderCell-a]').should(
Expand Down Expand Up @@ -646,6 +646,9 @@ describe('EuiDataGrid', () => {
cy.wait(50);

cy.get('[data-test-subj=dataGridHeaderCell-a]').realHover();

cy.wait(50); // wait until actions button transition is progressed enough for the button to be clickable

cy.get('[data-test-subj=dataGridHeaderCellActionButton-a]').realClick();

cy.get('.euiPanel').should('have.focus');
Expand Down

0 comments on commit 46b8699

Please sign in to comment.