Skip to content

Commit

Permalink
Create a new test
Browse files Browse the repository at this point in the history
  • Loading branch information
nkaretnikov committed Feb 22, 2024
1 parent 34d1f48 commit 7ef88c2
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions test/environmentCreate/SpecificationCreate.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@ describe("<SpecificationCreate />", () => {
const switchButton = component.getByLabelText("YAML", { exact: false });
fireEvent.click(switchButton);

const vatSelectInput = component.container.querySelector(
".cm-editor"
) as HTMLInputElement;
expect(vatSelectInput).toBeInTheDocument();
});

it("should update the yaml editor when new packages are requested", () => {
const switchButton = component.getByLabelText("YAML", { exact: false });
fireEvent.click(switchButton);

var channels = component.getByText("channels", { exact: true }).closest("div");

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Unexpected var, use let or const instead

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Replace `.getByText("channels",·{·exact:·true·})` with `⏎······.getByText("channels",·{·exact:·true·})⏎······`

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Unexpected var, use let or const instead

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Replace `.getByText("channels",·{·exact:·true·})` with `⏎······.getByText("channels",·{·exact:·true·})⏎······`

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Unexpected var, use let or const instead

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Replace `.getByText("channels",·{·exact:·true·})` with `⏎······.getByText("channels",·{·exact:·true·})⏎······`

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Unexpected var, use let or const instead

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Replace `.getByText("channels",·{·exact:·true·})` with `⏎······.getByText("channels",·{·exact:·true·})⏎······`

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Unexpected var, use let or const instead

Check failure on line 48 in test/environmentCreate/SpecificationCreate.test.tsx

View workflow job for this annotation

GitHub Actions / Build Package

Replace `.getByText("channels",·{·exact:·true·})` with `⏎······.getByText("channels",·{·exact:·true·})⏎······`
expect(channels?.textContent).toBe("channels:");

Expand All @@ -58,11 +68,6 @@ describe("<SpecificationCreate />", () => {

var variables = component.getByText("variables", { exact: true }).closest("div");
expect(variables?.textContent).toBe("variables: {}");

const vatSelectInput = component.container.querySelector(
".cm-editor"
) as HTMLInputElement;
expect(vatSelectInput).toBeInTheDocument();
});

it("should call handleSubmit in order to create a new env", () => {
Expand Down

0 comments on commit 7ef88c2

Please sign in to comment.