Skip to content

Commit

Permalink
Merge branch 'main' into gtk-grafana/issues/762/service-text-filter-bug
Browse files Browse the repository at this point in the history
  • Loading branch information
gtk-grafana authored Sep 13, 2024
2 parents 3271893 + d7a6bed commit 789d834
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 26 deletions.
10 changes: 9 additions & 1 deletion cspell.config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
{
"ignorePaths": ["node_modules", "/project-words.txt", "dist", "playwright-report", "tests", "CHANGELOG.md"],
"ignorePaths": [
"node_modules",
"/project-words.txt",
"dist",
"playwright-report",
"tests",
"CHANGELOG.md",
"package.json"
],
"ignoreRegExpList": [],
"words": [],
"dictionaryDefinitions": [
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
"@types/jest": "^29.5.0",
"@types/lodash": "^4.14.194",
"@types/node": "^20.8.7",
"@types/react-beautiful-dnd": "^13.1.8",
"@types/react-router-dom": "^5.2.0",
"@types/react-scroll-sync": "^0.9.0",
"@types/react-table": "^7.7.20",
Expand All @@ -62,7 +61,6 @@
"jest": "^29.5.0",
"jest-environment-jsdom": "^29.5.0",
"prettier": "^2.8.7",
"react-beautiful-dnd": "^13.1.1",
"react-scroll-sync": "^0.11.2",
"react-select-event": "^5.5.1",
"replace-in-file-webpack-plugin": "^1.0.6",
Expand Down Expand Up @@ -91,6 +89,7 @@
"@grafana/ui": "^11.1.1",
"@lezer/common": "^1.2.1",
"@lezer/lr": "^1.4.1",
"@hello-pangea/dnd": "^16.6.0",
"@playwright/test": "^1.43.1",
"@types/react-table": "^7.7.20",
"react": "18.2.0",
Expand Down
1 change: 1 addition & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -484,3 +484,4 @@ subquery
Subscription
uuidv
without
pangea
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { ReactElement } from 'react';
import { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from 'react-beautiful-dnd';
import { DragDropContext, Draggable, DraggableProvided, Droppable, DropResult } from '@hello-pangea/dnd';
import { css, cx } from '@emotion/css';

import { GrafanaTheme2 } from '@grafana/data/';
Expand Down
18 changes: 9 additions & 9 deletions tests/matchers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function forceObservableCompletion(
resolve: (args: jest.CustomMatcherResult | PromiseLike<jest.CustomMatcherResult>) => void
) {
const timeoutObservable = timer(OBSERVABLE_TEST_TIMEOUT_IN_MS, asapScheduler);

subscription.add(
timeoutObservable.subscribe(() => {
subscription.unsubscribe();
Expand All @@ -43,47 +43,47 @@ function forceObservableCompletion(
})
);
}

function expectObservableToBeDefined(received: unknown): jest.CustomMatcherResult | null {
if (received) {
return null;
}

return {
pass: false,
message: () => `${matcherHint('.toEmitValues')}
Expected ${printReceived(received)} to be ${printExpected('defined')}.`,
};
}

function expectObservableToBeObservable(received: unknown): jest.CustomMatcherResult | null {
if (isObservable(received)) {
return null;
}

return {
pass: false,
message: () => `${matcherHint('.toEmitValues')}
Expected ${printReceived(received)} to be ${printExpected('an Observable')}.`,
};
}

function expectObservable(received: unknown): jest.CustomMatcherResult | null {
const toBeDefined = expectObservableToBeDefined(received);
if (toBeDefined) {
return toBeDefined;
}

const toBeObservable = expectObservableToBeObservable(received);
if (toBeObservable) {
return toBeObservable;
}

return null;
}


/**
* Collect all the values emitted by the observables (also errors) and pass them to the expectations functions after
Expand Down
61 changes: 48 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,13 @@
dependencies:
regenerator-runtime "^0.14.0"

"@babel/runtime@^7.24.1":
version "7.25.6"
resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.25.6.tgz#9afc3289f7184d8d7f98b099884c26317b9264d2"
integrity sha512-VBj9MYyDb9tuLq7yzqjgzt6Q+IBQLrGZfdjOekyEirZPHxXWoTSGUTMrpsfi58Up73d13NfYLv8HT9vmznjzhQ==
dependencies:
regenerator-runtime "^0.14.0"

"@babel/template@^7.22.15", "@babel/template@^7.24.0", "@babel/template@^7.3.3":
version "7.24.0"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.24.0.tgz#c6a524aa93a4a05d66aaf31654258fae69d87d50"
Expand Down Expand Up @@ -1206,6 +1213,19 @@
uplot "1.6.30"
uuid "9.0.1"

"@hello-pangea/dnd@^16.6.0":
version "16.6.0"
resolved "https://registry.yarnpkg.com/@hello-pangea/dnd/-/dnd-16.6.0.tgz#7509639c7bd13f55e537b65a9dcfcd54e7c99ac7"
integrity sha512-vfZ4GydqbtUPXSLfAvKvXQ6xwRzIjUSjVU0Sx+70VOhc2xx6CdmJXJ8YhH70RpbTUGjxctslQTHul9sIOxCfFQ==
dependencies:
"@babel/runtime" "^7.24.1"
css-box-model "^1.2.1"
memoize-one "^6.0.0"
raf-schd "^4.0.3"
react-redux "^8.1.3"
redux "^4.2.1"
use-memo-one "^1.1.3"

"@humanwhocodes/config-array@^0.11.10":
version "0.11.14"
resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.14.tgz#d78e481a039f7566ecc9660b4ea7fe6b1fec442b"
Expand Down Expand Up @@ -2145,7 +2165,7 @@
resolved "https://registry.yarnpkg.com/@types/history/-/history-4.7.11.tgz#56588b17ae8f50c53983a524fc3cc47437969d64"
integrity sha512-qjDJRrmvBMiTx+jyLxvLfJU7UznFuokDv4f3WRuriHKERccVpFU+8XMQUAbDzoiJCsmexxRExQeMwwCdamSKDA==

"@types/hoist-non-react-statics@^3.3.0":
"@types/hoist-non-react-statics@^3.3.0", "@types/hoist-non-react-statics@^3.3.1":
version "3.3.5"
resolved "https://registry.yarnpkg.com/@types/hoist-non-react-statics/-/hoist-non-react-statics-3.3.5.tgz#dab7867ef789d87e2b4b0003c9d65c49cc44a494"
integrity sha512-SbcrWzkKBw2cdwRTwQAswfpB9g9LJWfjtUeW/jvNwbhC8cpmmNYVePa+ncbUe0rGTQ7G3Ff6mYUN2VMfLVr+Sg==
Expand Down Expand Up @@ -2228,13 +2248,6 @@
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.12.tgz#12bb1e2be27293c1406acb6af1c3f3a1481d98c6"
integrity sha512-5zvhXYtRNRluoE/jAp4GVsSduVUzNWKkOZrCDBWYtE7biZywwdC2AcEzg+cSMLFRfVgeAFqpfNabiPjxFddV1Q==

"@types/react-beautiful-dnd@^13.1.8":
version "13.1.8"
resolved "https://registry.yarnpkg.com/@types/react-beautiful-dnd/-/react-beautiful-dnd-13.1.8.tgz#f52d3ea07e1e19159d6c3c4a48c8da3d855e60b4"
integrity sha512-E3TyFsro9pQuK4r8S/OL6G99eq7p8v29sX0PM7oT8Z+PJfZvSQTx4zTQbUJ+QZXioAF0e7TGBEcA1XhYhCweyQ==
dependencies:
"@types/react" "*"

"@types/react-dom@^18.0.0":
version "18.2.25"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.25.tgz#2946a30081f53e7c8d585eb138277245caedc521"
Expand Down Expand Up @@ -2325,6 +2338,11 @@
resolved "https://registry.yarnpkg.com/@types/tough-cookie/-/tough-cookie-4.0.5.tgz#cb6e2a691b70cb177c6e3ae9c1d2e8b2ea8cd304"
integrity sha512-/Ad8+nIOV7Rl++6f1BdKxFSMgmoqEoYbHRpPcx3JEfv8VRsQe9Z4mCXeJBzxs7mbHY/XOZZuXlRNfhpVPbs6ZA==

"@types/use-sync-external-store@^0.0.3":
version "0.0.3"
resolved "https://registry.yarnpkg.com/@types/use-sync-external-store/-/use-sync-external-store-0.0.3.tgz#b6725d5f4af24ace33b36fafd295136e75509f43"
integrity sha512-EwmlvuaxPNej9+T4v5AuBPJa2x2UOJVdjCtDHgcDqitUeOtjnJKJ+apYjVcAoBEMjKW1VVFGZLUb5+qqa09XFA==

"@types/uuid@^10.0.0":
version "10.0.0"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-10.0.0.tgz#e9c07fe50da0f53dc24970cca94d619ff03f6f6d"
Expand Down Expand Up @@ -3576,7 +3594,7 @@ css-animation@^1.3.2:
babel-runtime "6.x"
component-classes "^1.2.5"

css-box-model@^1.2.0:
css-box-model@^1.2.0, css-box-model@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/css-box-model/-/css-box-model-1.2.1.tgz#59951d3b81fd6b2074a62d49444415b0d2b4d7c1"
integrity sha512-a7Vr4Q/kd/aw96bnJG332W9V9LkJO69JRcaCYDUqjp6/z0w6VcZjgAcTbgFxEPfBgdnAwlh3iwu+hLopa+flJw==
Expand Down Expand Up @@ -7141,7 +7159,7 @@ quickselect@^2.0.0:
resolved "https://registry.yarnpkg.com/quickselect/-/quickselect-2.0.0.tgz#f19680a486a5eefb581303e023e98faaf25dd018"
integrity sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==

raf-schd@^4.0.2:
raf-schd@^4.0.2, raf-schd@^4.0.3:
version "4.0.3"
resolved "https://registry.yarnpkg.com/raf-schd/-/raf-schd-4.0.3.tgz#5d6c34ef46f8b2a0e880a8fcdb743efc5bfdbc1a"
integrity sha512-tQkJl2GRWh83ui2DiPTJz9wEiMN20syf+5oKfB03yYP7ioZcJwsIK8FjrtLwH1m7C7e+Tt2yYBlrOpdT+dyeIQ==
Expand Down Expand Up @@ -7354,7 +7372,7 @@ rc-virtual-list@^3.5.1, rc-virtual-list@^3.5.2:
rc-resize-observer "^1.0.0"
rc-util "^5.36.0"

react-beautiful-dnd@13.1.1, react-beautiful-dnd@^13.1.1:
react-beautiful-dnd@13.1.1:
version "13.1.1"
resolved "https://registry.yarnpkg.com/react-beautiful-dnd/-/react-beautiful-dnd-13.1.1.tgz#b0f3087a5840920abf8bb2325f1ffa46d8c4d0a2"
integrity sha512-0Lvs4tq2VcrEjEgDXHjT98r+63drkKEgqyxdA7qD3mvKwga6a5SscbdLPO2IExotU1jW8L0Ksdl0Cj2AF67nPQ==
Expand Down Expand Up @@ -7507,6 +7525,18 @@ react-redux@^7.2.0:
prop-types "^15.7.2"
react-is "^17.0.2"

react-redux@^8.1.3:
version "8.1.3"
resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-8.1.3.tgz#4fdc0462d0acb59af29a13c27ffef6f49ab4df46"
integrity sha512-n0ZrutD7DaX/j9VscF+uTALI3oUPa/pO4Z3soOBIjuRn/FzVu6aehhysxZCLi6y7duMf52WNZGMl7CtuK5EnRw==
dependencies:
"@babel/runtime" "^7.12.1"
"@types/hoist-non-react-statics" "^3.3.1"
"@types/use-sync-external-store" "^0.0.3"
hoist-non-react-statics "^3.3.2"
react-is "^18.0.0"
use-sync-external-store "^1.0.0"

react-resizable@^3.0.4:
version "3.0.5"
resolved "https://registry.yarnpkg.com/react-resizable/-/react-resizable-3.0.5.tgz#362721f2efbd094976f1780ae13f1ad7739786c1"
Expand Down Expand Up @@ -7683,7 +7713,7 @@ redent@^3.0.0:
indent-string "^4.0.0"
strip-indent "^3.0.0"

redux@^4.0.0, redux@^4.0.4:
redux@^4.0.0, redux@^4.0.4, redux@^4.2.1:
version "4.2.1"
resolved "https://registry.yarnpkg.com/redux/-/redux-4.2.1.tgz#c08f4306826c49b5e9dc901dee0452ea8fce6197"
integrity sha512-LAUYz4lc+Do8/g7aeRa8JkyDErK6ekstQaqWQrNRW//MY1TvCEpMtpTWvlQ+FPbWCx+Xixu/6SHt5N0HR+SB4w==
Expand Down Expand Up @@ -8828,11 +8858,16 @@ use-isomorphic-layout-effect@^1.1.2:
resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb"
integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==

use-memo-one@^1.1.1:
use-memo-one@^1.1.1, use-memo-one@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/use-memo-one/-/use-memo-one-1.1.3.tgz#2fd2e43a2169eabc7496960ace8c79efef975e99"
integrity sha512-g66/K7ZQGYrI6dy8GLpVcMsBp4s17xNkYJVSMvTEevGy3nDxHOfE6z8BVE22+5G5x7t3+bhzrlTDB7ObrEE0cQ==

use-sync-external-store@^1.0.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.2.tgz#c3b6390f3a30eba13200d2302dcdf1e7b57b2ef9"
integrity sha512-PElTlVMwpblvbNqQ82d2n6RjStvdSoNe9FG28kNfz3WiXilJm4DdNkEzRhCZuIDwY8U08WVihhGR5iRqAwfDiw==

util-deprecate@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
Expand Down

0 comments on commit 789d834

Please sign in to comment.