Skip to content

fix(test): fix SearchSettings spec#28897

Merged
satender-kumar-collate merged 2 commits into
mainfrom
fix/searchSettings.spec
Jun 10, 2026
Merged

fix(test): fix SearchSettings spec#28897
satender-kumar-collate merged 2 commits into
mainfrom
fix/searchSettings.spec

Conversation

@satender-kumar-collate

@satender-kumar-collate satender-kumar-collate commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

fixes: #27946

Describe your changes: I fixed a bug in the search settings preview where reverting a field weight (e.g. name.ngram from 5 back to 1) or clicking "Restore Defaults" would leave the preview panel frozen on the previous state instead of re-fetching with the updated config.

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Summary by Gitar

  • Test stabilization:
    • Refactored SearchSettings.spec.ts to improve reliability of waitForResponse listeners during preview updates.
    • Updated test logic to revert n-gram weight to a static default of 1 instead of tracking initial state, ensuring predictable assertion outcomes.

This will update automatically on new commits.

Register waitForResponse before the slider interaction so a fast preview
response is never missed. Re-expand the name.ngram panel after save since
re-render can collapse it. Use hardcoded default boost (1) instead of
reading from the initial API response to simplify the assertion.

Also move status validation after awaiting the response so non-200 errors
surface with a clear failure instead of a timeout.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@satender-kumar-collate satender-kumar-collate requested a review from a team as a code owner June 10, 2026 05:34
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@satender-kumar-collate satender-kumar-collate added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs labels Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 62%
62.74% (67165/107036) 43.99% (37063/84242) 46.32% (11399/24605)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (14 flaky)

✅ 4270 passed · ❌ 0 failed · 🟡 14 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 300 0 1 4
🟡 Shard 2 802 0 4 9
🟡 Shard 3 806 0 2 8
🟡 Shard 4 842 0 1 12
🟡 Shard 5 720 0 1 47
🟡 Shard 6 800 0 5 8
🟡 14 flaky test(s) (passed on retry)
  • Pages/SearchSettings.spec.ts › Preview config reflects reverted n-gram weight after save (shard 1, 1 retry)
  • Features/DataQuality/ColumnLevelTests.spec.ts › Column Values To Be Unique (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportBasic.spec.ts › should redirect to Test Suite page when canceling bulk edit (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should display correct status badge color and icon (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Features/Tasks.spec.ts › clicking task in activity feed should navigate to entity page with task tab (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Remove users in persona should work properly (shard 4, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/GlossaryImportExport.spec.ts › Glossary CSV import preserves typed relations (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › Warning shown when removing asset that is also an output port (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › No warning when removing asset that is NOT an output port (shard 6, 1 retry)
  • Pages/InputOutputPorts.spec.ts › No warning when data product has no output ports (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@satender-kumar-collate satender-kumar-collate merged commit b6b1ebe into main Jun 10, 2026
57 of 59 checks passed
@satender-kumar-collate satender-kumar-collate deleted the fix/searchSettings.spec branch June 10, 2026 09:58
@gitar-bot

gitar-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Resolves the flaky n-gram revert test in the SearchSettings spec by ensuring the preview panel correctly refreshes after field weight updates or restoring defaults. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

aniketkatkar97 pushed a commit that referenced this pull request Jun 10, 2026
Register waitForResponse before the slider interaction so a fast preview
response is never missed. Re-expand the name.ngram panel after save since
re-render can collapse it. Use hardcoded default boost (1) instead of
reading from the initial API response to simplify the assertion.

Also move status validation after awaiting the response so non-200 errors
surface with a clear failure instead of a timeout.

Co-authored-by: Satender K <satender.kumar@getcollate.io>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Search Preview Inconsistent Behavior

3 participants