Skip to content

OBPIH-6953 Add test to receive into bin with zone assigned#44

Merged
awalkowiak merged 10 commits intomainfrom
OBPIH-6953
Feb 5, 2025
Merged

OBPIH-6953 Add test to receive into bin with zone assigned#44
awalkowiak merged 10 commits intomainfrom
OBPIH-6953

Conversation

@kkrawczyk123
Copy link
Collaborator

Add test to receive into bin with zone assigned

@kkrawczyk123 kkrawczyk123 changed the title OBPIH-6953 OBPIH-6953 Add test to receive into bin with zone assigned Feb 3, 2025
import BasePageModel from '@/pages/BasePageModel';

class AddZoneLocationDialog extends BasePageModel {
get zoneLocationNameField() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's add a TextField property for this instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you are using template string here already, please move the consts into it

@awalkowiak awalkowiak merged commit 838a04a into main Feb 5, 2025
1 check passed
@awalkowiak awalkowiak deleted the OBPIH-6953 branch February 5, 2025 13:23
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