File tree Expand file tree Collapse file tree 3 files changed +30
-2
lines changed
integration_test/scenarios/calendar
lib/features/email/domain/model
test/features/email/presentation Expand file tree Collapse file tree 3 files changed +30
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ class MailToAttendeesEventEmailScenario extends BaseTestScenario
1717 with OpenCalendarEventScenarioMixin {
1818 const MailToAttendeesEventEmailScenario (super .$);
1919
20+ static const _expectedEventTitle = 'Come for a chat' ;
21+
2022 @override
2123 Future <void > runTestLogic () async {
2224 final threadRobot = ThreadRobot ($);
@@ -51,7 +53,7 @@ class MailToAttendeesEventEmailScenario extends BaseTestScenario
5153 final actualSubject = composerController.subjectEmail.value ?? '' ;
5254
5355 final expectedSubject = EmailUtils .applyPrefix (
54- subject: 'Come for a chat' ,
56+ subject: _expectedEventTitle ,
5557 defaultPrefix: EmailUtils .defaultReplyPrefix,
5658 localizedPrefix: appLocalizations.prefix_reply_email,
5759 );
Original file line number Diff line number Diff line change @@ -24,7 +24,20 @@ enum EventActionType {
2424 }
2525 }
2626
27- Key getKeyButton () => Key ('${name }_event_action_button' );
27+ Key getKeyButton () {
28+ switch (this ) {
29+ case EventActionType .yes:
30+ return const Key ('yes_event_action_button' );
31+ case EventActionType .acceptCounter:
32+ return const Key ('acceptCounter_event_action_button' );
33+ case EventActionType .maybe:
34+ return const Key ('maybe_event_action_button' );
35+ case EventActionType .no:
36+ return const Key ('no_event_action_button' );
37+ case EventActionType .mailToAttendees:
38+ return const Key ('mailToAttendees_event_action_button' );
39+ }
40+ }
2841
2942 String getToastMessageSuccess (BuildContext context) {
3043 switch (this ) {
Original file line number Diff line number Diff line change @@ -184,6 +184,19 @@ void main() {
184184 equals (' Re: Hello' ),
185185 );
186186 });
187+
188+ test (
189+ 'should add a standardized prefix for a legacy NBSP variant' ,
190+ () {
191+ expect (
192+ EmailUtils .applyPrefix (
193+ subject: 'Re\u 00A0: Hello' ,
194+ defaultPrefix: EmailUtils .defaultReplyPrefix,
195+ ),
196+ equals ('Re: Re\u 00A0: Hello' ),
197+ );
198+ },
199+ );
187200 });
188201 });
189202}
You can’t perform that action at this time.
0 commit comments