Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ describe('Cluster Scanner Strategy', () => {
scanned: 10,
},
]);
expect(strategy.getKeysInfo).toHaveBeenCalledWith(mockClusterRedisClient, [Buffer.from(key)], dto.type);
expect(strategy.getKeysInfo).toHaveBeenCalledWith(mockClusterRedisClient, [Buffer.from(key)]);
expect(strategy['scanNodes']).not.toHaveBeenCalled();
});
it('should find exact key when match is escaped glob patter', async () => {
Expand Down Expand Up @@ -666,7 +666,6 @@ describe('Cluster Scanner Strategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockClusterRedisClient,
[Buffer.from(searchPattern)],
dto.type,
);
expect(strategy['scanNodes']).not.toHaveBeenCalled();
});
Expand Down Expand Up @@ -704,7 +703,6 @@ describe('Cluster Scanner Strategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockClusterRedisClient,
[Buffer.from(key)],
dto.type,
);
expect(strategy['scanNodes']).not.toHaveBeenCalled();
});
Expand Down Expand Up @@ -741,7 +739,6 @@ describe('Cluster Scanner Strategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockClusterRedisClient,
[Buffer.from(key)],
dto.type,
);
expect(strategy['scanNodes']).not.toHaveBeenCalled();
});
Expand Down Expand Up @@ -779,7 +776,6 @@ describe('Cluster Scanner Strategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockClusterRedisClient,
[Buffer.from(key)],
dto.type,
);
expect(strategy['scanNodes']).not.toHaveBeenCalled();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export class ClusterScannerStrategy extends ScannerStrategy {
// eslint-disable-next-line no-param-reassign
node.scanned = isNull(node.total) ? 1 : node.total;
});
nodes[0].keys = await this.getKeysInfo(client, [keyName], args.type);
nodes[0].keys = await this.getKeysInfo(client, [keyName]);
nodes[0].keys = nodes[0].keys.filter((key: GetKeyInfoResponse) => {
if (key.ttl === -2) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,6 @@ describe('StandaloneScannerStrategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockStandaloneRedisClient,
[Buffer.from(key)],
dto.type,
);
expect(strategy['scan']).not.toHaveBeenCalled();
});
Expand All @@ -413,7 +412,6 @@ describe('StandaloneScannerStrategy', () => {
expect(strategy.getKeysInfo).toHaveBeenCalledWith(
mockStandaloneRedisClient,
[Buffer.from(mockSearchPattern)],
dto.type,
);
expect(strategy['scan']).not.toHaveBeenCalled();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class StandaloneScannerStrategy extends ScannerStrategy {
const keyName = Buffer.from(unescapeRedisGlob(match));
node.cursor = 0;
node.scanned = isNull(node.total) ? 1 : node.total;
node.keys = await this.getKeysInfo(client, [keyName], args.type);
node.keys = await this.getKeysInfo(client, [keyName]);
node.keys = node.keys.filter((key: GetKeyInfoResponse) => {
if (key.ttl === -2) {
return false;
Expand Down
11 changes: 8 additions & 3 deletions tests/e2e/tests/web/critical-path/browser/filtering.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,24 @@ test
await browserPage.searchByKeyName(keyName);
// Verify that key was found
const isKeyIsDisplayedInTheList = await browserPage.isKeyIsDisplayedInTheList(keyName);
await t.expect(isKeyIsDisplayedInTheList).ok('The key was found');
await t.expect(isKeyIsDisplayedInTheList).ok('The key was not found');

// Verify that key not found when selecting other key type
await browserPage.selectFilterGroupType(KeyTypesTexts.List);
await t.expect(await browserPage.isKeyIsDisplayedInTheList(keyName)).notOk('The key was found by invalid filter');

// Verify that user can see filtering per key name starts when he press Enter or clicks the control to filter per key name
// Clear filter
await t.click(browserPage.clearFilterButton);
// Check the filtering starts by press Enter
await t.typeText(browserPage.filterByPatterSearchInput, 'InvalidText', { replace: true, paste: true });
await t.pressKey('enter');
await t.expect(browserPage.searchAdvices.exists).ok('The filtering is set');
await t.expect(browserPage.searchAdvices.exists).ok('The filtering is not set');
// Check the filtering starts by clicks the control
await browserPage.reloadPage();
await t.typeText(browserPage.filterByPatterSearchInput, 'InvalidText', { replace: true, paste: true });
await t.click(browserPage.searchButton);
await t.expect(browserPage.searchAdvices.exists).ok('The filtering is set');
await t.expect(browserPage.searchAdvices.exists).ok('The filtering is not set');
});
test
.after(async() => {
Expand Down
35 changes: 30 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4215,7 +4215,7 @@ brace@^0.11.1:
resolved "https://registry.yarnpkg.com/brace/-/brace-0.11.1.tgz#4896fcc9d544eef45f4bb7660db320d3b379fe58"
integrity sha512-Fc8Ne62jJlKHiG/ajlonC4Sd66Pq68fFwK4ihJGNZpGqboc324SQk+lRvMzpPRuJOmfrJefdG8/7JdWX4bzJ2Q==

braces@^3.0.2, braces@^3.0.3, braces@~3.0.2:
braces@^3.0.3, braces@~3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.3.tgz#490332f40919452272d55a8480adc0c441358789"
integrity sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==
Expand Down Expand Up @@ -7094,7 +7094,7 @@ filelist@^1.0.1:
dependencies:
minimatch "^5.0.1"

fill-range@^7.0.1, fill-range@^7.1.1:
fill-range@^7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.1.1.tgz#44265d3cac07e3ea7dc247516380643754a05292"
integrity sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==
Expand Down Expand Up @@ -13439,7 +13439,16 @@ string-length@^4.0.1:
char-regex "^1.0.2"
strip-ansi "^6.0.0"

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand Down Expand Up @@ -13553,7 +13562,7 @@ stringify-object@^3.3.0:
is-obj "^1.0.1"
is-regexp "^1.0.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand All @@ -13567,6 +13576,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -15017,7 +15033,7 @@ word-wrap@1.2.4, word-wrap@^1.2.3, word-wrap@~1.2.3:
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.4.tgz#cb4b50ec9aca570abd1f52f33cd45b6c61739a9f"
integrity sha512-2V81OA4ugVo5pRo46hAoD2ivUJx8jXmWXfUkY4KFNw0hEptvN0QfH3K4nHiwzGeKl5rFKedV48QVoqYavy4YpA==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -15044,6 +15060,15 @@ wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down