forked from SigNoz/signoz
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added auth as pre-requisite for the other tests (SigNoz#4031)
* feat: added auth as pre-requisite for the other tests * feat: added navigation checks * feat: added navigation checks
- Loading branch information
1 parent
ec8a74d
commit 399d49b
Showing
5 changed files
with
69 additions
and
1 deletion.
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,10 @@ | ||
export const SERVICE_TABLE_HEADERS = { | ||
APPLICATION: "Applicaton", | ||
P99LATENCY: "P99 latency (in ms)", | ||
ERROR_RATE: "Error Rate (% of total)", | ||
OPS_PER_SECOND: "Operations Per Second", | ||
}; | ||
|
||
export const DATA_TEST_IDS = { | ||
NEW_DASHBOARD_BTN: "create-new-dashboard", | ||
}; |
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,40 @@ | ||
import { test, expect } from "@playwright/test"; | ||
import ROUTES from "../../frontend/src/constants/routes"; | ||
import { DATA_TEST_IDS, SERVICE_TABLE_HEADERS } from "./contants"; | ||
|
||
test("Basic Navigation Check across different resources", async ({ page }) => { | ||
// route to services page and check if the page renders fine with BE contract | ||
await Promise.all([ | ||
page.goto(ROUTES.APPLICATION), | ||
page.waitForRequest("**/v1/services"), | ||
]); | ||
|
||
const p99Latency = page.locator( | ||
`th:has-text("${SERVICE_TABLE_HEADERS.P99LATENCY}")` | ||
); | ||
|
||
await expect(p99Latency).toBeVisible(); | ||
|
||
// route to the new trace explorer page and check if the page renders fine | ||
await page.goto(ROUTES.TRACES_EXPLORER); | ||
|
||
await page.waitForLoadState("networkidle"); | ||
|
||
const listViewTable = await page | ||
.locator('div[role="presentation"]') | ||
.isVisible(); | ||
|
||
expect(listViewTable).toBeTruthy(); | ||
|
||
// route to the dashboards page and check if the page renders fine | ||
await Promise.all([ | ||
page.goto(ROUTES.ALL_DASHBOARD), | ||
page.waitForRequest("**/v1/dashboards"), | ||
]); | ||
|
||
const newDashboardBtn = await page | ||
.locator(`data-testid=${DATA_TEST_IDS.NEW_DASHBOARD_BTN}`) | ||
.isVisible(); | ||
|
||
expect(newDashboardBtn).toBeTruthy(); | ||
}); |