Skip to content

OBPIH-7952 Cycle Count - perform cc for item - #100

Open
kkrawczyk123 wants to merge 9 commits into
mainfrom
OBPIH-7952
Open

OBPIH-7952 Cycle Count - perform cc for item #100
kkrawczyk123 wants to merge 9 commits into
mainfrom
OBPIH-7952

Conversation

@kkrawczyk123

Copy link
Copy Markdown
Collaborator

added:

  • new worker for cc tests and some configuration elements to improve the independence of workers and data
  • added new location
  • added new product, import of bin locations and inventory for new location
  • added cc pages with page elements (I know Alan will complain about selectors)
  • added test for performing CC for item

Assertion on last counted date is temporarily commented out because of an issue that I noticed when working on this test https://pihemr.atlassian.net/browse/OBPIH-7955

@kkrawczyk123
kkrawczyk123 requested a review from alannadolny July 29, 2026 14:50
Comment thread src/api/LocationService.ts
Comment thread src/components/Navbar.ts

getSectionNavItem(sectionName: string, itemName: string) {
return this.getSectionTitle(sectionName)
.locator('..')

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's that?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The 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.

Comment thread src/pages/manageCycleCount/components/AllProductsTable.ts
}

get table() {
return this.page.getByRole('grid');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ehhh, as you said - I don't like that selector


class ConfirmToCountTable extends BasePageModel {
get table() {
return this.page.locator('.count-step-table .ReactTable');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this one also


class ConfirmToRecountTable extends BasePageModel {
get table() {
return this.page.locator('.resolve-step-table .ReactTable');

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one also

Comment on lines +70 to +73
// await test.step('Assert Last Counted date on All Products tab matches stock card', async () => {
// const row = manageCycleCountPage.allProductsTable.row(0);
// await expect(row.lastCounted).toHaveText(lastStockCountDate);
// });

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use .skip?

Comment thread src/tests/cycleCount/performCC.test.ts
await expect(last.balance).toHaveText('50');
});

// await test.step('Assert Last Counted date and quantity on All Products tab', async () => {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skip

Comment thread src/utils/DateUtils.ts
Comment thread playwright.config.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants