bug fixes#72
Merged
Merged
Conversation
Closed
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/core-ui/src/tests/generator/data-generator-page.test.js (1)
819-847: ⚡ Quick winAdd the missing text-mode preview regression test too.
This new case covers file generation from text mode, but issue
#50also calls out previewing from text mode. A matchingpreviewDataButtontest would lock down the preview-specific path (setGridFromGenericDataTableandgeneratorOutputPreview) that this download test never touches.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core-ui/src/tests/generator/data-generator-page.test.js` around lines 819 - 847, Add a parallel test that verifies previewing from text mode: instantiate DataGeneratorPage the same way as the existing download test, call page.init(), click the schemaModeToggleButton, set generatorSchemaText.value and generateRowsCount.value, then click the previewDataButton (element id 'previewDataButton') and await the preview flow; assert that page.setGridFromGenericDataTable and page.generatorOutputPreview (or spies on those methods) were called and that alertFn was not called so the preview-specific path is exercised. Ensure the test name reflects previewing from text mode and reuse FakeGridExtension/TestDataGenerator hooks if needed to observe the grid/preview behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/core-ui/js/gui_components/data-generator-page.js`:
- Around line 651-666: In syncSchemaRowsFromTextMode, when in text mode and
parseSchemaTextToRows returns zero rows, do not replace schemaRows with
createBlankSchemaRow(); instead leave schemaRows as an empty array so the
empty-textarea state preserves zero rows until the user switches back to schema
mode. Concretely, change the branch that sets this.schemaRows =
parsed.rows.length > 0 ? parsed.rows : [this.createBlankSchemaRow()] to assign
an empty array when parsed.rows is empty (this.schemaRows = parsed.rows.length >
0 ? parsed.rows : []), preserving the existing zero-row validation path used
elsewhere.
In `@packages/core-ui/js/gui_components/import-export-controls.js`:
- Line 97: Replace the incorrect/misspelled alert text in
packages/core-ui/js/gui_components/import-export-controls.js: change the string
"Grid to Text only availalable in Edit mode" to a clear, accurate message that
names the button and fixes the typo, e.g. "Set Grid From Text is only available
in Edit mode."; update the alert call where that exact string appears so users
see the corrected copy.
---
Nitpick comments:
In `@packages/core-ui/src/tests/generator/data-generator-page.test.js`:
- Around line 819-847: Add a parallel test that verifies previewing from text
mode: instantiate DataGeneratorPage the same way as the existing download test,
call page.init(), click the schemaModeToggleButton, set
generatorSchemaText.value and generateRowsCount.value, then click the
previewDataButton (element id 'previewDataButton') and await the preview flow;
assert that page.setGridFromGenericDataTable and page.generatorOutputPreview (or
spies on those methods) were called and that alertFn was not called so the
preview-specific path is exercised. Ensure the test name reflects previewing
from text mode and reuse FakeGridExtension/TestDataGenerator hooks if needed to
observe the grid/preview behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 637ce3af-52d4-489e-a09a-8041f23c2034
📒 Files selected for processing (5)
apps/web/styles.csspackages/core-ui/js/gui_components/data-generator-page.jspackages/core-ui/js/gui_components/import-export-controls.jspackages/core-ui/src/tests/generator/data-generator-page.test.jspackages/core-ui/src/tests/utils/import-export-controls-mode.test.js
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
closes #70
closes #50
closes #51
closes #71
Summary by CodeRabbit
New Features
Bug Fixes
Tests