mirror of
https://github.com/maputnik/editor.git
synced 2026-02-05 20:20:02 +00:00
Add a test to make sure this functionality doesn't get broken
This commit is contained in:
@@ -77,11 +77,18 @@ describe("modals", () => {
|
||||
});
|
||||
|
||||
it("name", () => {
|
||||
when.click("field-doc-button-Name");
|
||||
|
||||
should.containText("spec-field-doc", "name for the style");
|
||||
});
|
||||
|
||||
it("show name specifications", () => {
|
||||
when.setValue(get.dataAttribute("modal:settings.name"), "foobar");
|
||||
when.click("modal:settings.owner");
|
||||
|
||||
should.equalStyleStore((obj) => obj.name, "foobar");
|
||||
});
|
||||
|
||||
it("owner", () => {
|
||||
when.setValue(get.dataAttribute("modal:settings.owner"), "foobar");
|
||||
when.click("modal:settings.name");
|
||||
|
||||
@@ -39,7 +39,7 @@ export default class Doc extends React.Component<DocProps> {
|
||||
<>
|
||||
{doc &&
|
||||
<div className="SpecDoc">
|
||||
<div className="SpecDoc__doc">{doc}</div>
|
||||
<div className="SpecDoc__doc" data-wd-key='spec-field-doc'>{doc}</div>
|
||||
{renderValues &&
|
||||
<ul className="SpecDoc__values">
|
||||
{Object.entries(values).map(([key, value]) => {
|
||||
|
||||
@@ -44,6 +44,7 @@ export default class FieldDocLabel extends React.Component<FieldDocLabelProps, F
|
||||
aria-label={this.state.open ? "close property documentation" : "open property documentation"}
|
||||
className={`maputnik-doc-button maputnik-doc-button--${this.state.open ? 'open' : 'closed'}`}
|
||||
onClick={() => this.onToggleDoc(!this.state.open)}
|
||||
data-wd-key={'field-doc-button-'+label}
|
||||
>
|
||||
{this.state.open ? <MdHighlightOff /> : <MdInfoOutline />}
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user