Skip to content

UIPQB-53 Add support for $contains and $not_contains operators #613

UIPQB-53 Add support for $contains and $not_contains operators

UIPQB-53 Add support for $contains and $not_contains operators #613

GitHub Actions / Jest Unit Test Results failed Nov 30, 2023 in 0s

4 fail, 1 skipped, 49 pass in 1m 6s

  1 files    8 suites   1m 6s ⏱️
54 tests 49 ✔️ 1 💤 4
56 runs  51 ✔️ 1 💤 4

Results for commit 545355e.

Annotations

Check warning on line 0 in select options getOperatorOptions should return operators with placeholder for array type

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

select options getOperatorOptions should return operators with placeholder for array type (select options getOperatorOptions should return operators with placeholder for array type) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(received).toEqual(expected) // deep equality

- Expected  - 0
+ Received  + 8

@@ -18,6 +18,14 @@
    },
    Object {
      "label": "not in",
      "value": "not in",
    },
+   Object {
+     "label": "contains",
+     "value": "contains",
+   },
+   Object {
+     "label": "not contains",
+     "value": "not contains",
+   },
  ]
    at toEqual (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/selectOptions.test.js:63:23)
    at Object.expectFn (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/selectOptions.test.js:177:7)
    at Promise.then.completed (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:333:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:259:10)
    at _callCircusTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:277:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:209:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:97:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:91:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:91:9)
    at run (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:31:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:135:21)
    at jestAdapter (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:92:19)
    at runTestInternal (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:411:16)
    at runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:499:34)
    at Object.worker (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/testWorker.js:133:12)

Check warning on line 0 in mongoQueryToSource() should convert from source to simple query format

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

mongoQueryToSource() should convert from source to simple query format (mongoQueryToSource() should convert from source to simple query format) failed

artifacts/jest-junit/junit.xml
Raw output
TypeError: value.replace is not a function
    at replace (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/query.js:54:30)
    at escapeRegex (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/query.js:69:28)
    at Array.map (<anonymous>)
    at map (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/query.js:117:32)
    at Object.<anonymous> (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/helpers/query.test.js:169:38)
    at Promise.then.completed (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:333:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:259:10)
    at _callCircusTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:277:40)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at _runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:209:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:97:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:91:9)
    at run (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:31:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:135:21)
    at jestAdapter (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:92:19)
    at runTestInternal (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:411:16)
    at runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:499:34)
    at Object.worker (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/testWorker.js:133:12)

Check warning on line 0 in DataTypeInput should render correct component based on arrayType and in

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

DataTypeInput should render correct component based on arrayType and in (DataTypeInput should render correct component based on arrayType and in) failed

artifacts/jest-junit/junit.xml
Raw output
Error: expect(received).toBeVisible()

received value must be an HTMLElement or an SVGElement.
Received has value: null

<html>
  <head />
  <body>
    <div>
      <div
        class="textField"
      >
        <div
          class="formControl inputGroup"
        >
          <input
            aria-invalid="false"
            autocapitalize="off"
            autocomplete="off"
            autocorrect="off"
            data-testid="data-input-text-arrayType"
            id="text-input-7"
            spellcheck="false"
            type="text"
            value=""
          />
        </div>
        <div
          role="alert"
        />
      </div>
      ,
    </div>
  </body>
</html>
    at __EXTERNAL_MATCHER_TRAP__ (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/expect/build/index.js:346:30)
    at Object.throwingMatcher [as toBeVisible] (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/expect/build/index.js:347:15)
    at toBeVisible (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.test.js:141:20)
    at runWithExpensiveErrorDiagnosticsDisabled (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/config.js:51:12)
    at checkCallback (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/wait-for.js:127:77)
    at checkRealTimersCallback (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/wait-for.js:119:16)
    at Timeout.task [as _onTimeout] (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jsdom/lib/jsdom/browser/Window.js:514:19)
    at listOnTimeout (node:internal/timers:569:17)
    at processTimers (node:internal/timers:512:7)

Check warning on line 0 in DataTypeInput should render correct component based on arrayType and ==

See this annotation in the file changed.

@github-actions github-actions / Jest Unit Test Results

DataTypeInput should render correct component based on arrayType and == (DataTypeInput should render correct component based on arrayType and ==) failed

artifacts/jest-junit/junit.xml
Raw output
TestingLibraryElementError: Found multiple elements with the text: 

Here are the matching elements:

<body>
  <div>
    <div
      class="textField"
    >
      <div
        class="formControl inputGroup"
      >
        <input
          aria-invalid="false"
          autocapitalize="off"
          autocomplete="off"
          autocorrect="off"
          data-testid="data-input-text-arrayType"
          id="text-input-8"
          spellcheck="false"
          type="text"
          value=""
        />
      </div>
      <div
        role="alert"
      />
    </div>
    ,
  </div>
</body>

<div
  class="textField"
>
  <div
    class="formControl inputGroup"
  >
    <input
      aria-invalid="false"
      autocapitalize="off"
      autocomplete="off"
      autocorrect="off"
      data-testid="data-input-text-arrayType"
      id="text-input-8"
      spellcheck="false"
      type="text"
      value=""
    />
  </div>
  <div
    role="alert"
  />
</div>

<div
  class="formControl inputGroup"
>
  <input
    aria-invalid="false"
    autocapitalize="off"
    autocomplete="off"
    autocorrect="off"
    data-testid="data-input-text-arrayType"
    id="text-input-8"
    spellcheck="false"
    type="text"
    value=""
  />
</div>

<input
  aria-invalid="false"
  autocapitalize="off"
  autocomplete="off"
  autocorrect="off"
  data-testid="data-input-text-arrayType"
  id="text-input-8"
  spellcheck="false"
  type="text"
  value=""
/>

<div
  role="alert"
/>

(If this is intentional, then use the `*AllBy*` variant of the query (like `queryAllByText`, `getAllByText`, or `findAllByText`)).

<body>
  <div>
    <div
      class="textField"
    >
      <div
        class="formControl inputGroup"
      >
        <input
          aria-invalid="false"
          autocapitalize="off"
          autocomplete="off"
          autocorrect="off"
          data-testid="data-input-text-arrayType"
          id="text-input-8"
          spellcheck="false"
          type="text"
          value=""
        />
      </div>
      <div
        role="alert"
      />
    </div>
    ,
  </div>
</body>
    at Object.getElementError (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/config.js:37:19)
    at getElementError (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/query-helpers.js:25:35)
    at getMultipleElementsFoundError (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/query-helpers.js:29:10)
    at /home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/query-helpers.js:66:13
    at /home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/@testing-library/dom/dist/query-helpers.js:111:19
    at Object.queryByText (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/src/QueryBuilder/QueryBuilder/QueryBuilderModal/DataTypeInput/DataTypeInput.test.js:138:58)
    at Promise.then.completed (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:333:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/utils.js:259:10)
    at _callCircusTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:277:40)
    at _runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:209:3)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:97:9)
    at _runTestsForDescribeBlock (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:91:9)
    at run (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/run.js:31:3)
    at runAndTransformResultsToJestFormat (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:135:21)
    at jestAdapter (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:92:19)
    at runTestInternal (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:411:16)
    at runTest (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/runTest.js:499:34)
    at Object.worker (/home/runner/work/ui-plugin-query-builder/ui-plugin-query-builder/node_modules/jest-runner/build/testWorker.js:133:12)