1 | import React from "react";
|
2 |
|
3 | import { app } from "@/test/elements";
|
4 | import { render } from "@/test/render";
|
5 |
|
6 | import { ContainerAttributes } from "./ContainerAttributes";
|
7 |
|
8 | beforeEach(() => {
|
9 | render(
|
10 | <div role="application">
|
11 | <ContainerAttributes />
|
12 | </div>
|
13 | );
|
14 | });
|
15 |
|
16 | test('should have the "id" attribute', () => {
|
17 | expect(app().firstChild).toHaveAttribute("id", "testId");
|
18 | });
|
19 |
|
20 | test('should have the "title" attribute', () => {
|
21 | expect(app().firstChild).toHaveAttribute("title", "foo_title");
|
22 | });
|
23 |
|
24 | test('should have the "lang" attribute', () => {
|
25 | expect(app().firstChild).toHaveAttribute("lang", "it");
|
26 | });
|
27 |
|
28 | test("should have the data set attribute", () => {
|
29 | expect(app().firstChild).toHaveAttribute("data-test", "testData");
|
30 | });
|