Skip to content

Commit f9c95c4

Browse files
committed
Tweak various other filter descriptions for clarity & style
1 parent 893bcb4 commit f9c95c4

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/model/filters/search-filters.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -658,7 +658,7 @@ class HostnameFilter extends Filter {
658658
} else if (op === '=') {
659659
return `requests to ${hostname}`;
660660
} else {
661-
return `requests to a hostname ${operationDescriptions[op]} ${hostname || 'a given value'}`;
661+
return `requests to any hostname ${operationDescriptions[op]} ${hostname || 'a given value'}`;
662662
}
663663
}
664664

@@ -717,7 +717,7 @@ class PortFilter extends Filter {
717717
} else if (op === '=') {
718718
return `requests to port ${port}`;
719719
} else {
720-
return `requests to a port ${operationDescriptions[op]} ${port || 'a given port'}`;
720+
return `requests to any port ${operationDescriptions[op]} ${port || 'a given value'}`;
721721
}
722722
}
723723

@@ -781,7 +781,7 @@ class PathFilter extends Filter {
781781
} else if (op === '=') {
782782
return `requests to ${path}`;
783783
} else {
784-
return `requests to a path ${operationDescriptions[op]} ${path || 'a given path'}`;
784+
return `requests to any path ${operationDescriptions[op]} ${path || 'a given value'}`;
785785
}
786786
}
787787

@@ -1058,7 +1058,7 @@ class HeaderFilter extends Filter {
10581058
);
10591059

10601060
if (!headerName) {
1061-
return "exchanges by a specific header";
1061+
return "exchanges with a specific header";
10621062
} else if (!op) {
10631063
return `exchanges with a '${headerName}' header`;
10641064
} else {

test/unit/model/filters/search-filter-integration.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ describe("Search filter model integration test:", () => {
9696
"requests with a given query string",
9797
"responses with a given status code",
9898
"exchanges by all header values",
99-
"exchanges by a specific header",
99+
"exchanges with a specific header",
100100
"exchanges by body content",
101101
"exchanges by body size",
102102
"exchanges that contain a given value anywhere",
@@ -979,7 +979,7 @@ describe("Search filter model integration test:", () => {
979979

980980
it("should show descriptions for various suggestions", () => {
981981
[
982-
["header", "exchanges by a specific header"],
982+
["header", "exchanges with a specific header"],
983983
["header[date]", "exchanges with a 'date' header"],
984984
["header[date]=",
985985
"exchanges with a 'date' header equal to a given value"],
@@ -1581,9 +1581,9 @@ describe("Search filter model integration test:", () => {
15811581
["not(", "exchanges that do not match a given condition"],
15821582
["not(error", "excluding requests that weren't transmitted successfully"],
15831583
["not(head", "excluding exchanges by all header values"],
1584-
["not(header", "excluding exchanges by a specific header"],
1584+
["not(header", "excluding exchanges with a specific header"],
15851585
["not(query^=?abc)", "excluding requests with a query string starting with ?abc"],
1586-
["not(hostname*=", "excluding requests to a hostname containing a given value"],
1586+
["not(hostname*=", "excluding requests to any hostname containing a given value"],
15871587
["not(method=POST)", "excluding POST requests"]
15881588
].forEach(([input, expectedOutput]) => {
15891589
const description = getSuggestionDescriptions(input)[0];

0 commit comments

Comments
 (0)