-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-33066: Add basic ECL Watch UI tests
Signed-off-by: Gordon Smith <[email protected]>
- Loading branch information
1 parent
4082522
commit d0e69ab
Showing
8 changed files
with
254 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,47 @@ | ||
import { defineConfig, devices } from "@playwright/test"; | ||
|
||
const port = process.env.CI ? "8010" : "8080"; | ||
const baseURL = process.env.BASE_URL ?? `http://127.0.0.1:${port}`; | ||
|
||
/** | ||
* See https://playwright.dev/docs/test-configuration. | ||
*/ | ||
export default defineConfig({ | ||
testDir: "./tests", | ||
fullyParallel: true, | ||
forbidOnly: !!process.env.CI, | ||
retries: process.env.CI ? 2 : 0, | ||
workers: process.env.CI ? 4 : undefined, | ||
reporter: "html", | ||
use: { | ||
baseURL, | ||
trace: "on-first-retry", | ||
ignoreHTTPSErrors: true | ||
}, | ||
|
||
projects: [ | ||
{ | ||
name: "chromium", | ||
use: { ...devices["Desktop Chrome"] }, | ||
}, | ||
|
||
{ | ||
name: "firefox", | ||
use: { ...devices["Desktop Firefox"] }, | ||
}, | ||
|
||
{ | ||
name: "webkit", | ||
use: { ...devices["Desktop Safari"] }, | ||
}, | ||
|
||
], | ||
|
||
/* Run your local dev server before starting the tests */ | ||
webServer: { | ||
command: "npm run start", | ||
url: baseURL, | ||
reuseExistingServer: true, | ||
ignoreHTTPSErrors: true, | ||
}, | ||
}); |
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,34 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test.describe("ECLWatch V5", () => { | ||
test.beforeEach(async ({ page }) => { | ||
await page.goto("/esp/files/index.html"); | ||
await page.evaluate(() => { | ||
sessionStorage.setItem("ECLWatch:ModernMode-9.0", "false"); | ||
}); | ||
}); | ||
|
||
test("Basic Frame", async ({ page }) => { | ||
await page.goto("/esp/files/stub.htm"); | ||
await expect(page.locator("#stubStackController_stub_Main span").first()).toBeVisible(); | ||
await expect(page.getByLabel("Advanced")).toBeVisible(); | ||
}); | ||
|
||
test("Activities", async ({ page }) => { | ||
await page.goto("/esp/files/stub.htm"); | ||
await expect(page.locator("#stub_Main-DLStackController_stub_Main-DL_Activity_label")).toBeVisible(); | ||
await expect(page.getByLabel("Auto Refresh")).toBeVisible(); | ||
await expect(page.getByLabel("Maximize/Restore")).toBeVisible(); | ||
await expect(page.locator("i")).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: "%hthor" })).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: /^0%thor$/ })).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: "%roxie" })).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: "%thor_roxie" })).toBeVisible(); | ||
await expect(page.getByRole("img", { name: "Priority" })).toBeVisible(); | ||
await expect(page.getByText("Target/Wuid")).toBeVisible(); | ||
await expect(page.getByText("Graph")).toBeVisible(); | ||
await expect(page.getByText("State")).toBeVisible(); | ||
await expect(page.getByText("Owner")).toBeVisible(); | ||
await expect(page.getByText("Job Name")).toBeVisible(); | ||
}); | ||
}); |
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,44 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
test.describe("ECLWatch V9", () => { | ||
|
||
test("Basic Frame", async ({ page }) => { | ||
await page.goto("/esp/files/index.html#/activities"); | ||
await expect(page.getByRole("link", { name: "ECL Watch" })).toBeVisible(); | ||
await expect(page.locator("button").filter({ hasText: "" })).toBeVisible(); | ||
await expect(page.getByRole("button", { name: "Advanced" })).toBeVisible(); | ||
await expect(page.getByTitle("Activities")).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "ECL", exact: true })).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "Files" })).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "Published Queries" })).toBeVisible(); | ||
await expect(page.getByRole("button", { name: "History" })).toBeVisible(); | ||
await expect(page.getByRole("button", { name: "Add to favorites" })).toBeVisible(); | ||
await expect(page.locator("a").filter({ hasText: /^Activities$/ })).toBeVisible(); | ||
await expect(page.getByRole("link", { name: "Event Scheduler" })).toBeVisible(); | ||
}); | ||
|
||
test("Activities", async ({ page }) => { | ||
await page.goto("/esp/files/index.html#/activities"); | ||
await page.getByTitle("Disk Usage").locator("i").click(); | ||
await expect(page.locator("svg").filter({ hasText: "%hthor" })).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: /^0%thor$/ })).toBeVisible(); | ||
await expect(page.locator("svg").filter({ hasText: "%roxie" })).toBeVisible(); | ||
await expect(page.locator(".reflex-splitter")).toBeVisible(); | ||
await expect(page.getByRole("menubar")).toBeVisible(); | ||
await expect(page.getByRole("menuitem", { name: "Refresh" })).toBeVisible(); | ||
await expect(page.locator("button").filter({ hasText: "" })).toBeVisible(); | ||
await expect(page.locator("button").filter({ hasText: "" })).toBeVisible(); | ||
await expect(page.getByRole("columnheader", { name: "Priority" }).locator("div").first()).toBeVisible(); | ||
await expect(page.getByText("Target/Wuid")).toBeVisible(); | ||
await expect(page.getByText("Graph")).toBeVisible(); | ||
await expect(page.getByText("State")).toBeVisible(); | ||
await expect(page.getByText("Owner")).toBeVisible(); | ||
await expect(page.getByText("Job Name")).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "HThorServer - hthor" })).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "ThorMaster - thor", exact: true })).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "ThorMaster - thor_roxie" })).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "RoxieServer - roxie" })).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "myeclccserver - hthor." })).toBeVisible(); | ||
await expect(page.getByRole("gridcell", { name: "mydfuserver - dfuserver_queue" })).toBeVisible(); | ||
}); | ||
}); |