Skip to content

Add a test for Reset discarding pending SQL editor values in dialogs. #10552 - #10560

Closed
dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:fix/issue-10552-reset-sql-test
Closed

dpage wants to merge 1 commit into
pgadmin-org:masterfrom
dpage:fix/issue-10552-reset-sql-test

Conversation

@dpage

@dpage dpage commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Test only; no overlap with the files being changed for #10551.

Test plan

  • New spec passes; fails with key={resetKey} removed
  • eslint clean

Closes #10552

Summary by CodeRabbit

  • Tests
    • Added regression coverage verifying that resetting edited SQL restores the original value and disables the Reset control.

…gadmin-org#10552

The fix for pgadmin-org#10357 remounts the dialog form on Reset so that SQL editor
values still waiting to come back through SchemaView are discarded. This
spec types into an SQL field, removes the edit, types again and presses
Reset before SchemaView has passed those values back, then checks that the
original value is shown. Without the remount the editor keeps the last
typed value.
@coderabbitai

coderabbitai Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: pgadmin-org/pgadmin4/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 797f931e-b716-4e54-8fbb-81c60c033d63
📥 Commits

Reviewing files that changed from the base of the PR and between 04684e7 and 68abced.

📒 Files selected for processing (1)
  • web/regression/javascript/SchemaView/SchemaDialogViewResetSQL.spec.js

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 4 remain after this review.

Walkthrough

Adds a SchemaDialogView regression test. It edits an SQL field, presses Reset before the edits round-trip through the schema, and checks that Reset is disabled and the original SQL appears in the editor.

Changes

SQL reset regression coverage

Layer / File(s) Summary
Test pending SQL reset
web/regression/javascript/SchemaView/SchemaDialogViewResetSQL.spec.js
Sets up a schema dialog with an SQL field and editor helpers. Tests that Reset restores the original SQL and becomes disabled after pending edits.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 68abc

The change adds focused regression coverage for resetting pending SQL edits. No material merge-blocking risk is established.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding a regression test for Reset discarding pending SQL editor values in dialogs.
Linked Issues check Passed The new SchemaDialogViewResetSQL.spec.js implements #10552. It initializes an SQL field with BEGIN END;, performs an edit that enables Reset, deletes and replaces the edit, presses Reset before th…
Out of Scope Changes check Passed The whole pull request adds only the regression test file for the behavior in #10552. The test directly covers the SchemaDialogView Reset remount behavior. No unrelated production or test changes ar…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

dpage added a commit that referenced this pull request Oct 13, 2026
…10552 (#10560)

The fix for #10357 remounts the dialog form on Reset so that SQL editor
values still waiting to come back through SchemaView are discarded. This
spec types into an SQL field, removes the edit, types again and presses
Reset before SchemaView has passed those values back, then checks that the
original value is shown. Without the remount the editor keeps the last
typed value.
@dpage

dpage commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Merged as 8f24dc3.

@dpage dpage closed this Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a test for Reset discarding pending SQL editor values in dialogs

1 participant