Conversation
| } | ||
|
|
||
| get qtyField() { | ||
| return this.row.getByTestId('table-cell').nth(7); |
There was a problem hiding this comment.
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.
| await transactionListPage.deleteTransaction(1); | ||
| await transactionListPage.deleteTransaction(1); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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
| 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); | ||
| } | ||
| ); |
There was a problem hiding this comment.
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\?/ |
There was a problem hiding this comment.
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.
| await navbar.profileButton.click(); | ||
| await navbar.refreshCachesButton.click(); |
There was a problem hiding this comment.
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()
Added a test for performing putaway as manager user