diff --git a/cypress/e2e/example-rtl.cy.ts b/cypress/e2e/example-rtl.cy.ts index f5b45beb..20371365 100644 --- a/cypress/e2e/example-rtl.cy.ts +++ b/cypress/e2e/example-rtl.cy.ts @@ -79,6 +79,29 @@ describe('Example - RTL (Right-to-Left) Support', () => { .children() .each(($child, index) => expect($child.text()).to.eq(titles[index])); }); + + it('should allow columns to be reordered in both directions in RTL mode', () => { + const reorderedTitles = [ + 'Title', '% Complete', 'Start', 'Finish', 'Duration', 'Effort Driven', + 'Priority', 'Status', 'Assignee', 'Department', 'Project', 'Completed' + ]; + + // Move Duration after Finish + cy.contains('#myGrid .slick-header-column', 'Finish').then(($target) => { + cy.contains('#myGrid .slick-header-column', 'Duration').drag($target); + }); + + cy.get('#myGrid').find('.slick-header-columns').children() + .each(($child, index) => expect($child.text()).to.eq(reorderedTitles[index])); + + // Move Duration back + cy.contains('#myGrid .slick-header-column', '% Complete').then(($target) => { + cy.contains('#myGrid .slick-header-column', 'Duration').drag($target); + }); + + cy.get('#myGrid').find('.slick-header-columns').children() + .each(($child, index) => expect($child.text()).to.eq(titles[index])); + }); }); // Section 4: Scrolling Behavior diff --git a/examples/example1-simple-rtl.html b/examples/example1-simple-rtl.html index 753a50e0..46b25460 100644 --- a/examples/example1-simple-rtl.html +++ b/examples/example1-simple-rtl.html @@ -8,7 +8,7 @@