refactor: rename panel to root in JobHistorySidebarTab

Align with the emerging sidebar tab naming convention where all
tab page objects use a `root` getter for container scoping.
This commit is contained in:
dante01yoon
2026-04-09 16:16:26 +09:00
parent 754cea7b72
commit 91205994eb

View File

@@ -239,42 +239,42 @@ export class JobHistorySidebarTab extends SidebarTab {
super(page, 'job-history')
}
/** Scope all locators to the sidebar panel to avoid collision
/** Scope all locators to the sidebar root to avoid collision
* with QueueOverlayExpanded which renders the same controls. */
private get panel() {
get root() {
return this.page.locator('.sidebar-content-container')
}
get allTab() {
return this.panel.getByRole('button', { name: 'All', exact: true })
return this.root.getByRole('button', { name: 'All', exact: true })
}
get completedTab() {
return this.panel.getByRole('button', { name: 'Completed', exact: true })
return this.root.getByRole('button', { name: 'Completed', exact: true })
}
get failedTab() {
return this.panel.getByRole('button', { name: 'Failed', exact: true })
return this.root.getByRole('button', { name: 'Failed', exact: true })
}
get searchInput() {
return this.panel.getByPlaceholder('Search...')
return this.root.getByPlaceholder('Search...')
}
get filterButton() {
return this.panel.getByRole('button', { name: /Filter/i })
return this.root.getByRole('button', { name: /Filter/i })
}
get sortButton() {
return this.panel.getByRole('button', { name: /Sort/i })
return this.root.getByRole('button', { name: /Sort/i })
}
get jobItems() {
return this.panel.locator('[data-job-id]')
return this.root.locator('[data-job-id]')
}
get noActiveJobsText() {
return this.panel.getByText('No active jobs')
return this.root.getByText('No active jobs')
}
async waitForJobsLoad() {
@@ -282,11 +282,11 @@ export class JobHistorySidebarTab extends SidebarTab {
}
getJobById(id: string) {
return this.panel.locator(`[data-job-id="${id}"]`)
return this.root.locator(`[data-job-id="${id}"]`)
}
get groupLabels() {
return this.panel.locator('.text-xs.text-text-secondary')
return this.root.locator('.text-xs.text-text-secondary')
}
override async open() {