mirror of
https://github.com/openobserve/openobserve.git
synced 2026-11-04 16:09:05 +00:00
test: visualize test cases (#6619)
This commit is contained in:
@@ -54,6 +54,7 @@ test.describe(" visualize UI testcases", () => {
|
||||
});
|
||||
// get the data from the search variable
|
||||
await expect.poll(async () => (await search).status()).toBe(200);
|
||||
|
||||
// await search.hits.FIXME_should("be.an", "array");
|
||||
}
|
||||
// tebefore(async function () {
|
||||
@@ -122,7 +123,11 @@ test.describe(" visualize UI testcases", () => {
|
||||
page,
|
||||
}) => {
|
||||
await page.locator('[data-test="menu-link-\\/logs-item"]').click();
|
||||
await page.getByRole('switch', { name: 'SQL Mode' }).locator('div').nth(2).click();
|
||||
await page
|
||||
.getByRole("switch", { name: "SQL Mode" })
|
||||
.locator("div")
|
||||
.nth(2)
|
||||
.click();
|
||||
await page.waitForTimeout(1000);
|
||||
await page
|
||||
.locator('[data-test="logs-search-index-list"]')
|
||||
@@ -160,7 +165,7 @@ test.describe(" visualize UI testcases", () => {
|
||||
).toBeVisible();
|
||||
});
|
||||
|
||||
test("should adjust the displayed data effectively when editing the X-axis and Y-axis on the chart", async ({
|
||||
test("should adjust the displayed data effectively when editing the X-axis and Y-axis on the chart.", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.locator('[data-test="logs-search-bar-refresh-btn"]').click();
|
||||
@@ -211,7 +216,7 @@ test.describe(" visualize UI testcases", () => {
|
||||
});
|
||||
});
|
||||
|
||||
test("should correctly plot the data according to the new chart type when changing the chart type", async ({
|
||||
test("should correctly plot the data according to the new chart type when changing the chart type.", async ({
|
||||
page,
|
||||
}) => {
|
||||
await page.locator('[data-test="logs-visualize-toggle"]').click();
|
||||
@@ -230,6 +235,7 @@ test.describe(" visualize UI testcases", () => {
|
||||
).toBeVisible();
|
||||
await page.locator('[data-test="date-time-btn"]').click();
|
||||
await page.locator('[data-test="date-time-relative-6-w-btn"]').click();
|
||||
|
||||
await page
|
||||
.locator('[data-test="chart-renderer"] canvas')
|
||||
.last()
|
||||
@@ -281,6 +287,9 @@ test.describe(" visualize UI testcases", () => {
|
||||
},
|
||||
});
|
||||
await page.locator('[data-test="selected-chart-scatter-item"]').click();
|
||||
await page
|
||||
.locator('[data-test="logs-search-bar-visualize-refresh-btn"]')
|
||||
.click();
|
||||
await page
|
||||
.locator('[data-test="chart-renderer"] canvas')
|
||||
.last()
|
||||
@@ -291,6 +300,11 @@ test.describe(" visualize UI testcases", () => {
|
||||
},
|
||||
});
|
||||
await page.locator('[data-test="selected-chart-pie-item"]').click();
|
||||
|
||||
await page
|
||||
.locator('[data-test="logs-search-bar-visualize-refresh-btn"]')
|
||||
.click();
|
||||
|
||||
await page
|
||||
.locator('[data-test="chart-renderer"] canvas')
|
||||
.last()
|
||||
@@ -301,6 +315,10 @@ test.describe(" visualize UI testcases", () => {
|
||||
},
|
||||
});
|
||||
await page.locator('[data-test="selected-chart-donut-item"]').click();
|
||||
|
||||
await page
|
||||
.locator('[data-test="logs-search-bar-visualize-refresh-btn"]')
|
||||
.click();
|
||||
await page
|
||||
.locator('[data-test="chart-renderer"] canvas')
|
||||
.last()
|
||||
@@ -311,6 +329,10 @@ test.describe(" visualize UI testcases", () => {
|
||||
},
|
||||
});
|
||||
await page.locator('[data-test="selected-chart-gauge-item"]').click();
|
||||
|
||||
await page
|
||||
.locator('[data-test="logs-search-bar-visualize-refresh-btn"]')
|
||||
.click();
|
||||
await page
|
||||
.locator('[data-test="chart-renderer"] canvas')
|
||||
.last()
|
||||
@@ -422,7 +444,7 @@ test.describe(" visualize UI testcases", () => {
|
||||
.click();
|
||||
});
|
||||
|
||||
test("should not update the query on the logs page when switching between logs and visualization, even if changes are made in any field in the visualization", async ({
|
||||
test("should not update the query on the logs page when switching between logs and visualization, even if changes are made in any field in the visualization.", async ({
|
||||
page,
|
||||
}) => {
|
||||
// Chart should not reflect changes made to X or Y axis.
|
||||
@@ -552,7 +574,11 @@ test.describe(" visualize UI testcases", () => {
|
||||
await page.locator('[data-test="logs-search-bar-refresh-btn"]').click();
|
||||
|
||||
// Switch to SQL mode, apply the query, and refresh the search
|
||||
await page.getByRole('switch', { name: 'SQL Mode' }).locator('div').nth(2).click();
|
||||
await page
|
||||
.getByRole("switch", { name: "SQL Mode" })
|
||||
.locator("div")
|
||||
.nth(2)
|
||||
.click();
|
||||
await page.locator('[data-test="logs-search-bar-refresh-btn"]').click();
|
||||
|
||||
// Toggle visualization
|
||||
|
||||
Reference in New Issue
Block a user