Skip to content

release-20250409#381

Merged
marcbon merged 74 commits intomainfrom
develop
Apr 9, 2025
Merged

release-20250409#381
marcbon merged 74 commits intomainfrom
develop

Conversation

@marcbon
Copy link
Copy Markdown
Contributor

@marcbon marcbon commented Apr 9, 2025

No description provided.

sinatragianpaolo and others added 30 commits March 5, 2025 10:21
UN-769 - 🚀 Add skipPagesAndTasks Option to /dossiers Route & New Test ✅
… on template quotation. set quotation status to 'proposed' if is plan is based on a quoted template else set to 'pending'
refactor: move logic for campaign pages handling to ManualPageImporte…
…ions for notes and quotation

fix(schema): make quote field optional in request body schema
…ce and status based on template and user input
sinatragianpaolo and others added 26 commits March 18, 2025 12:20
add patch operation for updating quotations in campaign
fix(quotations): prevent updates to rejected quotations and improve error handling
fix(quotations): simplify plan quoted check by using quote_id from data
* feat(api): add endpoint for retrieving quotes history by campaign

* feat(api): add phase_id to campaign and quote objects in OpenAPI schema

* feat(api): make quote properties required in OpenAPI schema and TypeScript interface

* test(api): add unit tests for quotes history retrieval endpoint

* feat(api): add phase_name property to campaign and quote objects in OpenAPI schema

* feat(api): implement quotes history retrieval for campaign with detailed response structure

* refactor(api): rename plan_id to generated_from_plan in quotes history retrieval

* test(api): update quotes history retrieval tests with consistent data structure

* chore(ci): update Node.js version from 14 to 18 in workflow configuration


---------

Co-authored-by: Davide Bizzi <davide.bizzi@unguess.io>
fix(workflow): update Node.js version to 18 in add-test-diff.yml
…T-quotes

fix(quotations): update plan structure to include price and adjust related logic
refactor(quotations): switch from UserRoute to CampaignRoute and update access checks for campaign validity
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 9, 2025

Tests difference:

New Tests

< Case: plan from quoted template - Should create quotation if send empty object
< Case: plan from quoted template - Should create quotation with correct price if send a different quote
< Case: plan from quoted template - Should create quotation with notes if send notes
< Case: plan from quoted template - Should create quotation with price from template if send empty object
< Case: plan from quoted template - Should create quotation with status pending if send a same quote
< Case: plan from quoted template - Should create quotation with status pending if send empty object
< Case: plan from quoted template - Should create quotation with status proposed if send a different quote
< Case: plan from quoted template - Should return 201 if send empty object
< Case: plan from unquoted template - Should create quotation with correct price if send a quote
< Case: plan from unquoted template - Should create quotation with notes if send notes
< Case: plan from unquoted template - Should create quotation with status proposed if send a quote
< Case: plan from unquoted template - Should not create quotation if send empty object
< Case: plan from unquoted template - Should return an error if send empty object
< Case: quotation already exist - Should insert a quotaion if plan quotation rejected already exist
< Case: quotation already exist - Should not insert a quotaion if plan quotation not rejected already exist
< Case: quotation already exist - Should return an error if the quotation already exist
< Errors - Should answer 400 if campaign does not exists
< Errors - Should answer 401 if not admin
< Errors - Should answer 403 if not logged in
< Errors - Should answer 404 if quote does not exists
< Errors - Should answer 404 if quote is approved
< Errors - Should answer 404 if quote is of another campaign
< Filter campaigns for quotation-table on dossier - Should return only campaigns having a quotation of a specific customer
< GET /campaigns - Should retrun campaigns id,quote if fields is set with id,quote
< GET /campaigns - Should return only campaigns having a quotation if filterBy is set
< GET history dossier quotes - Should answer 200
< GET history dossier quotes - Should return array of items
< GET history dossier quotes - Should return items with campaignData
< GET history dossier quotes - Should return items with quoteData
< PATCH a pending quotation - Should answer 200
< PATCH a pending quotation - Should campaign phase to confirmed if send same amount of current quotation
< PATCH a pending quotation - Should update amount if send different amount of current quotation
< PATCH a pending quotation - Should update plan status to approved if send same amount of current quotation
< PATCH a pending quotation - Should update status to approved if send empty body
< PATCH a pending quotation - Should update status to approved if send same amount of current quotation
< PATCH a pending quotation - Should update status to proposed if send different amount of current quotation
< PATCH a proposed quotation - Should answer 200
< PATCH a proposed quotation - Should not update status if send different amount of current quotation
< PATCH a proposed quotation - Should return an error if send empty body on a proposed quote
< PATCH a proposed quotation - Should update amount if send different amount of current quotation
< PATCH a refused quotation - Should answer 403
< Quote creation - Should answer 201 if user is admin
< Quote creation - Should insert correct quote
< Quote creation - Should insert the applicant id
< Quote creation - Should insert the the note if send it
< Quote creation - Should return correct quote id
< Quote creation - Should return the quotation id
< Route GET /dossiers/:campaignId/quotesHistory - Should answer 400 if campaign does not exists
< Route GET /dossiers/:campaignId/quotesHistory - Should answer 401 if not admin
< Route GET /dossiers/:campaignId/quotesHistory - Should answer 403 if not logged in
< Route POST /dossiers - duplication - Should not call WordpressJsonApiTrigger if send skiPagesAndTasks = 1
< Route POST /dossiers/:campaignId/quotations - Should answer 401 if not admin
< Route POST /dossiers/:campaignId/quotations - Should answer 403 if not logged in
< Route POST /dossiers/:campaignId/quotations - Should answer 404 if campaign does not exists
< Route POST /dossiers/:campaignId/quotations - Should answer 404 if plan does not exists
< Route POST /dossiers/:id/manual - Should create a new manual post
< Route POST /dossiers/:id/manual - Should keep all the meta except man_campaign_id
< Route POST /dossiers/:id/manual - Should link the new manual to the campaign
< Route POST /dossiers/:id/manual - Should return 200 if has access to the campaign
< Route POST /dossiers/:id/manual - Should return 200 if logged in as admin
< Route POST /dossiers/:id/manual - Should return 403 if campaign does not exists
< Route POST /dossiers/:id/manual - Should return 403 if logged in as tester
< Route POST /dossiers/:id/manual - Should return 403 if not logged in
< Route POST /dossiers/:id/manual - Should update meta man_campaign_id with new campaign id
< Route POST /dossiers/:id/manual - Should update post title with new campaign id
< Route PUT /dossiers/:id/phases - Should create a new preview post
< Route PUT /dossiers/:id/phases - Should keep all the meta except preview_campaign_id
< Route PUT /dossiers/:id/phases - Should link the new preview to the campaign
< Route PUT /dossiers/:id/phases - Should return 200 if has access to the campaign
< Route PUT /dossiers/:id/phases - Should return 200 if logged in as admin
< Route PUT /dossiers/:id/phases - Should return 403 if campaign does not exists
< Route PUT /dossiers/:id/phases - Should return 403 if logged in as tester
< Route PUT /dossiers/:id/phases - Should return 403 if not logged in
< Route PUT /dossiers/:id/phases - Should update meta preview_campaign_id with new campaign id
< Route PUT /dossiers/:id/phases - Should update post title with new campaign id

@Kariamos Kariamos marked this pull request as ready for review April 9, 2025 07:41
@marcbon marcbon merged commit 05e65d7 into main Apr 9, 2025
5 of 6 checks passed
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.

5 participants