aboutsummaryrefslogtreecommitdiff
path: root/test/settings/components/form/BlacklistForm.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/BlacklistForm.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/BlacklistForm.test.tsx')
-rw-r--r--test/settings/components/form/BlacklistForm.test.tsx20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/settings/components/form/BlacklistForm.test.tsx b/test/settings/components/form/BlacklistForm.test.tsx
index e34802a..8727c59 100644
--- a/test/settings/components/form/BlacklistForm.test.tsx
+++ b/test/settings/components/form/BlacklistForm.test.tsx
@@ -17,16 +17,16 @@ describe("settings/form/BlacklistForm", () => {
/>
).root;
- const rows = root.findAllByProps({
- className: "form-blacklist-form-row",
- });
+ const rows = root
+ .findAllByType("div")
+ .filter((instance) => instance.props.role === "listitem");
expect(rows).to.have.lengthOf(2);
- expect(
- rows[0].findByProps({ className: "column-url" }).props.value
- ).to.equal("*.slack.com");
- expect(
- rows[1].findByProps({ className: "column-url" }).props.value
- ).to.equal("www.google.com/maps");
+ expect(rows[0].findByProps({ name: "url" }).props.value).to.equal(
+ "*.slack.com"
+ );
+ expect(rows[1].findByProps({ name: "url" }).props.value).to.equal(
+ "www.google.com/maps"
+ );
expect(() => root.findByType(AddButton)).not.throw();
});
@@ -113,7 +113,7 @@ describe("settings/form/BlacklistForm", () => {
});
const button = document.querySelector(
- "input[type=button].ui-add-button"
+ "input[type=button][name=add]"
) as HTMLButtonElement;
ReactTestUtils.Simulate.click(button);
});