-
Notifications
You must be signed in to change notification settings - Fork 47
Add disableOnNumbers #636
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
base: main
Are you sure you want to change the base?
Add disableOnNumbers #636
Conversation
WalkthroughA new code sample demonstrating the use of the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CodeSample
participant TestSuite
User->>CodeSample: Add code sample with disableOnNumbers
User->>TestSuite: Update test to include disableOnNumbers
TestSuite->>TestSuite: Run typo tolerance tests with disableOnNumbers
Assessment against linked issues
Possibly related issues
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
I'm wondering why, after resetting the settings and waiting for it, the new value still applies and not the default one |
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.
Actionable comments posted: 1
♻️ Duplicate comments (1)
spec/meilisearch/index/settings_spec.rb (1)
617-623
: Reset-assertion now mismatched – adjust to new default.After applying the first fix, adapt the reset assertion to expect the updated
default_typo_tolerance
(withtrue
).- expect(index.typo_tolerance).to include(default_typo_tolerance) + expect(index.typo_tolerance).to include(default_typo_tolerance)(only value change earlier is required; the method call remains.)
🧹 Nitpick comments (1)
spec/meilisearch/index/settings_spec.rb (1)
599-603
: Minor consistency nit – avoid redundant value flip.Since the server’s default is already
true
, keepingnew_typo_tolerance['disableOnNumbers']
attrue
doesn’t test anything.
Consider switching it tofalse
so the update actually exercises a state change.- 'disableOnNumbers' => true + 'disableOnNumbers' => false
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.code-samples.meilisearch.yaml
(1 hunks)spec/meilisearch/index/settings_spec.rb
(2 hunks)
🧰 Additional context used
🪛 GitHub Actions: Tests
spec/meilisearch/index/settings_spec.rb
[error] 622-622: RSpec test failure: Meilisearch::Index - Settings On typo tolerance #reset_typo_tolerance resets typo tolerance settings. Expected 'disableOnNumbers' to be false but got true.
🔇 Additional comments (1)
.code-samples.meilisearch.yaml (1)
597-599
: Snippet aligns with client-side snake_case conventions – looks good.The new example follows the existing pattern (
disable_on_*
) and demonstrates the feature concisely. No issues spotted.
'disableOnAttributes' => [], | ||
'disableOnNumbers' => false | ||
} |
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.
Default expectation is wrong – breaks the test suite.
disableOnNumbers
is asserted to be false
, but CI shows Meilisearch returns true
by default after both creation and reset.
Update the spec to reflect the server’s actual default to unblock the pipeline.
- 'disableOnNumbers' => false
+ 'disableOnNumbers' => true
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
'disableOnAttributes' => [], | |
'disableOnNumbers' => false | |
} | |
'disableOnAttributes' => [], | |
'disableOnNumbers' => true | |
} |
🤖 Prompt for AI Agents
In spec/meilisearch/index/settings_spec.rb around lines 587 to 589, the test
expects 'disableOnNumbers' to be false by default, but the actual Meilisearch
server returns true after creation and reset. Update the spec to expect
'disableOnNumbers' to be true to match the server's actual default behavior and
fix the failing tests.
Pull Request
Related issue
Fixes #635
What does this PR do?
Add disableOnNumbers to tests
PR checklist
Please check if your PR fulfills the following requirements:
Summary by CodeRabbit
New Features
Tests