gristlabs_grist-core/test/nbrowser
Alex Hall 9b36fb4dab (core) Fix error in sandbox when removing multiple summary source columns
Summary:
Fixes a very specific bug reported here: https://grist.slack.com/archives/C069RUP71/p1694630242765769

The error occurred when:

1. Removing multiple columns simultaneously
2. Those columns were sources of groupby columns for a summary table (so removing them meant recreating the summary table and thus deleting its columns)
3. There was a display column for one of the columns that got deleted (either directly or indirectly) which was set to be automatically removed since it was no longer needed, but this failed because the column was already deleted as part of earlier table removal.

I fixed this by making `apply_auto_removes` remove table records last, so removing the display column wouldn't be a problem.

That fixed the original error, but then I noticed that trying to undo the removal could lead to another error (under even more specific circumstances). It's hard to see exactly why, but I can see that just 3 `RemoveColumn` user actions generated over 100 doc actions and corresponding undo actions, hence the difficulty in narrowing the problem down. This is partly because removing a single column would recreate a summary table, only for that table to be immediately replaced again when another column was removed. Making the frontend send a single `[BulkRemoveRecord, _grist_Tables_column, ...] ` leads to a more efficient and sensible process with about half as many doc actions and no undo error. I think this alone would also solve the original error, but the data engine change seems more generally helpful and worth keeping.

Test Plan: Added a Python test and an nbrowser test

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4052
2023-09-27 16:23:49 +02:00
..
aclTestUtils.ts (core) Preserving cursor position when linked state is removed. 2023-02-08 21:54:55 +01:00
ActionLog.ts Fixing flaky tests. 2022-12-09 20:15:08 +01:00
AttachedCustomWidget.ts (core) Fix calendar and card tip bug on mobile 2023-09-26 21:05:30 -04:00
AttachmentsLinking.ts (core) Fix linking of new records when attachment is the first thing added. 2023-03-09 08:54:36 -05:00
BundleActions.ts (core) Polish "Click to insert $id" tooltip 2023-08-09 07:38:34 -07:00
CellColor.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ChoiceList.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
ClientUnitTests.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
CodeEditor.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
ColumnOps.ntest.js adapt tests after switch to parallel runs (#547) 2023-06-28 17:17:14 -04:00
customUtil.ts (core) Moving widget tests to core 2022-09-06 17:17:14 +02:00
CustomView.ts (core) Support dark mode in custom widgets 2023-09-19 16:08:21 -04:00
CustomWidgets.ts (core) Clearing widget repo state after tests. 2023-09-26 11:32:46 +02:00
CustomWidgetsConfig.ts (core) Clearing widget repo state after tests. 2023-09-26 11:32:46 +02:00
Dates.ntest.js tweak a date test that can occasionally fail (#592) 2023-07-26 08:08:55 -04:00
DeleteColumnsUndo.ts (core) Fix error in sandbox when removing multiple summary source columns 2023-09-27 16:23:49 +02:00
DescriptionColumn.ts (core) Adding links to description tooltips 2023-08-04 18:34:04 +02:00
DescriptionWidget.ts (core) Adding links to description tooltips 2023-08-04 18:34:04 +02:00
DetailView.ntest.js (core) Inactive card list widget now have idicator that show cursor position of linked widget 2023-08-25 16:27:20 +02:00
DetailView.ts (core) Clicking on a link in a cell won't open the editor. 2023-09-14 17:28:50 +02:00
DocTutorial.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
DuplicateDocument.ts (core) Showing workspace selector on duplicate document popup 2023-09-07 16:16:33 +02:00
Export.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
Features.ts (core) Tweak navbar, breadcrumbs, and sign-in buttons 2023-07-26 22:26:55 -07:00
FieldConfigTab.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
FieldSettings.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
FillLinkedRecords.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
Fork.ts (core) Revert part of the recent tweaks to AppHeader 2023-09-20 11:27:46 -04:00
GridOptions.ntest.js (core) TypeTransform race condition fix 2023-08-02 17:11:34 +02:00
GridView.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
gristUtil-nbrowser.js adapt tests after switch to parallel runs (#547) 2023-06-28 17:17:14 -04:00
gristUtils.ts (core) Delete my account button 2023-09-27 14:49:23 +02:00
gristWebDriverUtils.ts make some more methods available for grist-widget tests (#677) 2023-09-18 13:35:01 +01:00
HeaderColor.ts Header colored (#581) 2023-08-07 11:01:35 -07:00
Health.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
HomeIntro.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
HomeIntroWithoutPlaygound.ts Introduce GRIST_ANON_PLAYGROUND variable #642 (#651) 2023-09-08 09:05:52 -04:00
homeUtil.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
importerTestUtils.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
ImportReferences.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
LanguageSettings.ts (core) Fix missing placeholder flag icon 2023-02-26 22:23:04 -05:00
LinkingErrors.ts (core) move LinkingError and RawData tests 2023-08-09 09:46:36 -04:00
LinkingSelector.ts (core) Fixing cursor position for filtered linked section. 2023-07-07 19:04:30 +02:00
Localization.ts skip building test harness in docker image (#551) 2023-06-30 05:50:40 -04:00
MultiColumn.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
NewDocument.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
Pages.ts (core) When a page starts with a number, don't treat it as an emoji 2023-07-12 15:13:25 -04:00
Properties.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
RawData.ts Add appearance parameter to override theme preferences (#620) 2023-08-15 10:29:29 -07:00
ReferenceColumns.ts (core) Preserving cursor position when linked state is removed. 2023-02-08 21:54:55 +01:00
ReferenceList.ts (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
RefNumericChange.ts (core) Fix undo of Ref->Numeric conversion. 2023-09-27 08:53:53 -04:00
RefTransforms.ts (core) Fix bug preventing changes to ref list table 2022-10-17 07:49:54 -07:00
RightPanel.ts Linkstate refactor (#609) 2023-09-08 14:21:32 -04:00
RightPanelSelectBy.ts Bidirectional Linking (#622) 2023-09-25 18:48:18 -04:00
RowMenu.ts (core) Fix hidden columns bug when editing data selection 2022-10-18 08:36:11 -07:00
SavePosition.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
saveViewSection.ts (core) Adds a UI panel for managing webhooks 2023-05-08 18:25:27 -04:00
SelectBy.ts (core) Polish dark mode and remove beta tag 2023-09-21 13:14:48 -04:00
SelectByRefList.ts move getTemplateOrg method; enable template org in docker tests (#602) 2023-07-31 16:10:59 -04:00
SelectByRightPanel.ts (core) Preserving cursor position when linked state is removed. 2023-02-08 21:54:55 +01:00
SelectBySummary.ts move getTemplateOrg method; enable template org in docker tests (#602) 2023-07-31 16:10:59 -04:00
SelectBySummaryRef.ts avoid test files importing other test files (#550) 2023-06-29 03:15:14 -04:00
SelectionSummary.ts fix: don't count falses in summary (#589) 2023-07-26 12:08:04 -07:00
ShiftSelection.ts Support grid selection with Ctrl+Shift+Arrow (#615) 2023-08-14 09:28:41 -07:00
Smoke.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
SortDates.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
SortEditSave.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
Summaries.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
SupportGrist.ts (core) Add Support Grist page and nudge 2023-07-04 17:36:59 -04:00
testServer.ts skip building test harness in docker image (#551) 2023-06-30 05:50:40 -04:00
testUtils.ts (core) Highlight rows used as a selector in linking, but do not show 'inactive' cursors. 2023-06-21 12:21:19 -04:00
TextEditor.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
ToggleColumns.ts (core) When a checkbox is clicked on a new record, set default values determined by linking 2022-11-10 14:34:40 -05:00
TokenField.ts (core) Fixing DELETE and BACKSPACE keys on ChoiceList and RefList editor. 2023-06-01 16:53:38 +02:00
TypeChange.ntest.js (core) export WindowDimensions from gristUtils after refactor 2023-07-24 15:10:51 -04:00
UndoJumps.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
UploadLimits.ts (core) Add support for auto-copying docs on signup 2023-09-06 15:12:08 -04:00
Validations.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
ViewConfigTab.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
Views.ntest.js (core) Add dialog with options to allow downloading without history or data 2023-08-18 15:38:24 +02:00
webdriverjq-nbrowser.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
webdriverjq.ntest.js (core) bump mocha version to allow parallel tests; move more tests to core 2023-06-27 02:55:34 -04:00
WebhookOverflow.ts tweak webhook overflow test (#590) 2023-07-26 06:20:20 -04:00
WebhookPage.ts (core) deleting queue from single webhook 2023-07-18 11:46:10 +02:00