Skip to content

Commit

Permalink
Merge pull request #1213 from geoadmin/bug-PB-1361-report-problem-sel…
Browse files Browse the repository at this point in the history
…ected-category-not-translated

PB-1361 : report a problem category dropdown value wasn't translated
  • Loading branch information
pakb authored Jan 20, 2025
2 parents 205b23a + 65fb751 commit 4a133e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/modules/menu/components/help/ReportProblemButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ function selectItem(dropdownItem) {
</div>
<DropdownButton
label="feedback_description"
:title="feedback.category ?? 'select_category'"
:title="
feedback.category ? `feedback_category_${feedback.category}` : 'select_category'
"
:current-value="feedback.category"
:items="feedbackCategories"
data-cy="report-problem-category"
Expand Down
2 changes: 2 additions & 0 deletions tests/cypress/tests-e2e/reportProblem.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe('Testing the report problem form', () => {
openForm()
cy.get('@categoryDropdown').click()
cy.get('@categoryOther').click()
cy.get('@categoryDropdown').should('contain.text', 'Other')
cy.get('@textArea').type(text)
cy.get('@emailInput').type('this.is.not.a.valid@email')
cy.get('@submit').click()
Expand Down Expand Up @@ -143,6 +144,7 @@ describe('Testing the report problem form', () => {
})
cy.get('@categoryDropdown').click()
cy.get('[data-cy="dropdown-item-thematic_map"]:visible').click()
cy.get('@categoryDropdown').should('contain.text', 'A thematic map layer')
cy.get('@emailInput').type(validEmail)
cy.get('@textArea').type(text)
cy.get('@submit').scrollIntoView()
Expand Down

0 comments on commit 4a133e2

Please sign in to comment.