fix: more fixed locators in tests (#6799)

Signed-off-by: Alexander Onnikov <Alexander.Onnikov@xored.com>
This commit is contained in:
Alexander Onnikov 2024-10-03 22:28:34 +07:00 committed by GitHub
parent 1ab7394695
commit eb66c36892
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 6 additions and 6 deletions

View File

@ -8,7 +8,7 @@ export class LeadsPage {
}
readonly leadApplication = (): Locator => this.page.locator('[id="app-lead\\:string\\:LeadApplication"]')
readonly customersNavElement = (): Locator => this.page.locator('text=Customers')
readonly customersNavElement = (): Locator => this.page.locator('.antiPanel-navigator').locator('text=Customers')
readonly newCustomerButton = (): Locator => this.page.locator('button:has-text("New Customer")')
readonly personButton = (): Locator => this.page.locator('button:has-text("Person")')
readonly companyButton = (): Locator => this.page.locator('button:has-text("Company")')

View File

@ -33,7 +33,7 @@ export class RecruitingPage {
applicationLabelChunterButton = (): Locator =>
this.page.locator('[id="app-chunter\\:string\\:ApplicationLabelChunter"]')
generalChatLink = (): Locator => this.page.locator('text=general')
generalChatLink = (): Locator => this.page.locator('.antiPanel-navigator').locator('text=general')
contactsButton = (): Locator => this.page.locator('[id="app-contact\\:string\\:Contacts"]')
employeeSection = (): Locator => this.page.getByRole('button', { name: 'Employee' })
johnAppleseed = (): Locator => this.page.locator('text=Appleseed John')

View File

@ -53,7 +53,7 @@ export class CommonTrackerPage extends CalendarPage {
submitDatePopup = (): Locator => this.page.locator('div.date-popup-container button[type="submit"]')
trackerApplicationButton = (): Locator => this.page.locator('[id="app-tracker\\:string\\:TrackerApplication"]')
componentsLink = (): Locator => this.page.locator('text=Components')
componentsLink = (): Locator => this.page.locator('.antiPanel-navigator').locator('text=Components')
createComponentButton = (): Locator => this.page.getByRole('button', { name: 'Component', exact: true })
componentNameInput = (): Locator => this.page.locator('[placeholder="Component\\ name"]')
createComponentConfirmButton = (): Locator => this.page.locator('button:has-text("Create component")')

View File

@ -8,7 +8,7 @@ import { NewIssue } from './types'
const retryOptions = { intervals: [1000, 1500, 2500], timeout: 60000 }
export class IssuesPage extends CommonTrackerPage {
modelSelectorAll = (): Locator => this.page.locator('label[data-id="tab-all"]')
issues = (): Locator => this.page.locator('text="Issues"')
issues = (): Locator => this.page.locator('.antiPanel-navigator').locator('text="Issues"')
subIssues = (): Locator => this.page.locator('button:has-text("Add sub-issue")')
newIssue = (): Locator => this.page.locator('#new-issue')
modelSelectorActive = (): Locator => this.page.locator('label[data-id="tab-active"]')
@ -109,7 +109,7 @@ export class IssuesPage extends CommonTrackerPage {
doneHeaderKanban = (): Locator => this.page.locator('.header :text-is("Done")').first()
canceledHeaderKanban = (): Locator => this.page.locator('.header :text-is("Canceled")').first()
myIssuesButton = (): Locator => this.page.locator('text="My issues"')
myIssuesButton = (): Locator => this.page.locator('.antiPanel-navigator').locator('text="My issues"')
assignedTab = (): Locator => this.page.locator('[data-id="tab-assigned"]')
createdTab = (): Locator => this.page.locator('[data-id="tab-created"]')
subscribedTab = (): Locator => this.page.locator('[data-id="tab-subscribed"]')
@ -140,7 +140,7 @@ export class IssuesPage extends CommonTrackerPage {
timeSpentReports = (): Locator => this.page.getByText('Time spent reports', { exact: true })
addTimeReport = (): Locator => this.page.locator('text="Add time report"')
issueName = (name: string): Locator => this.page.locator(`text="${name}"`)
issuesButton = (): Locator => this.page.locator('text="Issues"')
issuesButton = (): Locator => this.page.locator('.antiPanel-navigator').locator('text="Issues"')
viewButton = (): Locator => this.page.locator('button[data-id="btn-viewOptions"]')
orderingButton = (): Locator => this.page.locator('.ordering button')
modifiedDateMenuItem = (): Locator => this.page.locator('button.menu-item', { hasText: 'Modified date' })