-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(plugins): remove jQuery from Grid Resizer plugin (#758)
- Loading branch information
1 parent
aa8dc63
commit 5deb818
Showing
9 changed files
with
1,319 additions
and
1,306 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
|
||
describe('Example 0070 - Grid State using Local Storage', () => { | ||
const titles = ['Title', 'Duration', '% Complete', 'Start', 'Finish', 'Effort Driven']; | ||
|
||
it('should display Example title', () => { | ||
cy.visit(`${Cypress.config('baseExampleUrl')}/example15-auto-resize.html`); | ||
cy.get('h2 + p').should('contain', 'Slick.Plugins.Resizer'); | ||
}); | ||
|
||
it('should have exact Column Titles in the grid', () => { | ||
cy.get('#myGrid') | ||
.find('.slick-header-columns') | ||
.children() | ||
.each(($child, index) => expect($child.text()).to.eq(titles[index])); | ||
}); | ||
|
||
it('should have grid with size that is not 800 by 600px', () => { | ||
cy.get('#myGrid') | ||
.should($el => { | ||
expect(parseInt(`${$el.width()}`, 10)).to.greaterThan(900); | ||
expect(parseInt(`${$el.height()}`, 10)).not.to.eq(600); | ||
}); | ||
}); | ||
|
||
it('should resize the grid to 800 by 600px when clicking on "Fixed Dimension" button', () => { | ||
cy.get('[data-test="fixed-dimension"]') | ||
.click(); | ||
|
||
cy.get('#myGrid') | ||
.should($el => { | ||
expect(parseInt(`${$el.width()}`, 10)).to.eq(800); | ||
expect(parseInt(`${$el.height()}`, 10)).to.eq(600); | ||
}); | ||
}); | ||
|
||
it('should auto-resize the grid when clicking on "auto-resize" button', () => { | ||
cy.get('[data-test="auto-resize"]') | ||
.click(); | ||
|
||
cy.get('#myGrid') | ||
.should($el => { | ||
expect(parseInt(`${$el.width()}`, 10)).to.greaterThan(900); | ||
expect(parseInt(`${$el.height()}`, 10)).not.to.eq(600); | ||
}); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.