mirror of
https://github.com/maputnik/editor.git
synced 2026-08-24 14:07:33 +00:00
Fix missing spec info (#1370)
## Launch Checklist This fixes an issue with missing info in the spec field due to using the redacted spec (the one without the docs). Before - missing button near color when hovering <img width="397" height="202" alt="image" src="https://github.com/user-attachments/assets/6f261407-5348-4a71-a6d8-afaff5b27e03" /> After: <img width="397" height="202" alt="image" src="https://github.com/user-attachments/assets/d2de1b2d-d4cf-4394-b995-e50b957da72c" /> I think I already solved this in the past, too bad I didn't add the relevant tests back then... - [x] Briefly describe the changes in this PR. - [x] Include before/after visuals or gifs if this PR includes visual changes. - [x] Write tests for all new functionality. - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
This commit is contained in:
@@ -467,6 +467,30 @@ describe("layers", () => {
|
||||
],
|
||||
});
|
||||
});
|
||||
|
||||
it("should show spec info when hovering and clicking single line property", () => {
|
||||
when.modal.fillLayers({
|
||||
type: "symbol",
|
||||
layer: "example",
|
||||
});
|
||||
|
||||
when.hover("spec-field-container:text-rotate");
|
||||
then(get.elementByTestId("field-doc-button-Rotate")).shouldBeVisible();
|
||||
when.click("field-doc-button-Rotate", 0);
|
||||
then(get.elementByTestId("spec-field-doc")).shouldContainText("Rotates the ");
|
||||
});
|
||||
|
||||
it("should show spec info when hovering and clicking multi line property", () => {
|
||||
when.modal.fillLayers({
|
||||
type: "symbol",
|
||||
layer: "example",
|
||||
});
|
||||
|
||||
when.hover("spec-field-container:text-offset");
|
||||
then(get.elementByTestId("field-doc-button-Offset")).shouldBeVisible();
|
||||
when.click("field-doc-button-Offset", 0);
|
||||
then(get.elementByTestId("spec-field-doc")).shouldContainText("Offset distance");
|
||||
});
|
||||
});
|
||||
|
||||
describe("raster", () => {
|
||||
|
||||
Reference in New Issue
Block a user