-
Notifications
You must be signed in to change notification settings - Fork 42
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
Showing
15 changed files
with
477 additions
and
268 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
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,60 @@ | ||
import { | ||
testBuilder, | ||
testFeature, | ||
testTenant, | ||
testproject, | ||
} from "../testBuilder"; | ||
import { screenshotBuilder, setup } from "./utils"; | ||
|
||
export async function generate() { | ||
const { page, browser } = await setup(true); | ||
const screenshot = screenshotBuilder("webhooks")(page); | ||
|
||
await testBuilder() | ||
.withTenant( | ||
testTenant("bookstore") | ||
.withProject( | ||
testproject("website") | ||
.withFeature(testFeature("comments")) | ||
.withFeature(testFeature("summer-sales")) | ||
) | ||
.withProject( | ||
testproject("stock").withFeature(testFeature("new-store-ui")) | ||
) | ||
) | ||
.build(page); | ||
|
||
await page.goto("http://localhost:3000/tenants/bookstore/webhooks"); | ||
await screenshot("webhook-page"); | ||
await page | ||
.getByRole("button", { | ||
name: "Create new webhook", | ||
}) | ||
.click(); | ||
await screenshot("webhook-form"); | ||
await page.getByLabel("Name").fill("messaging-hook"); | ||
// TODO once react forms will be fiexed to allow id on these inputs | ||
await page.keyboard.press("Tab"); | ||
await page.keyboard.press("Space"); | ||
await page.getByLabel("URL").fill("http://my-client-app/hooks"); | ||
await page.getByRole("button", { name: "Add header" }).click(); | ||
await page.getByLabel("header-0-name").fill("Authorization"); | ||
await page.getByLabel("header-0-value").fill("my-secret-authorization-value"); | ||
await page.getByRole("combobox", { name: "Features (project)" }).click(); | ||
await page.getByText("summer-sales (website)", { exact: true }).click(); | ||
|
||
await page.getByLabel("User", { exact: true }).focus(); | ||
await page.keyboard.press("Tab"); | ||
await page.keyboard.press("Space"); | ||
await page.getByLabel("Handlebar template").scrollIntoViewIfNeeded(); | ||
await page.getByLabel("Handlebar template").click(); | ||
await screenshot("webhook-handlebar-form"); | ||
await page | ||
.getByRole("button", { name: "Test template" }) | ||
.scrollIntoViewIfNeeded(); | ||
await page.getByRole("button", { name: "Test template" }).click(); | ||
await screenshot("webhook-completed-form"); | ||
await page.getByRole("button", { name: "Save" }).click(); | ||
|
||
await browser.close(); | ||
} |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
export default [ | ||
require("/home/runner/work/izanami/izanami/manual/node_modules/infima/dist/css/default/default.css"), | ||
require("/home/runner/work/izanami/izanami/manual/node_modules/@docusaurus/theme-classic/lib/prism-include-languages"), | ||
require("/home/runner/work/izanami/izanami/manual/node_modules/@docusaurus/theme-classic/lib/nprogress"), | ||
require("/home/runner/work/izanami/izanami/manual/src/css/custom.css"), | ||
require("/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/infima/dist/css/default/default.css"), | ||
require("/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/@docusaurus/theme-classic/lib/prism-include-languages"), | ||
require("/Users/77199M/workspace/oss/izanami-v2/manual/node_modules/@docusaurus/theme-classic/lib/nprogress"), | ||
require("/Users/77199M/workspace/oss/izanami-v2/manual/src/css/custom.css"), | ||
]; |
Oops, something went wrong.