Skip to content

Commit 77e1d63

Browse files
committed
Frontend: Fix specific pod counter test failing build
Signed-off-by: Vincent T <[email protected]>
1 parent 1cab03a commit 77e1d63

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

e2e-tests/tests/headlampPage.ts

+7
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,13 @@ export class HeadlampPage {
127127
expect(rowsDisplayed1).not.toBe(rowsDisplayed2);
128128
}
129129

130+
async checkPluginTitle(pluginName: string) {
131+
await this.page.waitForLoadState('load');
132+
await this.page.waitForSelector(`h2:has-text("${pluginName}")`);
133+
134+
expect(await this.page.locator('h2').textContent()).toBe(pluginName);
135+
}
136+
130137
async getRowsDisplayed() {
131138
const paginationCaption = this.page.locator("span:has-text(' of ')");
132139
const captionText = await paginationCaption.textContent();

e2e-tests/tests/pluginSetting.spec.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ test('plugin settings page should have a table', async () => {
2121
await headlampPage.tableHasHeaders('table', expectedHeaders);
2222
});
2323

24-
test('pod counter plugin should have setting option', async () => {
24+
test('pod counter plugin should have setting option', async ({ page }) => {
25+
const headlampPage = new HeadlampPage(page);
2526
const pluginName = 'headlamp-pod-counter';
2627

2728
await headlampPage.navigateTopage('/settings/plugins', /Plugin/);
2829
await headlampPage.clickOnPlugin(pluginName);
29-
await headlampPage.hasTitleContaining(/Plugin Details/);
30+
await headlampPage.checkPluginTitle(pluginName);
3031
await headlampPage.checkPageContent('Custom Error Message');
3132
});

0 commit comments

Comments
 (0)