Skip to content

Commit 253f788

Browse files
committed
fix linting errors
1 parent 8ae9c55 commit 253f788

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

src/__tests__/retool.test.js

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
import React from "react";
2-
import { render } from "@testing-library/react";
2+
import { render, screen } from "@testing-library/react";
33
import Retool from "../components/Retool";
44

55
describe("react-retool", () => {
66
it("has the correct src attribute", () => {
7-
const { getByTitle } = render(
7+
render(
88
<Retool url="https://support.retool.com/embedded/public/cb9e15f0-5d7c-43a7-a746-cdec870dde9a" />
99
);
10-
// eslint-disable-next-line testing-library/prefer-screen-queries
11-
const iframe = getByTitle("retool");
10+
11+
const iframe = screen.getByTitle("retool");
1212
expect(iframe.src).toBe(
1313
"https://support.retool.com/embedded/public/cb9e15f0-5d7c-43a7-a746-cdec870dde9a"
1414
);
1515
});
1616

1717
it("has the correct height attribute", () => {
18-
const { getByTitle } = render(<Retool height="100%" />);
19-
// eslint-disable-next-line testing-library/prefer-screen-queries
20-
const iframe = getByTitle("retool");
18+
render(<Retool height="100%" />);
19+
20+
const iframe = screen.getByTitle("retool");
2121
expect(iframe.height).toBe("100%");
2222
});
2323

2424
it("has the correct width attribute", () => {
25-
const { getByTitle } = render(<Retool width="500px" />);
26-
// eslint-disable-next-line testing-library/prefer-screen-queries
27-
const iframe = getByTitle("retool");
25+
render(<Retool width="500px" />);
26+
27+
const iframe = screen.getByTitle("retool");
2828
expect(iframe.width).toBe("500px");
2929
});
3030

3131
it("has the correct sandbox attribute", () => {
32-
const { getByTitle } = render(<Retool sandbox="allow-popups" />);
33-
// eslint-disable-next-line testing-library/prefer-screen-queries
34-
const iframe = getByTitle("retool");
32+
render(<Retool sandbox="allow-popups" />);
33+
34+
const iframe = screen.getByTitle("retool");
3535
expect(iframe.getAttribute("sandbox")).toBe(
3636
"allow-scripts allow-same-origin allow-popups"
3737
);
3838
});
3939

4040
it("has the correct allow attribute", () => {
41-
const { getByTitle } = render(<Retool allow="fullscreen" />);
42-
// eslint-disable-next-line testing-library/prefer-screen-queries
43-
const iframe = getByTitle("retool");
41+
render(<Retool allow="fullscreen" />);
42+
43+
const iframe = screen.getByTitle("retool");
4444
expect(iframe.getAttribute("allow")).toBe("fullscreen");
4545
});
4646
});

0 commit comments

Comments
 (0)