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

Sales Order Shipment Search #8992

Merged
merged 3 commits into from
Feb 3, 2025

Conversation

fuzeman
Copy link
Contributor

@fuzeman fuzeman commented Jan 29, 2025

Fixes searching in the sales order shipment template editor preview and enables searching from the search drawer. I think this will be very helpful when you need to find shipments by invoice or tracking number.

Copy link

netlify bot commented Jan 29, 2025

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 5c7273d
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/67a0a9b9cf87e600080a58f7
😎 Deploy Preview https://deploy-preview-8992--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 95 (no change from production)
Accessibility: 89 (no change from production)
Best Practices: 100 (no change from production)
SEO: 78 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.47%. Comparing base (d363c40) to head (5c7273d).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8992      +/-   ##
==========================================
- Coverage   85.50%   85.47%   -0.04%     
==========================================
  Files        1176     1176              
  Lines       52012    52081      +69     
  Branches     2114     2113       -1     
==========================================
+ Hits        44473    44515      +42     
- Misses       7009     7032      +23     
- Partials      530      534       +4     
Flag Coverage Δ
backend 87.37% <100.00%> (+<0.01%) ⬆️
pui 69.11% <100.00%> (+0.26%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@matmair matmair left a comment

Choose a reason for hiding this comment

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

Looking good, thanks @fuzeman

@SchrodingersGat
Copy link
Member

This looks nice! I would suggest that you add a playwright test for this, which would act as an end-to-end test for the new API features and UI integration.

@fuzeman
Copy link
Contributor Author

fuzeman commented Jan 31, 2025

This looks nice! I would suggest that you add a playwright test for this, which would act as an end-to-end test for the new API features and UI integration.

I haven't had much luck getting frontend tests running locally and will need to revisit this tomorrow.

Not sure how the development environment should be set up for testing as it appears that the frontend tests need to be run outside the dev container or playwright will fail to launch. Proceeding to install frontend dependencies and playwright outside the dev container will allow for the playwright UI to be opened, but running tests presents a bunch of timeout errors and stalled tests trying to load pages. Am I missing something here?

@fuzeman fuzeman force-pushed the shipment-search branch 2 times, most recently from 210872e to d4c0c99 Compare January 31, 2025 23:14
@fuzeman
Copy link
Contributor Author

fuzeman commented Jan 31, 2025

I've added tests for search by tracking number and invoice number to Sales Orders - Shipments, let me know if that's what you were thinking.


I finally got tests running, but discovered the first page.goto was kicking back to the login screen and causing the tests to stall and timeout. For example, the following line must be removed for the test to complete:

await page.goto(`${baseUrl}/home`);

I haven't included any changes in regards to this issue, guessing something is still partially broken in my development environment.

@SchrodingersGat
Copy link
Member

@fuzeman please merge in master once #8985 is accepted - and then use the navigate(page, url) helper func instead

@fuzeman
Copy link
Contributor Author

fuzeman commented Feb 1, 2025

@SchrodingersGat I've rebased on master.


I tracked down my issue running frontend tests was due to cookies being blocked as samesite: none was set in my config.yaml. I see this was previously the default which was later fixed in 914f59c

I've found tests appear to be a bit unreliable though - timing out sometimes, and passing other times. Looks like it just stalls during page navigation for some reason.

@SchrodingersGat
Copy link
Member

@fuzeman yes there are some race conditions due to the tests running in parallel - I am trying to clean it up and get them running more reliably. The more tests we add, the worse the problem is becoming!

@SchrodingersGat SchrodingersGat merged commit 138aa01 into inventree:master Feb 3, 2025
27 checks passed
@SchrodingersGat
Copy link
Member

@fuzeman thanks for the addition!

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.

3 participants