@@ -78,11 +78,6 @@ describe('WorkflowDetail Page with create ingestion option', () => {
78
78
} = renderWithRouter ( workflowId , workflowName , type ) ;
79
79
80
80
expect ( getAllByText ( workflowName ) . length ) . toBeGreaterThan ( 0 ) ;
81
- expect ( getAllByText ( 'Create an ingest pipeline' ) . length ) . toBeGreaterThan (
82
- 0
83
- ) ;
84
- expect ( getAllByText ( 'Skip ingestion pipeline' ) . length ) . toBeGreaterThan ( 0 ) ;
85
- expect ( getAllByText ( 'Define ingest pipeline' ) . length ) . toBeGreaterThan ( 0 ) ;
86
81
expect ( getAllByText ( 'Inspector' ) . length ) . toBeGreaterThan ( 0 ) ;
87
82
expect ( getAllByText ( 'Preview' ) . length ) . toBeGreaterThan ( 0 ) ;
88
83
expect (
@@ -188,27 +183,19 @@ describe('WorkflowDetail Page with skip ingestion option (Hybrid Search Workflow
188
183
jest . clearAllMocks ( ) ;
189
184
} ) ;
190
185
test ( `renders the WorkflowDetail page with skip ingestion option` , async ( ) => {
191
- const {
192
- container,
193
- getByTestId,
194
- getAllByText,
195
- getAllByTestId,
196
- } = renderWithRouter ( workflowId , workflowName , WORKFLOW_TYPE . HYBRID_SEARCH ) ;
197
-
198
- // "Create an ingest pipeline" option should be selected by default
199
- const createIngestRadio = container . querySelector ( '#create' ) ;
200
- expect ( createIngestRadio ) . toBeChecked ( ) ;
186
+ const { getByTestId, getAllByText, getAllByTestId } = renderWithRouter (
187
+ workflowId ,
188
+ workflowName ,
189
+ WORKFLOW_TYPE . HYBRID_SEARCH
190
+ ) ;
201
191
202
- // "Skip ingestion pipeline" option should be unselected by default
203
- const skipIngestRadio = container . querySelector ( '#skip ') ;
204
- expect ( skipIngestRadio ) . not . toBeChecked ( ) ;
192
+ // Defining a new ingest pipeline & index is enabled by default
193
+ const enabledCheckbox = getByTestId ( 'checkbox-ingest.enabled ') ;
194
+ expect ( enabledCheckbox ) . toBeChecked ( ) ;
205
195
206
- // Selected "Skip ingestion pipeline"
207
- userEvent . click ( skipIngestRadio ! ) ;
208
- await waitFor ( ( ) => {
209
- expect ( createIngestRadio ) . not . toBeChecked ( ) ;
210
- } ) ;
211
- expect ( skipIngestRadio ) . toBeChecked ( ) ;
196
+ // Skipping ingest pipeline and navigating to search
197
+ userEvent . click ( enabledCheckbox ) ;
198
+ await waitFor ( ( ) => { } ) ;
212
199
const searchPipelineButton = getByTestId ( 'searchPipelineButton' ) ;
213
200
userEvent . click ( searchPipelineButton ) ;
214
201
@@ -255,7 +242,7 @@ describe('WorkflowDetail Page with skip ingestion option (Hybrid Search Workflow
255
242
userEvent . click ( searchPipelineBackButton ) ;
256
243
257
244
await waitFor ( ( ) => {
258
- expect ( skipIngestRadio ) . toBeChecked ( ) ;
245
+ expect ( enabledCheckbox ) . not . toBeChecked ( ) ;
259
246
} ) ;
260
247
} ) ;
261
248
} ) ;
0 commit comments