diff --git a/cypress/e2e/30-if-node.cy.ts b/cypress/e2e/30-if-node.cy.ts index 5f3aca7b8421e..95ed1e9a0d34d 100644 --- a/cypress/e2e/30-if-node.cy.ts +++ b/cypress/e2e/30-if-node.cy.ts @@ -24,16 +24,8 @@ describe('If Node (filter component)', () => { // Add ndv.actions.addFilterCondition(FILTER_PARAM_NAME); - ndv.getters - .filterConditionLeft(FILTER_PARAM_NAME, 0) - .find('.cm-content') - .first() - .type('first left'); - ndv.getters - .filterConditionLeft(FILTER_PARAM_NAME, 1) - .find('.cm-content') - .first() - .type('second left'); + ndv.getters.filterConditionLeft(FILTER_PARAM_NAME, 0).find('input').type('first left'); + ndv.getters.filterConditionLeft(FILTER_PARAM_NAME, 1).find('input').type('second left'); ndv.actions.addFilterCondition(FILTER_PARAM_NAME); ndv.getters.filterConditions(FILTER_PARAM_NAME).should('have.length', 3); @@ -42,9 +34,8 @@ describe('If Node (filter component)', () => { ndv.getters.filterConditions(FILTER_PARAM_NAME).should('have.length', 2); ndv.getters .filterConditionLeft(FILTER_PARAM_NAME, 0) - .find('.cm-content') - .first() - .should('have.text', 'second left'); + .find('input') + .should('have.value', 'second left'); ndv.actions.removeFilterCondition(FILTER_PARAM_NAME, 1); ndv.getters.filterConditions(FILTER_PARAM_NAME).should('have.length', 1); }); diff --git a/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue b/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue index 54888cfc9ecd3..9bac77fcf93f4 100644 --- a/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue +++ b/packages/editor-ui/src/components/FilterConditions/FilterConditions.vue @@ -43,7 +43,7 @@ const ndvStore = useNDVStore(); const { debounce } = useDebounce(); function createCondition(): FilterConditionValue { - return { id: uuid(), leftValue: '=', rightValue: '=', operator: DEFAULT_OPERATOR_VALUE }; + return { id: uuid(), leftValue: '', rightValue: '', operator: DEFAULT_OPERATOR_VALUE }; } const allowedCombinators = computed( diff --git a/packages/editor-ui/src/components/FilterConditions/__tests__/FilterConditions.test.ts b/packages/editor-ui/src/components/FilterConditions/__tests__/FilterConditions.test.ts index 53226da8bf476..568d65c9bc8d5 100644 --- a/packages/editor-ui/src/components/FilterConditions/__tests__/FilterConditions.test.ts +++ b/packages/editor-ui/src/components/FilterConditions/__tests__/FilterConditions.test.ts @@ -43,14 +43,7 @@ describe('FilterConditions.vue', () => { expect(getByTestId('filter-conditions')).toBeInTheDocument(); expect(await findAllByTestId('filter-condition')).toHaveLength(1); expect(getByTestId('filter-condition-left')).toBeInTheDocument(); - expect( - within(getByTestId('filter-condition-left')).getByTestId('inline-expression-editor-input'), - ).toBeInTheDocument(); expect(getByTestId('filter-operator-select')).toBeInTheDocument(); - expect(getByTestId('filter-condition-right')).toBeInTheDocument(); - expect( - within(getByTestId('filter-condition-right')).getByTestId('inline-expression-editor-input'), - ).toBeInTheDocument(); // Only visible when multiple conditions expect(queryByTestId('filter-combinator-select')).not.toBeInTheDocument();