Skip to content

OBPIH-7539 perform putaway as manager user#77

Open
kkrawczyk123 wants to merge 4 commits intomainfrom
OBPIH-7539
Open

OBPIH-7539 perform putaway as manager user#77
kkrawczyk123 wants to merge 4 commits intomainfrom
OBPIH-7539

Conversation

@kkrawczyk123
Copy link
Copy Markdown
Collaborator

Added a test for performing putaway as manager user

@kkrawczyk123 kkrawczyk123 requested a review from alannadolny April 1, 2026 14:49
}

get qtyField() {
return this.row.getByTestId('table-cell').nth(7);
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? It sounds like a cell, but the row is constructed from those objects underneath, so that shouldn't be implemented this way if that's the case. If that's a cell like putawaybin, then the name is not self-explanatory.

Comment on lines +79 to +80
await transactionListPage.deleteTransaction(1);
await transactionListPage.deleteTransaction(1);
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.

Isn't there a batch delete for transactions? If not, I think it's worth creating

await createPutawayPage.completeStep.editButton.click();
await createPutawayPage.startStep.isLoaded();
await createPutawayPage.startStep.table.row(2).deleteButton.click();
await createPutawayPage.startStep.table.row(2).row.isHidden();
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 it's not working. If this line fails, tests won't fail, so we are going to have false positive tests.
It should be

await expect(createPutawayPage.completeStep.table.row(2).row).toBeHiddent();

in every place

Comment on lines +68 to +89
test.afterEach(
async ({
stockMovementShowPage,
stockMovementService,
navbar,
transactionListPage,
oldViewShipmentPage,
}) => {
await stockMovementShowPage.goToPage(STOCK_MOVEMENT.id);
await navbar.configurationButton.click();
await navbar.transactions.click();
await transactionListPage.deleteTransaction(1);
await transactionListPage.deleteTransaction(1);
await stockMovementShowPage.goToPage(STOCK_MOVEMENT.id);
await stockMovementShowPage.detailsListTable.oldViewShipmentPage.click();
await oldViewShipmentPage.undoStatusChangeButton.click();
await stockMovementShowPage.isLoaded();
await stockMovementShowPage.rollbackButton.click();

await stockMovementService.deleteStockMovement(STOCK_MOVEMENT.id);
}
);
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.

btw, we should create tickets for doing cleanups through API. That definitely should be devs' tickets, so we can try to encourage the rest of the team. In general, it's not a good idea to do cleanups through UI (I know that we were doing it since the beginning, but we can make tests better over time), because if something fails in the UI, we are going to land in weird UI states.

await expect(
createPutawayPage.completeStep.confirmPutawayDialog
).toContainText(
/Qty5 of item .* is still in the receiving bin\. Do you want to continue\?/
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.

Are you sure there is no space between Qty and 5?

  • the .* is a little bit too wide regex, I would just use string concatenation and put the product inside that string.

Comment on lines +206 to +207
await navbar.profileButton.click();
await navbar.refreshCachesButton.click();
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 can see that you are clearing caches really often. Is it really required? I am not sure if our caches are even working. If it works, maybe you can pack those lines in a util, so we can just call refreshCaches()

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