🎉 Cap stop amount in UI for wasm (#6438)

* 🎉 Cap in the colorpicker the amount of stops a gradient can have

* 🎉 Cap the stops amount in gradient handlers

* 🎉 Disable add stop in gradient handlers (viewport + colorpicker)

*  Add integration test for gradient limits

* 💄 Address PR suggestion
This commit is contained in:
Belén Albeza 2025-05-13 10:37:05 +02:00 committed by GitHub
parent 69cc4fb4c2
commit 91fbe8f8ef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 438 additions and 102 deletions

View file

@ -36,6 +36,17 @@ export class BasePage {
async mockRPC(path, jsonFilename, options) {
return BasePage.mockRPC(this.page, path, jsonFilename, options);
}
async mockConfigFlags(flags) {
const url = "**/js/config.js?ts=*";
return await this.page.route(url, (route) =>
route.fulfill({
status: 200,
contentType: "application/javascript",
body: `var penpotFlags = "${flags.join(" ")}";`,
}),
);
}
}
export default BasePage;