Skip to content

Commit

Permalink
fix(mon-pix): leverage urlService for giving the right support home U…
Browse files Browse the repository at this point in the history
…RL in password-reset-demand-form
  • Loading branch information
lego-technix committed Jan 10, 2025
1 parent 206b0d4 commit a38a216
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import PasswordResetDemandReceivedInfo from './password-reset-demand-received-in
export default class PasswordResetDemandForm extends Component {
@service errors;
@service requestManager;
@service url;

@tracked globalError = this.errors.hasErrors && this.errors.shift();
@tracked isLoading = false;
Expand Down Expand Up @@ -114,7 +115,7 @@ export default class PasswordResetDemandForm extends Component {
<section class="authentication-password-reset-demand-form__help">
<h2>
{{t "components.authentication.password-reset-demand-form.no-email-question"}}</h2>
<a href="{{t 'components.authentication.password-reset-demand-form.contact-us-link.link-url'}}">
<a href="{{this.url.supportHomeUrl}}">
{{t "components.authentication.password-reset-demand-form.contact-us-link.link-text"}}
</a>
</section>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { fillByLabel, render } from '@1024pix/ember-testing-library';
import Service from '@ember/service';
import { click } from '@ember/test-helpers';
import { setLocale, t } from 'ember-intl/test-support';
import PasswordResetDemandForm from 'mon-pix/components/authentication/password-reset-demand/password-reset-demand-form';
Expand Down Expand Up @@ -30,6 +31,17 @@ module('Integration | Component | Authentication | PasswordResetDemand | passwor

test('it displays all elements of component successfully', async function (assert) {
// given
class CurrentDomainServiceStub extends Service {
get isFranceDomain() {
return true;
}

getExtension() {
return '.fr';
}
}
this.owner.register('service:currentDomain', CurrentDomainServiceStub);

const screen = await render(<template><PasswordResetDemandForm /></template>);

// then
Expand Down
3 changes: 1 addition & 2 deletions mon-pix/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@
"receive-reset-button": "Receive a reset link"
},
"contact-us-link": {
"link-text": "Contact us",
"link-url": "https://pix.org/en/support"
"link-text": "Contact us"
},
"fields": {
"email": {
Expand Down
3 changes: 1 addition & 2 deletions mon-pix/translations/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@
"receive-reset-button": "Reiniciar contraseña"
},
"contact-us-link": {
"link-text": "Contáctanos.",
"link-url": "https://pix.fr/support"
"link-text": "Contáctanos."
},
"fields": {
"email": {
Expand Down
3 changes: 1 addition & 2 deletions mon-pix/translations/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,7 @@
"receive-reset-button": "Recevoir un lien de réinitialisation"
},
"contact-us-link": {
"link-text": "Contactez-nous",
"link-url": "https://pix.fr/support"
"link-text": "Contactez-nous"
},
"fields": {
"email": {
Expand Down
3 changes: 1 addition & 2 deletions mon-pix/translations/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@
"receive-reset-button": "Een reset-link ontvangen"
},
"contact-us-link": {
"link-text": "Contacteer ons",
"link-url": "https://pix.fr/support"
"link-text": "Contacteer ons"
},
"fields": {
"email": {
Expand Down

0 comments on commit a38a216

Please sign in to comment.