Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issue-101 setSize issue when we change the size of layout #102

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ on:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-latest]

runs-on: ${{matrix.os}}

steps:
- uses: actions/checkout@v3
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Cypress Cloud
on:
schedule:
- cron: "0 0 * * THU"
workflow_dispatch:

jobs:
cypress-run:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v3
Expand Down
151 changes: 0 additions & 151 deletions cypress/component-testing/custom-resizer/no-min-max/index.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,6 @@ describe('No min max limits, Custom resizer with resizerSize prop', () => {
})
})

describe.skip('Partial visible resizer auto fix use case', () => {
it('Partially hide R1 from left using R0, R1 should hide completely', () => {
rCy.move(R0, P1, 'right', 2)
rCy.checkWidths({
[R1]: 0
})
})

it('Partially hide R2 from right using R3, R2 should hide completely', () => {
rCy.move(R3, P3, 'left', -2)
rCy.checkWidths({
[R2]: 0
})
})
})

describe('Simple Resizing and visibility operations', () => {
it('hide P1 >> P2 >> R1 TO 100Px right', () => {
cy.get(`[data-cy=${CK1}]`).click()
Expand Down Expand Up @@ -111,139 +95,4 @@ describe('No min max limits, Custom resizer with resizerSize prop', () => {
})
})
})

describe.skip('Overlap resizer to another, no visibility operation', () => {
describe('R0 Movements', () => {
it('Overlap R0 to R1', () => {
rCy.moveItem(R0, R1)

rCy.checkWidthsAndSum({
[P0]: 410,
[P1]: 0,
[P2]: 200,
[P3]: 300,
[P4]: 100,
[R0]: resizerSize,
[R1]: 0,
[R2]: resizerSize,
[R3]: resizerSize
})
})

it('Overlap R2 to R1', () => {
rCy.moveItem(R2, R1)
rCy.checkWidthsAndSum({
[P0]: 100,
[P1]: 300,
[P2]: 0,
[P3]: 510,
[P4]: 100,
[R0]: resizerSize,
[R1]: 0,
[R2]: resizerSize,
[R3]: resizerSize
})
})

it('Overlap R2 to R3', () => {
rCy.moveItem(R2, R3)
rCy.checkWidthsAndSum({
[P0]: 100,
[P1]: 300,
[P2]: 510,
[P3]: 0,
[P4]: 100,
[R0]: resizerSize,
[R1]: resizerSize,
[R2]: resizerSize,
[R3]: 0
})
})

it('Overlap R0 to R1 >> R0 to Start', () => {
rCy.moveItem(R0, R1)
rCy.moveResizerToStart(R0)
rCy.checkWidthsAndSum({
[P0]: 0,
[P1]: 400,
[P2]: 200,
[P3]: 300,
[P4]: 100,
[R0]: resizerSize,
[R1]: resizerSize,
[R2]: resizerSize,
[R3]: resizerSize
})
})

it('Overlap R0 to R3 >> R0 to start >> R1 to start >> R2 to start >> R3 to start', () => {
rCy.moveItem(R0, R3)

rCy.checkWidthsAndSum({
[P0]: 930,
[P1]: 0,
[P2]: 0,
[P3]: 0,
[P4]: 100,
[R0]: resizerSize,
[R1]: 0,
[R2]: 0,
[R3]: 0
})

rCy.moveResizerToStart(R0)

rCy.checkWidthsAndSum({
[P0]: 0,
[P1]: 920,
[P2]: 0,
[P3]: 0,
[P4]: 100,
[R0]: resizerSize,
[R1]: resizerSize,
[R2]: 0,
[R3]: 0
})

rCy.moveResizerToStart(R1)
rCy.checkWidthsAndSum({
[P0]: 0,
[P1]: 0,
[P2]: 920,
[P3]: 0,
[P4]: 100,
[R0]: 0,
[R1]: resizerSize,
[R2]: resizerSize,
[R3]: 0
})

rCy.moveResizerToStart(R2)
rCy.checkWidthsAndSum({
[P0]: 0,
[P1]: 0,
[P2]: 0,
[P3]: 920,
[P4]: 100,
[R0]: 0,
[R1]: 0,
[R2]: resizerSize,
[R3]: resizerSize
})

rCy.moveResizerToStart(R3)
rCy.checkWidthsAndSum({
[P0]: 0,
[P1]: 0,
[P2]: 0,
[P3]: 0,
[P4]: 1030,
[R0]: 0,
[R1]: 0,
[R2]: 0,
[R3]: resizerSize
})
})
})
})
})
Original file line number Diff line number Diff line change
Expand Up @@ -332,50 +332,6 @@ describe('Test Visibility for 2 panes', () => {
})
})

// Partially hidden case
describe.skip('Test Visibility for 5 panes', () => {
const rCy = new RCy({
resizerSize: 10,
containerId: rScontainerId,
len: 5
})

beforeEach(() => {
rCy.setViewPort()
cy.mount(
<RPTestWrapper
panesList={noMinMax5PanesSet}
resizer={
<CustomResizerFirst size={10} />
}
resizerClass='bg-slate-500'
resizerSize={10}
storageApi={localStorage}
uniqueId={rScontainerId}
vertical
>
</RPTestWrapper>
)
})

// Edge
it(`
-- 1st Partially hide P2, P3, P4 (One Half)
-- Hide P0, 01 (Other Half)
-- Result It should make visible Partially hidden panes
-- 2nd Show P0, and P1
-- Partially hidden should hide again`, () => {
rCy.move(R1, rScontainerId, 'right')
rCy.cyGet(CK0).click()
rCy.cyGet(CK1).click()

rCy.checkWidths([0, 0, 0, 0, 340, 10, 340, 10, 340])
rCy.cyGet(CK0).click()
rCy.cyGet(CK1).click()
rCy.checkWidths([100, 10, 920, 10, 0, 0, 0, 0, 0])
})
})

// https://github.com/BipanKishore/resizable-panes-react/pull/64
// describe('Hide All consecutive Panes', () => {
// it('hide P0 >> P1 >> P2 >> P3 >> P4', () => {
Expand Down
Loading
Loading