Skip to content

Commit

Permalink
test: add unit tests to hint controller
Browse files Browse the repository at this point in the history
  • Loading branch information
DeboraSerra committed Nov 27, 2024
1 parent 5257cbc commit b558be6
Show file tree
Hide file tree
Showing 2 changed files with 483 additions and 0 deletions.
35 changes: 35 additions & 0 deletions backend/src/test/mocks/hint.mock.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,41 @@ class HintBuilder {
return new HintBuilder(id);
}

missingAction() {
delete this.hint.action;
return this;
}

invalidAction() {
this.hint.action = "invalid action";
return this;
}

invalidHeaderBackgroundColor() {
this.hint.headerBackgroundColor = "invalid";
return this;
}

invalidHeaderColor() {
this.hint.headerColor = "invalid";
return this;
}

invalidTextColor() {
this.hint.textColor = "invalid";
return this;
}

invalidButtonBackgroundColor() {
this.hint.buttonBackgroundColor = "invalid";
return this;
}

invalidButtonTextColor() {
this.hint.buttonTextColor = "invalid";
return this;
}

build() {
return this.hint;
}
Expand Down
Loading

0 comments on commit b558be6

Please sign in to comment.