Skip to content

OBPIH-7963 Cycle Count - item with negative inventory - #102

Open
kkrawczyk123 wants to merge 6 commits into
mainfrom
OBPIH-7963
Open

OBPIH-7963 Cycle Count - item with negative inventory#102
kkrawczyk123 wants to merge 6 commits into
mainfrom
OBPIH-7963

Conversation

@kkrawczyk123

Copy link
Copy Markdown
Collaborator

added:

  • test for cc item with negative inventory
  • created new testing data
  • added new page elements
  • improved reliability of existing cc test

await this.quantityCountedInput.pressSequentially(value, {
delay: 100,
});
await this.page.waitForTimeout(300);

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.

Why is it needed? Can't you wait for any item on the page instead of waiting for a hard-coded time?

Comment on lines +18 to +19
rowByBinLocation(binLocationName: string) {
return new Row(this.page, this.rows.filter({ hasText: binLocationName }).first());

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 think we should have getRowsByBinLocation and then in the test call .first

Comment on lines +24 to +27
async goToPerformCycleCount() {
await this.page.goto(`${CYCLE_COUNT_URL.base}?tab=TO_COUNT`);
}

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.

That URL with the tab should be placed in the URL files

async searchProduct(productName: string) {
await this.searchInput.fill(productName);
await this.searchInput.click();
await this.page.keyboard.press('ControlOrMeta+A');

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.

add a comment about the 'ControlOrMeta+A'

Comment on lines +80 to +96
get negativeQuantityFilterGroup() {
return this.page.locator('.filter-group', {
has: this.page.locator('label[for="negativeQuantity"]'),
});
}

get negativeQuantityCheckbox() {
return this.negativeQuantityFilterGroup.getByRole('checkbox');
}

async openNegativeQuantityTooltip() {
const trigger = this.negativeQuantityFilterGroup.locator('[data-tooltipped]');
await trigger.hover();
const describedBy = await trigger.getAttribute('aria-describedby');
return this.page.locator(`#${describedBy}`);
}

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 explain what's going on with the negative here?

confirmToRecountStepPage,
productShowPage,
}) => {
test.setTimeout(120_000);

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.

Add a comment about what is taking so long to execute

}
);

test('Perform cycle count when item has negative inventory', 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.

Can you somehow split that test into a few more?

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