From 5ebc302511ad2a466f93899f10973fcc3cc84b1a Mon Sep 17 00:00:00 2001 From: Adhitya Mamallan Date: Tue, 11 Nov 2025 16:46:52 +0100 Subject: [PATCH 1/2] Fix autocomplete for bool values Signed-off-by: Adhitya Mamallan --- .../workflows-query-input/workflows-query-input.constants.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/shared/workflows-header/workflows-query-input/workflows-query-input.constants.ts b/src/views/shared/workflows-header/workflows-query-input/workflows-query-input.constants.ts index 8f66a71bb..1267aa627 100644 --- a/src/views/shared/workflows-header/workflows-query-input/workflows-query-input.constants.ts +++ b/src/views/shared/workflows-header/workflows-query-input/workflows-query-input.constants.ts @@ -47,7 +47,7 @@ export const STATUSES = [ '"timed_out"', ]; -export const BOOLEAN_VALUES = ['TRUE', 'FALSE']; +export const BOOLEAN_VALUES = ['"true"', '"false"']; export const TIME_FORMAT = '"YYYY-MM-DDTHH:MM:SS±HH:MM"'; From f2d4bbaf229e9be4374b26939fa41025cfdad736 Mon Sep 17 00:00:00 2001 From: Adhitya Mamallan Date: Wed, 12 Nov 2025 11:13:13 +0100 Subject: [PATCH 2/2] Update tests Signed-off-by: Adhitya Mamallan --- .../__tests__/get-autocomplete-suggestions.test.ts | 3 ++- .../get-updated-query-text-with-suggestions.test.ts | 12 ++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-autocomplete-suggestions.test.ts b/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-autocomplete-suggestions.test.ts index c21c884b0..2b44b4fd0 100644 --- a/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-autocomplete-suggestions.test.ts +++ b/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-autocomplete-suggestions.test.ts @@ -32,7 +32,8 @@ describe('getAutocompleteSuggestions', () => { }); it('suggests logical operators after a complete boolean value', () => { - const suggestionsAfterBoolean = getAutocompleteSuggestions('IsCron = TRUE'); + const suggestionsAfterBoolean = + getAutocompleteSuggestions('IsCron = "true"'); expect(suggestionsAfterBoolean).toEqual(LOGICAL_OPERATORS); }); diff --git a/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-updated-query-text-with-suggestions.test.ts b/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-updated-query-text-with-suggestions.test.ts index 462fb63ee..1621621e5 100644 --- a/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-updated-query-text-with-suggestions.test.ts +++ b/src/views/shared/workflows-header/workflows-query-input/helpers/__tests__/get-updated-query-text-with-suggestions.test.ts @@ -25,14 +25,14 @@ describe('getUpdatedQueryTextWithSuggestion', () => { expect(result).toBe('WorkflowID = "foo" AND '); }); - it('appends suggestion after boolean value TRUE', () => { - const result = getUpdatedQueryTextWithSuggestion('IsCron = TRUE', 'AND'); - expect(result).toBe('IsCron = TRUE AND '); + it('appends suggestion after boolean value "true"', () => { + const result = getUpdatedQueryTextWithSuggestion('IsCron = "true" ', 'AND'); + expect(result).toBe('IsCron = "true" AND '); }); - it('appends suggestion after boolean value FALSE', () => { - const result = getUpdatedQueryTextWithSuggestion('IsCron = FALSE', 'AND'); - expect(result).toBe('IsCron = FALSE AND '); + it('appends suggestion after boolean value "false"', () => { + const result = getUpdatedQueryTextWithSuggestion('IsCron = "false"', 'AND'); + expect(result).toBe('IsCron = "false" AND '); }); it('appends suggestion after BETWEEN operator', () => {