Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.47k stars 2.82k forks source link

[CRITICAL] QA - Add Travel test to TestRail #48921

Open kevinksullivan opened 1 month ago

kevinksullivan commented 1 month ago

Problem

We have a sandbox environment we can point accounts to in order to test travel booking (SO), but we've had issues getting all of the data from these transactions. That is a pretty broad statement though, and if we don't use the sandbox environment we pay a $15 fee every test booking we make in production.

Solution

Tests:

In OldDot Expensify: Provisioning a company, account, and company

  1. Create a new account
  2. Create a control workspace
  3. Open the console: Command + option + j
  4. Paste NVP.set('travelSettings', {'testAccount': true});
  5. Go to Settings -> Account
  6. Set a first and last name
  7. Go to Travel in the LHN
  8. Click the button
  9. Check the checkbox
  10. Enter an address
  11. Click confirm and wait
  12. Ensure you are brought to Spotnana

Inside of Spotnana:

  1. Search for a new flight
  2. One way from SEA to SFO
  3. Alaska airlines
  4. At least 1 month in the future
  5. Select the flight
  6. Make sure that your name was properly imported from Expensify in the "Traveler Details"
  7. Add the other required information and click save at the top of the panel
  8. Click "next" on the right side
  9. Click "select a trip" and create a new trip
  10. Add the stripe test card ending in 4444
  11. Book the trip
  12. Wait until you receive an email confirming your trip
  13. Back inside of Expensify:

Check in the Expenses tab and make sure there are 2 expenses

  1. One for $15
  2. One for the price of your flight
  3. Ensure there is a receipt attached to both expenses

Testing changing your default workspace:

  1. Create a new account on the beta
  2. Create a control workspace1
  3. Enable the workspace for travel and make sure you are logged into Spotnana
  4. Create a second control workspace2 (a different name is required)
  5. Enable the workspace for travel and make sure you are logged into Spotnana
  6. Switch your default workspace to workspace1
  7. Click the travel button and make sure you are logged into Spotnana
stitesExpensify commented 1 month ago

Added some logs today to see if my hunch is correct. Based on these logs it looks like we were sent the event, but when trying to get the user's info we got user_not_found. This to me indicates that we are trying to find the user on the production spotnana server instead of the sandbox

stitesExpensify commented 1 month ago

I ended up finding the problem before the logs were deployed! I CP'd it and we are not getting fares via the sandbox again. We are still not getting fees for some reason. My guess is because the amount is $0 on the sandbox?

stitesExpensify commented 1 month ago

Posted here to find out why we aren't getting fees https://expensify.slack.com/archives/C066REXJ9D3/p1726171051522029

melvin-bot[bot] commented 3 weeks ago

@kevinksullivan, @stitesExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

stitesExpensify commented 3 weeks ago

Waiting for Spotnana to respond here https://expensify.slack.com/archives/C066REXJ9D3/p1726171051522029

stitesExpensify commented 3 weeks ago

Waiting on a response, will bring it up in our meeting today

stitesExpensify commented 3 weeks ago

We're good! We can start testing the non-credit card case in staging now!

melvin-bot[bot] commented 2 weeks ago

@kevinksullivan, @stitesExpensify Eep! 4 days overdue now. Issues have feelings too...

stitesExpensify commented 2 weeks ago

Writing a SO / testrail tomorrow morning

stitesExpensify commented 2 weeks ago

In OldDot Expensify: Provisioning a company, account, and company

  1. Create a new account
  2. Create a control workspace
  3. Open the console: Command + option + j
  4. Paste NVP.set('travelSettings', {'testAccount': true});
  5. Go to Settings -> Account
  6. Set a first and last name
  7. Go to Travel in the LHN
  8. Click the button
  9. Check the checkbox
  10. Enter an address
  11. Click confirm and wait
  12. Ensure you are brought to Spotnana

Inside of Spotnana:

  1. Search for a new flight
    • One way from SEA to SFO
    • Alaska airlines
    • At least 1 month in the future
  2. Select the flight
  3. Make sure that your name was properly imported from Expensify in the "Traveler Details"
  4. Add the other required information and click save at the top of the panel
  5. Click "next" on the right side
  6. Click "select a trip" and create a new trip
  7. Add the stripe test card ending in 4444
  8. Book the trip
  9. Wait until you receive an email confirming your trip

Back inside of Expensify:

  1. Check in the Expenses tab and make sure there are 2 expenses
    • One for $15
    • One for the price of your flight
    • Ensure there is a receipt attached to both expenses
melvin-bot[bot] commented 1 week ago

@stitesExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

stitesExpensify commented 1 week ago

Another test case:

Testing changing your default workspace:

  1. Create a new account on the beta
  2. Create a control workspace1
  3. Enable the workspace for travel and make sure you are logged into Spotnana
  4. Create a second control workspace2
  5. Enable the workspace for travel and make sure you are logged into Spotnana
  6. Switch your default workspace to workspace1
  7. Click the travel button and make sure you are logged into Spotnana
stitesExpensify commented 1 week ago

SO is here https://stackoverflowteams.com/c/expensify/questions/20166/20167#20167

stitesExpensify commented 1 week ago

@kavimuru @isagoico can we get these added to testrail please? :)

isagoico commented 6 days ago

Will get these added this week (will aim for tomorrow so it's tested in the next regression run.

stitesExpensify commented 6 days ago

Awesome, thanks!

isagoico commented 5 days ago

@stitesExpensify The following Test Cases have been created in the OldDot regression suite:

All travel test cases for OD can be found on this folder. image

Will leave this issue open for a review of the TCs to have a 👍 that everything is good.