OBPIH-7608 Putaway - sort by current and prefrerred bin #92
OBPIH-7608 Putaway - sort by current and prefrerred bin #92alannadolny wants to merge 4 commits into
Conversation
…ducts by vertical position
…assignment utilities
…red bin, and original order
ewaterman
left a comment
There was a problem hiding this comment.
it's really neat to see how this is coming together. The utils are nice 👍
| return new Row(this.page, this.rows.nth(index)); | ||
| } | ||
|
|
||
| /* |
There was a problem hiding this comment.
| /* | |
| /** |
I don't know how it works for typescript files, but docstrings need to be like this in java for the IDE to be able to resolve them properly (such as when hovering on method names)
Same for all your docstrings in this PR.
| // Row containing the given product name. Use after flattening the table | ||
| // (Show by -> Product) so each item is its own row. | ||
| rowByProductName(name: string) { | ||
| return new Row(this.page, this.rows.filter({ hasText: name }).first()); |
There was a problem hiding this comment.
this is searching the whole row? Is there no way to target the specific column?
There was a problem hiding this comment.
It returns a row from the table that is related to that product. The table is a little bit weirdly constructed due to the collapsible behavior, so that was an easier way.
| in the table (top to bottom). | ||
| */ | ||
| async getProductsOrder(productNames: string[]): Promise<string[]> { | ||
| const positions: { name: string; y: number }[] = []; |
There was a problem hiding this comment.
what does "vertical position" and "y" mean here? Is it row index into the table? Or is it using the actual vertical position in the UI?
There was a problem hiding this comment.
actual vertical position
| supplierLocationService, | ||
| }) => { | ||
| // Extended timeout: those pages are loading slowly than others. | ||
| test.setTimeout(180_000); |
| }, | ||
| stockMovement: StockMovementResponse, | ||
| quantities: number[], | ||
| shipmentType: ShipmentType = ShipmentType.AIR |
There was a problem hiding this comment.
Are you imagining these utils only being used for convenience when you're not specifically testing the functionality and just need to do the action without customizing the behaviour? I ask because there's no way to configure the behaviour here (such as setting the shipment type).
And then if you're specifically testing receiving then you wouldn't use this util and would instead make all these calls manually in the test so that you can provide specific inputs?
I'm fine with this (and do similarly in integration tests on the backend) I just want to understand what the goal is with these utils
There was a problem hiding this comment.
The goal was to clean the code 😄. It can be extended with, for example, changing the shipment type if needed. Now I just extracted the duplicated code to a method.

No description provided.