Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

B21576 int add order types for sc too #14446

Open
wants to merge 22 commits into
base: integrationTesting
Choose a base branch
from

Conversation

JamesHawks224
Copy link
Contributor

@JamesHawks224 JamesHawks224 commented Dec 19, 2024

Agility ticket

B21576

Summary

In B21575, 2 new order types were added for the customer: Student Travel, Early Return of Dependents. B21576 adds these new order types for SC and TOO. When the SC or TOO edits orders, they will be able to select the new order types and "has dependents" will update to "yes" on the backend. In addition, the new order types will display in the "Orders" section of the "Move Details Page" for the SC or TOO. And, finally, when SC creates a move, the "Orders" page will behave exactly like the customer version of this page.

How to test

In the .envrc.local file, add the following to turn on the feature flag:
export FEATURE_FLAG_ENABLE_ALASKA=true
restart server and client

=====
Create a move with a HHG shipment and submit it.

  • Login as customer
  • On the Orders page,
    • Set order type to: permanent change of station
    • Set has dependents to: no.
  • Note the move code.
  • Keep the customer page open. The orders section will be viewed to confirm changes.
  • Open a browser window as SC
  • Open a browser window as TOO

=====
Test: SC: edit orders, Student Travel

  • Login as SC
  • Open the move that was just created
  • Order type: Student Travel
    • Edit the orders
    • Select order type Student Travel
    • Save changes
    • In the "Orders" section, verify "Orders Type" is "Student Travel"
    • On the customer page,
      • Go to the "Orders" section: move main page > review your request > orders
      • Verify
        • Orders type is "Student Travel"
        • Dependents is "Yes"
      • Reset Orders
        • Edit orders
          • Set "Orders type" to "permanent change of station"
          • Set "dependents" to "no"
      • Click button "return home"
    • On TOO page
      • Open the move using search and the move code
      • Go to the "Move Details" tab
      • Confirm "orders type" is "Student Travel" in the Orders section.
      • Close the move

=====
Test: SC: edit orders, Early Return of Dependents

  • Login as SC
  • Open the move that was just created
  • Order type: Early Return of Dependents
    • Edit the orders
    • Select order type Early Return of Dependents
    • Save changes
    • In the "Orders" section, verify "Orders Type" is "Early Return of Dependents"
    • On the customer page,
      • Go to the "Orders" section: move main page > review your request > orders
      • Verify
        • Orders type is "Early Return of Dependents"
        • Dependents is "Yes"
      • Reset Orders
        • Edit orders
          • Set "Orders type" to "permanent change of station"
          • Set "dependents" to "no"
      • Click button "return home"
    • On TOO page
      • Open the move using search and the move code
      • Go to the "Move Details" tab
      • Confirm "orders type" is "Early Return of Dependents" in the Orders section.
      • Close the move

=====
Test: SC: edit orders, Select neither Early Return of Dependents nor Student Travel

  • Login as SC
  • Open the move that was just created
  • Order type: Local move
    • Edit the orders
    • Select order type Local move
    • Save changes
    • In the "Orders" section, verify "Orders Type" is "Local move"
    • On the customer page,
      • Go to the "Orders" section: move main page > review your request > orders
      • Verify
        • Orders type is "Local move"
        • Dependents is "No"
      • Reset Orders
        • Edit orders
          • Set "Orders type" to "permanent change of station"
          • Set "dependents" to "no"
      • Click button "return home"
    • On TOO page
      • Open the move using search and the move code
      • Go to the "Move Details" tab
      • Confirm "orders type" is "Local move" in the Orders section.
      • Close the move

=====
Test: SC: create move

  • login as SC
  • search for customer using name "Spaceman".
  • select a customer and click "create move".
  • at the move orders page
    • set initial values all fields:
      • order type: Permanent Change of Station
      • remaining fields: any value is fine
  • verification
    • verify: order type, changing existing type to another existing type
      • change order type to local move
      • verify no fields are changed
    • verify: order type, changing existing type to new type (student travel)
      • change order type to student travel
      • verify "are dependents included" defaults to "yes"
      • verify "are dependents included" is disabled
    • verify: order type, changing new type (student travel) to existing type
      • change order type to permanent change of station
      • verify "are dependents included" defaults to no selection
      • verify "are dependents included" is enabled
    • verify: order type, changing existing type to new type (early return of dependents)
      • change order type to student travel
      • verify "are dependents included" defaults to "yes"
      • verify "are dependents included" is disabled
    • verify: order type, changing new type (early return of dependents) to existing type
      • change order type to permanent change of station
      • verify "are dependents included" defaults to no selection
      • verify "are dependents included" is enabled
    • verify: order type, changing new type (early return of dependents) to to new type (student travel)
      • change order type to early return of dependents
      • verify "are dependents included" defaults to "yes"
      • verify "are dependents included" is disabled
      • change order type to student travel
      • verify "are dependents included" defaults to "yes"
      • verify "are dependents included" is disabled

=====
Test: turn off feature flag
In the .envrc.local file, add the following to turn on the feature flag:
export FEATURE_FLAG_ENABLE_ALASKA=false
restart server and client

  • SC, Create a move: On the orders page, verify neither Student Travel or Early Return of Dependents shows up in the drop down list
  • SC, Edit orders: On the orders page, verify neither Student Travel or Early Return of Dependents shows up in the drop down list

ANDI Screenshots

SC: move, edit orders
image

SC: move, orders section
image

TOO: move, orders section
image

SC: create move
image

@JamesHawks224 JamesHawks224 added ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing labels Dec 24, 2024
@JamesHawks224 JamesHawks224 marked this pull request as ready for review December 30, 2024 20:37
@JamesHawks224 JamesHawks224 requested review from a team as code owners December 30, 2024 20:37
Copy link
Contributor

@taeJungCaci taeJungCaci left a comment

Choose a reason for hiding this comment

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

I also see a client test failing that maybe be related to your changes

Comment on lines +311 to +312
await userEvent.selectOptions(screen.getByLabelText('Orders type'), ORDERS_TYPE.STUDENT_TRAVEL);

Copy link
Contributor

Choose a reason for hiding this comment

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

I think you may be missing the checks to see if the radio buttons are checked and disabled.
I think this would be needed to test if the buttons were disabled and then re-enabled.

await userEvent.selectOptions(screen.getByLabelText('Orders type'), ORDERS_TYPE.STUDENT_TRAVEL);
const hasDependentsYes = screen.getByLabelText('Yes');
const hasDependentsNo = screen.getByLabelText('No');

await waitFor(() => {
  expect(hasDependentsYes).toBeChecked();
  expect(hasDependentsYes).toBeDisabled();
  expect(hasDependentsNo).toBeDisabled();
});

Comment on lines +349 to +350
await userEvent.selectOptions(screen.getByLabelText('Orders type'), ORDERS_TYPE.EARLY_RETURN_OF_DEPENDENTS);

Copy link
Contributor

Choose a reason for hiding this comment

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

Same missing checks here

@taeJungCaci
Copy link
Contributor

Also noting the concern here that edit orders page doesn't have an option to choose "has dependent" for office users. This means if SC choosesStudent Travel and then saves -> then goes back and chooses a different orders type -> the has_dependent will remain true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ByteSize M&Ms Team ByteSized M&Ms INTEGRATION Slated for Integration Testing
Development

Successfully merging this pull request may close these issues.

2 participants