-
-
Notifications
You must be signed in to change notification settings - Fork 0
OBPIH-7952 Cycle Count - perform cc for item #100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
5551592
7567f29
2a95c4f
5705a3d
e34e735
dd668cb
674bbd5
76975f2
dfa9a65
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,6 +34,12 @@ class Navbar extends BasePageModel { | |
| .filter({ visible: true }); | ||
| } | ||
|
|
||
| getSectionNavItem(sectionName: string, itemName: string) { | ||
| return this.getSectionTitle(sectionName) | ||
| .locator('..') | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What's that?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. getNavItem(name) (line 26-28) searches for a menu item across the entire navbar. That's fine when item names are unique, but it breaks for names that also exist elsewhere — like "Reporting" appears both as a link inside the "Cycle Count" dropdown section and as a completely separate top-level "Reporting" module in the navbar. getNavItem('Reporting') would match both and throw a strict-mode violation. |
||
| .getByRole('menuitem', { name: itemName, exact: true }); | ||
| } | ||
|
|
||
| get editProfileButton() { | ||
| return this.navbar.getByRole('menuitem', { name: 'Edit Profile' }); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| import { expect, Page } from '@playwright/test'; | ||
|
|
||
| import BasePageModel from '@/pages/BasePageModel'; | ||
| import AssignToRecountDialog from '@/pages/manageCycleCount/components/AssignToRecountDialog'; | ||
| import ConfirmToCountTable from '@/pages/manageCycleCount/components/ConfirmToCountTable'; | ||
| import ResolveDiscrepancyDialog from '@/pages/manageCycleCount/components/ResolveDiscrepancyDialog'; | ||
|
|
||
| class ConfirmToCountStepPage extends BasePageModel { | ||
| confirmToCountTable: ConfirmToCountTable; | ||
| resolveDiscrepancyDialog: ResolveDiscrepancyDialog; | ||
| assignToRecountDialog: AssignToRecountDialog; | ||
|
|
||
| constructor(page: Page) { | ||
| super(page); | ||
| this.confirmToCountTable = new ConfirmToCountTable(page); | ||
| this.resolveDiscrepancyDialog = new ResolveDiscrepancyDialog(page); | ||
| this.assignToRecountDialog = new AssignToRecountDialog(page); | ||
| } | ||
|
|
||
| async isLoaded() { | ||
| await expect(this.saveButton).toBeVisible(); | ||
| } | ||
|
|
||
| get productTitle() { | ||
| return this.page.locator('.count-step-title'); | ||
| } | ||
|
|
||
| get dateCountedValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: 'Date counted' }) | ||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get countedByValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: 'Counted by' }) | ||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get backButton() { | ||
| return this.page.getByRole('button', { name: 'Back', exact: true }); | ||
| } | ||
|
|
||
| get saveButton() { | ||
| return this.page.getByRole('button', { name: 'Save', exact: true }); | ||
| } | ||
| } | ||
|
|
||
| export default ConfirmToCountStepPage; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| import { expect, Page } from '@playwright/test'; | ||
|
|
||
| import BasePageModel from '@/pages/BasePageModel'; | ||
| import ConfirmToRecountTable from '@/pages/manageCycleCount/components/ConfirmToRecountTable'; | ||
|
|
||
| class ConfirmToRecountStepPage extends BasePageModel { | ||
| confirmToRecountTable: ConfirmToRecountTable; | ||
|
|
||
| constructor(page: Page) { | ||
| super(page); | ||
| this.confirmToRecountTable = new ConfirmToRecountTable(page); | ||
| } | ||
|
|
||
| async isLoaded() { | ||
| await expect(this.saveButton).toBeVisible(); | ||
| } | ||
|
|
||
| get productTitle() { | ||
| return this.page.locator('.count-step-title'); | ||
| } | ||
|
|
||
| get dateCountedValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: 'Date counted' }) | ||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get countedByValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: /^Counted by/ }) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is ^ needed? |
||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get dateRecountedValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: 'Date recounted' }) | ||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get recountedByValue() { | ||
| return this.page | ||
| .locator('.count-step-label', { hasText: 'Recounted by' }) | ||
| .locator('.count-step-value'); | ||
| } | ||
|
|
||
| get backButton() { | ||
| return this.page.getByRole('button', { name: 'Back', exact: true }); | ||
| } | ||
|
|
||
| get saveButton() { | ||
| return this.page.getByRole('button', { name: 'Save', exact: true }); | ||
| } | ||
| } | ||
|
|
||
| export default ConfirmToRecountStepPage; | ||
Uh oh!
There was an error while loading. Please reload this page.