Skip to content

Commit

Permalink
fix: make operator optional & add a default
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-golovanov committed Nov 21, 2024
1 parent 97ada3d commit 9d827b7
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/client/cypress/support/Pages/IDE/BottomPane/Response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type ComparisonOperator = "eq" | "gt" | "gte" | "lt" | "lte";

interface ValidationParams {
count: number;
operator: ComparisonOperator;
operator?: ComparisonOperator;
}

class Response {
Expand Down Expand Up @@ -50,7 +50,10 @@ class Response {
cy.get(this.locators.responseTypeMenuTrigger).realClick();
}

public validateRecordCount({ count, operator }: ValidationParams): void {
public validateRecordCount({
count,
operator = "eq",
}: ValidationParams): void {
cy.get(this.locators.responseRecordCount)
.invoke("text")
.then((text) => {
Expand Down

0 comments on commit 9d827b7

Please sign in to comment.