-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
fix: Reset pagination when output size changes #9652
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
1db04c9
fix: Reset pagination when data size changes
mutdmour f369d80
fix: add tests
mutdmour f50de02
fix: remove unexpected change
mutdmour 134a1a4
chore: clean up types
mutdmour f06a302
Merge branch 'master' of github.com:n8n-io/n8n into ado-2230
mutdmour c3e7711
Merge branch 'master' of github.com:n8n-io/n8n into ado-2230
mutdmour 7922309
merge master
mutdmour File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,39 @@ | ||
import { NDV, WorkflowPage } from '../pages'; | ||
|
||
const workflowPage = new WorkflowPage(); | ||
const ndv = new NDV(); | ||
|
||
describe('ADO-2230 NDV Pagination Reset', () => { | ||
it('should reset pagaintion if data size changes to less than current page', () => { | ||
// setup, load workflow with debughelper node with random seed | ||
workflowPage.actions.visit(); | ||
cy.createFixtureWorkflow('NDV-debug-generate-data.json', `Debug workflow`); | ||
workflowPage.actions.openNode('DebugHelper'); | ||
|
||
// execute node outputting 10 pages, check output of first page | ||
ndv.actions.execute(); | ||
workflowPage.getters | ||
.successToast() | ||
.find('.el-notification__closeBtn') | ||
.click({ multiple: true }); | ||
ndv.getters.outputTbodyCell(1, 1).invoke('text').should('eq', 'Terry.Dach@hotmail.com'); | ||
|
||
// open 4th page, check output | ||
ndv.getters.pagination().should('be.visible'); | ||
ndv.getters.pagination().find('li.number').should('have.length', 5); | ||
ndv.getters.pagination().find('li.number').eq(3).click(); | ||
ndv.getters.outputTbodyCell(1, 1).invoke('text').should('eq', 'Shane.Cormier68@yahoo.com'); | ||
|
||
// output a lot less data | ||
ndv.getters.parameterInput('randomDataCount').find('input').clear().type('20'); | ||
ndv.actions.execute(); | ||
workflowPage.getters | ||
.successToast() | ||
.find('.el-notification__closeBtn') | ||
.click({ multiple: true }); | ||
|
||
// check we are back to second page now | ||
ndv.getters.pagination().find('li.number').should('have.length', 2); | ||
ndv.getters.outputTbodyCell(1, 1).invoke('text').should('eq', 'Sylvia.Weber@hotmail.com'); | ||
}); | ||
}); |
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,48 @@ | ||
{ | ||
"meta": { | ||
"templateCredsSetupCompleted": true, | ||
"instanceId": "5b397bc122efafc165b2a6e67d5e8d75b8138f0d24d6352fac713e4845b002a6" | ||
}, | ||
"nodes": [ | ||
{ | ||
"parameters": {}, | ||
"id": "df260de7-6f28-4d07-b7b5-29588e27335b", | ||
"name": "When clicking \"Test workflow\"", | ||
"type": "n8n-nodes-base.manualTrigger", | ||
"typeVersion": 1, | ||
"position": [ | ||
780, | ||
500 | ||
] | ||
}, | ||
{ | ||
"parameters": { | ||
"category": "randomData", | ||
"randomDataSeed": "0", | ||
"randomDataCount": 100 | ||
}, | ||
"id": "9e9a0708-86dc-474f-a60e-4315e757c08e", | ||
"name": "DebugHelper", | ||
"type": "n8n-nodes-base.debugHelper", | ||
"typeVersion": 1, | ||
"position": [ | ||
1000, | ||
500 | ||
] | ||
} | ||
], | ||
"connections": { | ||
"When clicking \"Test workflow\"": { | ||
"main": [ | ||
[ | ||
{ | ||
"node": "DebugHelper", | ||
"type": "main", | ||
"index": 0 | ||
} | ||
] | ||
] | ||
} | ||
}, | ||
"pinData": {} | ||
} |
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: We don't need metadata in test fixtures