File tree 4 files changed +17
-26
lines changed
tests/integration/components
4 files changed +17
-26
lines changed Original file line number Diff line number Diff line change 49
49
<p class =" attestation__error-message" >{{ this.attestationDownloadErrorMessage }} </p >
50
50
{{ /if }}
51
51
</div >
52
- <hr />
53
52
<div class =" verification-code" >
54
53
<h2 class =" verification-code__title" >
55
54
{{ t " pages.certificate.verification-code.title" }}
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ export default class UserCertificationsDetailHeader extends Component {
34
34
const token = this . session . data . authenticated . access_token ;
35
35
try {
36
36
await this . fileSaver . save ( { url, token } ) ;
37
- } catch ( error ) {
38
- this . attestationDownloadErrorMessage = error . message ;
37
+ } catch ( _ ) {
38
+ this . attestationDownloadErrorMessage = this . intl . t ( 'common.error' ) ;
39
39
}
40
40
}
41
41
}
Original file line number Diff line number Diff line change 72
72
}
73
73
74
74
.attestation-and-verification-code {
75
- padding : 16px 20px ;
75
+ max-width : 100% ;
76
+ padding : var (--pix-spacing-4x ) var (--pix-spacing-6x );
76
77
background-color : var (--pix-neutral-20 );
77
78
border-radius : 8px ;
78
79
80
+ @include device-is (' desktop' ) {
81
+ max-width : calc (var (--pix-spacing-12x ) * 6 );
82
+ }
83
+
79
84
.attestation {
80
- margin : auto ;
81
- font-size : 0.875rem ;
85
+ display : flex ;
86
+ flex-direction : column ;
87
+ align-items : center ;
88
+ margin-bottom : var (--pix-spacing-6x );
82
89
text-align : center ;
83
90
84
- button {
85
- max-width : 250px ;
86
- padding : 14px 20px ;
87
- }
88
-
89
91
& __error-message {
90
- max-width : 250px ;
91
- margin-top : 15px ;
92
+ @extend %pix-body-s ;
93
+
94
+ margin-top : var (--pix-spacing-4x );
92
95
color : var (--pix-error-500 );
93
96
}
94
97
}
95
98
96
- hr {
97
- margin : 24px 0 ;
98
- border : 1px solid var (--pix-neutral-20 );
99
- }
100
-
101
99
.verification-code {
102
- max-width : 250px ;
103
100
margin : auto ;
104
101
color : var (--pix-neutral-900 );
105
102
letter-spacing : 0 ;
157
154
@include device-is (' desktop' ) {
158
155
flex-grow : 0 ;
159
156
margin-left : auto ;
160
-
161
- .verification-code ,
162
- .attestation {
163
- margin : 0 ;
164
- }
165
157
}
166
158
}
Original file line number Diff line number Diff line change @@ -330,7 +330,7 @@ module('Integration | Component | user certifications detail header', function (
330
330
} ) ;
331
331
332
332
module ( 'when there is an error during the download of the attestation' , function ( ) {
333
- test ( 'should show the error message' , async function ( assert ) {
333
+ test ( 'should show the common error message' , async function ( assert ) {
334
334
// given
335
335
const fileSaverSaveStub = sinon . stub ( ) ;
336
336
@@ -366,7 +366,7 @@ module('Integration | Component | user certifications detail header', function (
366
366
await click ( screen . getByRole ( 'button' , { name : 'Télécharger mon attestation' } ) ) ;
367
367
368
368
// then
369
- assert . ok ( screen . getByText ( 'an error message ' ) ) ;
369
+ assert . ok ( screen . getByText ( 'Une erreur est survenue. Veuillez recommencer ou contacter le support. ' ) ) ;
370
370
} ) ;
371
371
} ) ;
372
372
} ) ;
You can’t perform that action at this time.
0 commit comments