-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
00e8760
commit 29980c6
Showing
6 changed files
with
80 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ yarn-error.log* | |
|
||
tsconfig.tsbuildinfo | ||
|
||
.config-data/**/*.json | ||
.config-data | ||
|
||
dist/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import React from "react"; | ||
import { render, screen } from "@testing-library/react"; | ||
import { ApplicationRoot } from "frontend/components/ApplicationRoot"; | ||
|
||
import ActionsIntegrations from "pages/integrations/actions/[key]"; | ||
|
||
import { setupApiHandlers } from "__tests__/_/setupApihandlers"; | ||
// import userEvent from "@testing-library/user-event"; | ||
// import { closeAllToasts } from "__tests__/_/utils/closeAllToasts"; | ||
|
||
setupApiHandlers(); | ||
|
||
describe("pages/integrations/actions/[key]", () => { | ||
const useRouter = jest.spyOn(require("next/router"), "useRouter"); | ||
beforeAll(() => { | ||
useRouter.mockImplementation(() => ({ | ||
asPath: "/", | ||
query: { | ||
key: "slack", | ||
}, | ||
isReady: true, | ||
})); | ||
}); | ||
|
||
describe("list", () => { | ||
it("should show the list of actions", async () => { | ||
render( | ||
<ApplicationRoot> | ||
<ActionsIntegrations /> | ||
</ApplicationRoot> | ||
); | ||
|
||
expect( | ||
await screen.findByRole("link", { name: "Slack" }) | ||
).toBeInTheDocument(); | ||
expect(screen.getByRole("link", { name: "HTTP" })).toBeInTheDocument(); | ||
expect( | ||
screen.getByRole("link", { name: "Non Activated Actions" }) | ||
).toBeInTheDocument(); | ||
}); | ||
|
||
// it("should show the configure UI for activated actions", async () => { | ||
// render( | ||
// <ApplicationRoot> | ||
// <ActionsIntegrations /> | ||
// </ApplicationRoot> | ||
// ); | ||
|
||
// await waitFor(() => { | ||
// expect( | ||
// screen.getByRole("option", { selected: true }) | ||
// ).toHaveTextContent("Slack"); | ||
// }); | ||
// }); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters