OBPIH-6953 Add test to receive into bin with zone assigned#44
OBPIH-6953 Add test to receive into bin with zone assigned#44awalkowiak merged 10 commits intomainfrom
Conversation
395d1fc to
b1145ab
Compare
| import BasePageModel from '@/pages/BasePageModel'; | ||
|
|
||
| class AddZoneLocationDialog extends BasePageModel { | ||
| get zoneLocationNameField() { |
There was a problem hiding this comment.
Let's add a TextField property for this instead.
There was a problem hiding this comment.
`get textbox() {
return this.field.getByRole('textbox');
}`
get field() {
return this.root.locator(
`div[data-testid="form-field"][aria-label="${this.fieldName}"]`
);
}
We can't use TextField here as this field doesn't have data-testid and aria-label.
| ).toBeVisible(); | ||
| await locationListPage.getLocationEditButton(mainLocation.name).click(); | ||
| await createLocationPage.binLocationTab.click(); | ||
| await page.waitForTimeout(1000); |
There was a problem hiding this comment.
Please add a comment explaining why this is here. Otherwise, if it is not required, then remove (same for the timeouts below). Perhaps if we are waiting for something to load here eitherway - in the next line, then there would be an option to change and try to wait for another element to load first instead of adding this timeout?)
There was a problem hiding this comment.
I've changed the usage of timeouts.
|
|
||
| await test.step('Assert zone and bin on check page and finish receipt of item', async () => { | ||
| await receivingPage.checkStep.isLoaded(); | ||
| const zoneAndBin = zoneLocationName + `: ` + binLocationName; |
There was a problem hiding this comment.
Since you are using template string here already, please move the consts into it
Add test to receive into bin with zone assigned