-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(): devtools transformmationsPanel and evaluationsPanel support edit
- Loading branch information
1 parent
3774667
commit 643e358
Showing
14 changed files
with
366 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from "react"; | ||
import { shallow, mount } from "enzyme"; | ||
import { PropsEditText } from "./PropsEditText"; | ||
|
||
describe("PropsEditText", () => { | ||
it("should work", () => { | ||
const props = { | ||
value: "<% DATA.message %>", | ||
onConfirm: jest.fn(), | ||
}; | ||
const wrapper = shallow(<PropsEditText {...props} />); | ||
|
||
wrapper.invoke("onChange")("DATA.age"); | ||
expect(wrapper.prop("value")).toEqual("DATA.age"); | ||
}); | ||
|
||
it("should update value", () => { | ||
const props = { | ||
value: "<% DATA.message %>", | ||
onConfirm: jest.fn(), | ||
}; | ||
const wrapper = mount(<PropsEditText {...props} />); | ||
|
||
wrapper.setProps({ | ||
value: "<% DATA.name %>", | ||
}); | ||
|
||
expect(wrapper.prop("value")).toEqual("<% DATA.name %>"); | ||
}); | ||
}); |
Oops, something went wrong.