aboutsummaryrefslogtreecommitdiff
path: root/test/settings/components/form/SearchEngineForm.test.tsx
diff options
context:
space:
mode:
authorShin'ya Ueoka <ueokande@i-beam.org>2020-09-22 11:03:07 +0900
committerGitHub <noreply@github.com>2020-09-22 11:03:07 +0900
commitd956b9e976c01db3944643e2260cb23e23b08221 (patch)
treed953d4d629bd31f5ba1b248133ee1f77cdf470ac /test/settings/components/form/SearchEngineForm.test.tsx
parent5d82441ce3d12301bb8f04b78b79fffb04121a37 (diff)
parent7257406df196a29c0f172ee68ca8dbe50a72d21f (diff)
Merge pull request #838 from ueokande/form-styled-components
Use styled-components instead of vanilla CSS/SCSS in option
Diffstat (limited to 'test/settings/components/form/SearchEngineForm.test.tsx')
-rw-r--r--test/settings/components/form/SearchEngineForm.test.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/test/settings/components/form/SearchEngineForm.test.tsx b/test/settings/components/form/SearchEngineForm.test.tsx
index 5f835cc..7b10274 100644
--- a/test/settings/components/form/SearchEngineForm.test.tsx
+++ b/test/settings/components/form/SearchEngineForm.test.tsx
@@ -21,12 +21,16 @@ describe("settings/form/SearchForm", () => {
/>
).root;
- const names = root.findAllByProps({ name: "name" });
+ const names = root
+ .findAllByType("input")
+ .filter((instance) => instance.props.name === "name");
expect(names).to.have.lengthOf(2);
expect(names[0].props.value).to.equal("google");
expect(names[1].props.value).to.equal("yahoo");
- const urls = root.findAllByProps({ name: "url" });
+ const urls = root
+ .findAllByType("input")
+ .filter((instance) => instance.props.name === "url");
expect(urls).to.have.lengthOf(2);
expect(urls[0].props.value).to.equal("google.com");
expect(urls[1].props.value).to.equal("yahoo.com");
@@ -139,7 +143,7 @@ describe("settings/form/SearchForm", () => {
});
const button = document.querySelector(
- "input[type=button].ui-add-button"
+ "input[type=button][name=add]"
) as HTMLInputElement;
ReactTestUtils.Simulate.click(button);
});