mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
fix: make sure all tests pass
This commit is contained in:
@@ -6,6 +6,7 @@ class MenuItemIDBuilder {
|
||||
}
|
||||
constructor(type) {
|
||||
this.type = type;
|
||||
this.suffix = "";
|
||||
}
|
||||
|
||||
item(itemId) {
|
||||
@@ -13,18 +14,15 @@ class MenuItemIDBuilder {
|
||||
return this;
|
||||
}
|
||||
|
||||
colorCheck(color) {
|
||||
this.itemId = "colors-" + color + "-check";
|
||||
return this;
|
||||
}
|
||||
|
||||
color(color) {
|
||||
this.itemId = "colors-" + color;
|
||||
checked() {
|
||||
this.suffix = "checked";
|
||||
return this;
|
||||
}
|
||||
|
||||
build() {
|
||||
return getTestId(`${this.type}-${this.itemId}`);
|
||||
return getTestId(
|
||||
`${this.type}-${this.itemId}${this.suffix ? `-${this.suffix}` : ""}`
|
||||
);
|
||||
}
|
||||
}
|
||||
module.exports = MenuItemIDBuilder;
|
||||
|
||||
Reference in New Issue
Block a user