Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
f8ca8bd
PMM-14365 new navigation tests
kiranvuyurru Dec 22, 2025
b49bf3c
New left menu test
kiranvuyurru Jan 5, 2026
0bab4e3
refactored
kiranvuyurru Jan 7, 2026
a9c3d83
refactored
kiranvuyurru Jan 8, 2026
050c10f
Update grafana.helper.ts
kiranvuyurru Jan 8, 2026
4060b7b
Update navigation.page.ts
kiranvuyurru Jan 8, 2026
6455e38
added tags and fixed indentation
kiranvuyurru Jan 9, 2026
5eca751
changes and fixes
kiranvuyurru Jan 14, 2026
51c0566
changes and fixes
kiranvuyurru Jan 16, 2026
e17675e
Update navigation.page.ts
kiranvuyurru Jan 16, 2026
84f41d9
changes and fixes
kiranvuyurru Jan 16, 2026
ee1e9e7
updated
kiranvuyurru Jan 16, 2026
5eea4f8
Update navigation.page.ts
kiranvuyurru Jan 16, 2026
28a4b3c
Refactor navigation page and tests for new menu structure
kiranvuyurru Jan 21, 2026
e868271
Rename 'Percona Advisors' to 'Advisors'
kiranvuyurru Jan 21, 2026
09b339d
Change grafanaIframe to protected access modifier
kiranvuyurru Jan 21, 2026
9ff7981
Refactor and format e2e tests and page objects
kiranvuyurru Jan 26, 2026
ff93d5d
Refactor navigation page structure and variable selection
kiranvuyurru Jan 28, 2026
ced9f7e
Refactor navigation page objects and tests
kiranvuyurru Jan 29, 2026
e5b9c8a
Update navigation.page.ts
kiranvuyurru Jan 29, 2026
ce515dc
Improve navigation menu traversal and test reliability
kiranvuyurru Jan 29, 2026
f11db83
refactored
kiranvuyurru Jan 30, 2026
63666bf
fixed flakiness
kiranvuyurru Jan 30, 2026
29e3177
Update navigation.test.ts
kiranvuyurru Jan 30, 2026
5e21c17
Update navigation.test.ts
kiranvuyurru Jan 30, 2026
acdcb83
Update navigation.page.ts
kiranvuyurru Jan 30, 2026
0fdb7f8
Refactor nav traversal and update tests
kiranvuyurru Feb 2, 2026
7c159aa
Update navigation.page.ts
kiranvuyurru Feb 2, 2026
1838428
Update navigation.test.ts
kiranvuyurru Feb 2, 2026
e12b0cf
Update navigation.page.ts
kiranvuyurru Feb 3, 2026
ee1e7f2
Update navigation.page.ts
kiranvuyurru Feb 3, 2026
5c5fe8a
Update navigation.test.ts
kiranvuyurru Feb 3, 2026
a86e7a3
refactor
kiranvuyurru Feb 3, 2026
5ad7b40
Update navigation.test.ts
kiranvuyurru Feb 3, 2026
7934687
create traverse test as a new file (#872)
kiranvuyurru Feb 4, 2026
944709e
moved traverse test to navigation.test.ts
kiranvuyurru Feb 4, 2026
a349f81
Update navigation.test.ts
kiranvuyurru Feb 4, 2026
f09430b
PMM-14365 new navigation tests
kiranvuyurru Dec 22, 2025
622e7f6
New left menu test
kiranvuyurru Jan 5, 2026
9e04246
refactored
kiranvuyurru Jan 7, 2026
6b02cda
refactored
kiranvuyurru Jan 8, 2026
c708ef3
Update navigation.page.ts
kiranvuyurru Jan 8, 2026
26546f7
added tags and fixed indentation
kiranvuyurru Jan 9, 2026
ac7b475
changes and fixes
kiranvuyurru Jan 14, 2026
031b751
changes and fixes
kiranvuyurru Jan 16, 2026
c786646
Update navigation.page.ts
kiranvuyurru Jan 16, 2026
facc855
changes and fixes
kiranvuyurru Jan 16, 2026
541d391
updated
kiranvuyurru Jan 16, 2026
3dc3fea
Update navigation.page.ts
kiranvuyurru Jan 16, 2026
6129c28
Refactor navigation page and tests for new menu structure
kiranvuyurru Jan 21, 2026
702795f
Rename 'Percona Advisors' to 'Advisors'
kiranvuyurru Jan 21, 2026
3c9081c
Change grafanaIframe to protected access modifier
kiranvuyurru Jan 21, 2026
e502180
Refactor and format e2e tests and page objects
kiranvuyurru Jan 26, 2026
5cb3755
Refactor navigation page structure and variable selection
kiranvuyurru Jan 28, 2026
4300390
Refactor navigation page objects and tests
kiranvuyurru Jan 29, 2026
b555b02
Update navigation.page.ts
kiranvuyurru Jan 29, 2026
625ade1
Improve navigation menu traversal and test reliability
kiranvuyurru Jan 29, 2026
613daba
refactored
kiranvuyurru Jan 30, 2026
08d01c7
fixed flakiness
kiranvuyurru Jan 30, 2026
030c2f3
Update navigation.test.ts
kiranvuyurru Jan 30, 2026
b28754a
Update navigation.test.ts
kiranvuyurru Jan 30, 2026
e72a46e
Update navigation.page.ts
kiranvuyurru Jan 30, 2026
4470ca5
Refactor nav traversal and update tests
kiranvuyurru Feb 2, 2026
625853d
Update navigation.page.ts
kiranvuyurru Feb 2, 2026
4d6ad15
Update navigation.test.ts
kiranvuyurru Feb 2, 2026
d416849
Update navigation.page.ts
kiranvuyurru Feb 3, 2026
d81f775
Update navigation.page.ts
kiranvuyurru Feb 3, 2026
0658272
Update navigation.test.ts
kiranvuyurru Feb 3, 2026
b95591a
refactor
kiranvuyurru Feb 3, 2026
c937e5f
Update navigation.test.ts
kiranvuyurru Feb 3, 2026
8653f18
create traverse test as a new file (#872)
kiranvuyurru Feb 4, 2026
7c5d2f2
moved traverse test to navigation.test.ts
kiranvuyurru Feb 4, 2026
ff364a9
Update navigation.test.ts
kiranvuyurru Feb 4, 2026
58de377
Merge branch 'PMM-14544-new-navigation' of https://github.com/percona…
kiranvuyurru Feb 16, 2026
5322940
updated according to new lint rules and changes
kiranvuyurru Feb 17, 2026
f23fede
refactor
kiranvuyurru Feb 20, 2026
862c40f
Update navigation.test.ts
kiranvuyurru Feb 20, 2026
e2c8991
updated locator
kiranvuyurru Feb 23, 2026
3815781
Update navigation.page.ts
kiranvuyurru Feb 23, 2026
e429d5e
Merge branch 'main' into PMM-14544-new-navigation
kiranvuyurru Feb 25, 2026
a2ffd7c
Update changeTheme.test.ts
kiranvuyurru Feb 25, 2026
0355faf
Merge branch 'PMM-14544-new-navigation' of https://github.com/percona…
kiranvuyurru Feb 25, 2026
415d4e0
Refactor navigation helpers and update tests
kiranvuyurru Feb 25, 2026
e859018
Improve navigation waits and add test annotations
kiranvuyurru Feb 25, 2026
b338a78
Merge branch 'main' into PMM-14544-new-navigation
kiranvuyurru Feb 25, 2026
a063175
Update QAN page import paths
kiranvuyurru Feb 25, 2026
779ef62
Merge branch 'main' into PMM-14544-new-navigation
kiranvuyurru Mar 5, 2026
5304d53
PMM-14544
kiranvuyurru Mar 15, 2026
47ce7fb
PMM-14544
kiranvuyurru Mar 16, 2026
48d583c
Update navigation.test.ts
kiranvuyurru Mar 18, 2026
deebb1c
Merge branch 'main' into PMM-14544-new-navigation
kiranvuyurru Mar 19, 2026
d8b3884
Merge branch 'main' into PMM-14544-new-navigation
kiranvuyurru Apr 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions e2e_tests/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ export default defineConfig([
'verifyQanStoredMetricsHaveData',
'verifyTotalQueryCount',
'verifyRTAAgentStatus',
'verifyAllMenuItems',
],
},
],
Expand Down
7 changes: 7 additions & 0 deletions e2e_tests/fixtures/pmmTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import ThemePage from '@pages/theme.page';
import TourPage from '@pages/tour.page';
import WelcomePage from '@pages/welcome.page';
import Mocks from '@helpers/mocks.helper';
import LeftNavigation from '@pages/navigation.page';
import ServicesPage from '@pages/inventory/services.page';
import AgentsPage from '@pages/inventory/agents.page';
import PortalRemoval from '@pages/portalRemoval.page';
Expand All @@ -35,6 +36,7 @@ const pmmTest = base.extend<{
tour: TourPage;
welcomePage: WelcomePage;
mocks: Mocks;
leftNavigation: LeftNavigation;
portalRemoval: PortalRemoval;
queryAnalytics: QueryAnalytics;
nodesPage: NodesPage;
Expand Down Expand Up @@ -98,6 +100,11 @@ const pmmTest = base.extend<{

await use(helpPage);
},
leftNavigation: async ({ page }, use) => {
const leftNavigation = new LeftNavigation(page);

await use(leftNavigation);
},
mocks: async ({ page }, use) => {
const mocks = new Mocks(page);

Expand Down
15 changes: 15 additions & 0 deletions e2e_tests/helpers/grafana.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,21 @@ export default class GrafanaHelper {
return this.page;
};

createUser = async (username: string, password: string) => {
const authToken = GrafanaHelper.getToken();
const response = await this.page.request.post('graph/api/admin/users', {
data: {
login: username,
name: username,
OrgId: 1,
password: password,
},
headers: { Authorization: `Basic ${authToken}` },
});

return response;
};

static getAuthHeader = (username = 'admin', password = process.env.ADMIN_PASSWORD || 'admin') => ({
Authorization: `Basic ${this.getToken(username, password)}`,
});
Expand Down
70 changes: 68 additions & 2 deletions e2e_tests/pages/base.page.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,79 @@
import { Page, Locator } from '@playwright/test';
import { expect, Page, Locator } from '@playwright/test';
import { Timeouts } from '@helpers/timeouts';

export type DropdownName = 'Service Name' | 'Node Name';

export interface NestedLocators {
[key: string]: NestedLocator | boolean | undefined;
locator?: Locator;
verifyTimeRange?: boolean;
}

export type NestedLocator = Locator | NestedLocators;
export type NestedLocatorMap = Record<string, NestedLocator>;

export default abstract class BasePage {
abstract builders: Record<string, (...args: string[]) => Locator>;
abstract buttons: Record<string, Locator>;
abstract buttons: NestedLocatorMap;
abstract elements: Record<string, Locator>;
abstract inputs: Record<string, Locator>;
abstract messages: Record<string, Locator>;

constructor(protected page: Page) {}

duplicateCurrentPage = async (): Promise<Page> => {
const url = this.page.url();
const newPage = await this.page.context().newPage();

await newPage.goto(url);
await newPage.locator('#grafana-iframe').waitFor({ state: 'visible' });
this.page = newPage;

return newPage;
};

protected grafanaIframe = () => this.page.frameLocator('//*[@id="grafana-iframe"]');

selectTimeRange = async (timeRange: string): Promise<void> => {
await this.elements.timePickerOpenButton.click();

const timeRangeOption = this.grafanaIframe().locator(`//*[contains(text(), "${timeRange}")]`);

await timeRangeOption.click();
};

selectVariableValue = async (dropDownName: DropdownName, dropDownValue?: string): Promise<string> => {
const frame = this.grafanaIframe();
const wrapper = frame.getByTestId('data-testid template variable').filter({ hasText: dropDownName });
const combobox = wrapper.getByRole('combobox');

await combobox.click();

const options = frame.getByRole('option');

await options.nth(1).waitFor({
state: 'visible',
timeout: Timeouts.TEN_SECONDS,
});

const valueToSelect = dropDownValue
? options.filter({
hasText: new RegExp(`^${dropDownValue}$`, 'i'),
})
: options.filter({
hasText: /^(?!All$).+/i,
});
const selectedOption = (await valueToSelect.first().textContent())?.trim() ?? '';

await valueToSelect.first().click();
await this.page.keyboard.press('Escape');

await expect(combobox).toHaveAttribute('aria-expanded', 'false');

return selectedOption;
};

switchPage = (page: Page) => {
this.page = page;
};
}
Loading
Loading