Skip to content

Commit 02e2298

Browse files
authored
feature: dart 3.29 code re-formatting (#723)
1 parent 6fcecff commit 02e2298

811 files changed

Lines changed: 42667 additions & 40910 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

analysis_options.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,5 @@ analyzer:
99
- "**/*.g.dart"
1010
- "build/**"
1111

12+
formatter:
13+
page_width: 120

integration_test/call_and_recent_test.dart

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -20,41 +20,38 @@ main() {
2020
const callNumber = IntegrationTestEnvironmentConfig.CALL_NUMBER_A;
2121
const crossCallSleep = Duration(seconds: IntegrationTestEnvironmentConfig.CROSS_CALL_SLEEP_SECONDS);
2222

23-
patrolTest(
24-
'Should make simple call and verify recents',
25-
($) async {
26-
await bootstrap();
27-
await pumpRootAndWaitUntilVisible($);
28-
29-
// Login if not.
30-
if ($(LoginModeSelectScreen).visible) {
31-
await loginByMethod($, defaultLoginMethod);
32-
// Wait some time for components loading and session establishment.
33-
await pumpFor(const Duration(seconds: 5), $);
34-
}
35-
36-
// Make a call and check if it is active.
37-
await $(MainFlavor.keypad.toNavBarKey()).tap();
38-
await enterKeypadNumber($, callNumber);
39-
await $(actionPadStartKey).tap();
40-
await $(CallActiveScaffold).waitUntilVisible();
23+
patrolTest('Should make simple call and verify recents', ($) async {
24+
await bootstrap();
25+
await pumpRootAndWaitUntilVisible($);
26+
27+
// Login if not.
28+
if ($(LoginModeSelectScreen).visible) {
29+
await loginByMethod($, defaultLoginMethod);
30+
// Wait some time for components loading and session establishment.
4131
await pumpFor(const Duration(seconds: 5), $);
42-
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call should be active');
43-
44-
// Hangup call and check if it is done.
45-
await $(callActionsHangupKey).tap();
46-
await pumpFor(const Duration(seconds: 2), $);
47-
expect($(CallActiveScaffold).visible, false, reason: 'Call should be ended');
48-
49-
// Check if the call is in the recents list.
50-
await $(MainFlavor.recents.toNavBarKey()).tap();
51-
await $.pumpAndTrySettle();
52-
final recentNumbr = $(recentsTileKey).$(Row).$(callNumber);
53-
expect(recentNumbr, findsOneWidget, reason: 'Should contain number in recents list');
54-
final recentIcon = $(recentsTileKey).$(Row).$(Icons.call_made);
55-
expect(recentIcon, findsOneWidget, reason: 'Should contain succesfull outgoing call icon');
56-
57-
await Future.delayed(crossCallSleep);
58-
},
59-
);
32+
}
33+
34+
// Make a call and check if it is active.
35+
await $(MainFlavor.keypad.toNavBarKey()).tap();
36+
await enterKeypadNumber($, callNumber);
37+
await $(actionPadStartKey).tap();
38+
await $(CallActiveScaffold).waitUntilVisible();
39+
await pumpFor(const Duration(seconds: 5), $);
40+
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call should be active');
41+
42+
// Hangup call and check if it is done.
43+
await $(callActionsHangupKey).tap();
44+
await pumpFor(const Duration(seconds: 2), $);
45+
expect($(CallActiveScaffold).visible, false, reason: 'Call should be ended');
46+
47+
// Check if the call is in the recents list.
48+
await $(MainFlavor.recents.toNavBarKey()).tap();
49+
await $.pumpAndTrySettle();
50+
final recentNumbr = $(recentsTileKey).$(Row).$(callNumber);
51+
expect(recentNumbr, findsOneWidget, reason: 'Should contain number in recents list');
52+
final recentIcon = $(recentsTileKey).$(Row).$(Icons.call_made);
53+
expect(recentIcon, findsOneWidget, reason: 'Should contain succesfull outgoing call icon');
54+
55+
await Future.delayed(crossCallSleep);
56+
});
6057
}

integration_test/call_subfunctions_test.dart

Lines changed: 62 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -22,76 +22,75 @@ main() {
2222
const callNumber = IntegrationTestEnvironmentConfig.CALL_NUMBER_A;
2323
const crossCallSleep = Duration(seconds: IntegrationTestEnvironmentConfig.CROSS_CALL_SLEEP_SECONDS);
2424

25-
patrolTest(
26-
'Should make call and verify sub actions e.g minimize, hold, switch to video, speaker, mute etc',
27-
($) async {
28-
await bootstrap();
29-
await pumpRootAndWaitUntilVisible($);
25+
patrolTest('Should make call and verify sub actions e.g minimize, hold, switch to video, speaker, mute etc', (
26+
$,
27+
) async {
28+
await bootstrap();
29+
await pumpRootAndWaitUntilVisible($);
3030

31-
// Login if not.
32-
if ($(LoginModeSelectScreen).visible) {
33-
await loginByMethod($, defaultLoginMethod);
34-
// Wait some time for components loading and session establishment.
35-
await pumpFor(const Duration(seconds: 5), $);
36-
}
37-
38-
// Make a call and check if it is active.
39-
await $(MainFlavor.keypad.toNavBarKey()).tap();
40-
await enterKeypadNumber($, callNumber);
41-
await $(actionPadStartKey).tap();
42-
await $(CallActiveScaffold).waitUntilVisible();
31+
// Login if not.
32+
if ($(LoginModeSelectScreen).visible) {
33+
await loginByMethod($, defaultLoginMethod);
34+
// Wait some time for components loading and session establishment.
4335
await pumpFor(const Duration(seconds: 5), $);
44-
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call should be active');
36+
}
37+
38+
// Make a call and check if it is active.
39+
await $(MainFlavor.keypad.toNavBarKey()).tap();
40+
await enterKeypadNumber($, callNumber);
41+
await $(actionPadStartKey).tap();
42+
await $(CallActiveScaffold).waitUntilVisible();
43+
await pumpFor(const Duration(seconds: 5), $);
44+
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call should be active');
4545

46-
// Minimize call and check if it is minimized.
47-
await $.native.pressBack();
48-
await pumpFor(const Duration(seconds: 1), $);
49-
expect($(CallActiveScaffold).visible, false, reason: 'Call should be minimized');
50-
expect($(CallActiveThumbnail), findsOneWidget, reason: 'Thumbnail should be visible');
51-
await $(CallActiveThumbnail).tap();
52-
await pumpFor(const Duration(seconds: 1), $);
53-
expect($(CallActiveScaffold).visible, true, reason: 'Call should be active');
54-
expect($(CallActiveThumbnail), findsNothing, reason: 'Thumbnail should disappear');
46+
// Minimize call and check if it is minimized.
47+
await $.native.pressBack();
48+
await pumpFor(const Duration(seconds: 1), $);
49+
expect($(CallActiveScaffold).visible, false, reason: 'Call should be minimized');
50+
expect($(CallActiveThumbnail), findsOneWidget, reason: 'Thumbnail should be visible');
51+
await $(CallActiveThumbnail).tap();
52+
await pumpFor(const Duration(seconds: 1), $);
53+
expect($(CallActiveScaffold).visible, true, reason: 'Call should be active');
54+
expect($(CallActiveThumbnail), findsNothing, reason: 'Thumbnail should disappear');
5555

56-
// Check mute function
57-
await $(callActionsMuteKey).tap();
58-
await pumpFor(const Duration(seconds: 1), $);
59-
expect(find.widgetWithIcon(TextButton, Icons.mic_off), findsOneWidget, reason: 'Call should be muted');
60-
await $(callActionsMuteKey).tap();
61-
await pumpFor(const Duration(seconds: 1), $);
62-
expect(find.widgetWithIcon(TextButton, Icons.mic), findsOneWidget, reason: 'Call should be unmuted');
56+
// Check mute function
57+
await $(callActionsMuteKey).tap();
58+
await pumpFor(const Duration(seconds: 1), $);
59+
expect(find.widgetWithIcon(TextButton, Icons.mic_off), findsOneWidget, reason: 'Call should be muted');
60+
await $(callActionsMuteKey).tap();
61+
await pumpFor(const Duration(seconds: 1), $);
62+
expect(find.widgetWithIcon(TextButton, Icons.mic), findsOneWidget, reason: 'Call should be unmuted');
6363

64-
// Check speaker function
65-
await $(callActionsSpeakerKey).tap();
66-
await pumpFor(const Duration(seconds: 1), $);
67-
expect(find.widgetWithIcon(TextButton, Icons.volume_up), findsOneWidget, reason: 'Speaker should be on');
68-
await $(callActionsSpeakerKey).tap();
69-
await pumpFor(const Duration(seconds: 1), $);
70-
expect(find.widgetWithIcon(TextButton, Icons.volume_off), findsOneWidget, reason: 'Speaker should be off');
64+
// Check speaker function
65+
await $(callActionsSpeakerKey).tap();
66+
await pumpFor(const Duration(seconds: 1), $);
67+
expect(find.widgetWithIcon(TextButton, Icons.volume_up), findsOneWidget, reason: 'Speaker should be on');
68+
await $(callActionsSpeakerKey).tap();
69+
await pumpFor(const Duration(seconds: 1), $);
70+
expect(find.widgetWithIcon(TextButton, Icons.volume_off), findsOneWidget, reason: 'Speaker should be off');
7171

72-
// Check hold function
73-
await $(callActionsHoldKey).tap();
74-
await pumpFor(const Duration(seconds: 1), $);
75-
expect(find.text('On hold'), findsOneWidget, reason: 'Call should be on hold');
76-
await $(callActionsHoldKey).tap();
77-
await pumpFor(const Duration(seconds: 1), $);
78-
expect(find.textContaining('00:'), findsOneWidget, reason: 'Call should be active again');
72+
// Check hold function
73+
await $(callActionsHoldKey).tap();
74+
await pumpFor(const Duration(seconds: 1), $);
75+
expect(find.text('On hold'), findsOneWidget, reason: 'Call should be on hold');
76+
await $(callActionsHoldKey).tap();
77+
await pumpFor(const Duration(seconds: 1), $);
78+
expect(find.textContaining('00:'), findsOneWidget, reason: 'Call should be active again');
7979

80-
// Check switch to video function
81-
await $(callActionsVideoCallKey).tap();
82-
await pumpFor(const Duration(seconds: 2), $);
83-
expect($(callFrontCameraPreviewKey), findsOneWidget, reason: 'Front camera frame should appear');
84-
final rtcRenderersWithData = $(RTCVideoView).which(
85-
(RTCVideoView widget) => widget.videoRenderer.videoValue.renderVideo == true,
86-
);
87-
expect(rtcRenderersWithData, findsOneWidget, reason: 'Check video renderer');
80+
// Check switch to video function
81+
await $(callActionsVideoCallKey).tap();
82+
await pumpFor(const Duration(seconds: 2), $);
83+
expect($(callFrontCameraPreviewKey), findsOneWidget, reason: 'Front camera frame should appear');
84+
final rtcRenderersWithData = $(
85+
RTCVideoView,
86+
).which((RTCVideoView widget) => widget.videoRenderer.videoValue.renderVideo == true);
87+
expect(rtcRenderersWithData, findsOneWidget, reason: 'Check video renderer');
8888

89-
// Hangup call and check if it is done.
90-
await $(callActionsHangupKey).tap();
91-
await pumpFor(const Duration(seconds: 2), $);
92-
expect($(CallActiveScaffold).visible, false, reason: 'Call should be ended');
89+
// Hangup call and check if it is done.
90+
await $(callActionsHangupKey).tap();
91+
await pumpFor(const Duration(seconds: 2), $);
92+
expect($(CallActiveScaffold).visible, false, reason: 'Call should be ended');
9393

94-
await Future.delayed(crossCallSleep);
95-
},
96-
);
94+
await Future.delayed(crossCallSleep);
95+
});
9796
}

integration_test/call_transfers_test.dart

Lines changed: 48 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -20,63 +20,60 @@ main() {
2020
const callNumberB = IntegrationTestEnvironmentConfig.CALL_NUMBER_B;
2121
const crossCallSleep = Duration(seconds: IntegrationTestEnvironmentConfig.CROSS_CALL_SLEEP_SECONDS);
2222

23-
patrolTest(
24-
'Should make blind and attended transfers',
25-
($) async {
26-
await bootstrap();
27-
await pumpRootAndWaitUntilVisible($);
23+
patrolTest('Should make blind and attended transfers', ($) async {
24+
await bootstrap();
25+
await pumpRootAndWaitUntilVisible($);
2826

29-
// Login if not.
30-
if ($(LoginModeSelectScreen).visible) {
31-
await loginByMethod($, defaultLoginMethod);
32-
// Wait some time for components loading and session establishment.
33-
await pumpFor(const Duration(seconds: 5), $);
34-
}
35-
36-
// Make a call and wait for it to be active.
37-
await $(MainFlavor.keypad.toNavBarKey()).tap();
38-
await enterKeypadNumber($, callNumberA);
39-
await $(actionPadStartKey).tap();
40-
await $(CallActiveScaffold).waitUntilVisible();
27+
// Login if not.
28+
if ($(LoginModeSelectScreen).visible) {
29+
await loginByMethod($, defaultLoginMethod);
30+
// Wait some time for components loading and session establishment.
4131
await pumpFor(const Duration(seconds: 5), $);
42-
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call1 should be active');
32+
}
4333

44-
// Transfer the call blindly and verify that the call is transferred.
45-
await $(callActionsTransferMenuKey).tap();
46-
await $(callActionsTransferMenuBlindInitKey).tap();
47-
await $(MainFlavor.keypad.toNavBarKey()).tap();
48-
await enterKeypadNumber($, callNumberB);
49-
await $(actionPadStartKey).tap();
50-
await pumpFor(const Duration(seconds: 2), $);
51-
expect($(CallActiveScaffold).visible, false, reason: 'Call1 should be transferred');
34+
// Make a call and wait for it to be active.
35+
await $(MainFlavor.keypad.toNavBarKey()).tap();
36+
await enterKeypadNumber($, callNumberA);
37+
await $(actionPadStartKey).tap();
38+
await $(CallActiveScaffold).waitUntilVisible();
39+
await pumpFor(const Duration(seconds: 5), $);
40+
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call1 should be active');
5241

53-
await Future.delayed(crossCallSleep);
42+
// Transfer the call blindly and verify that the call is transferred.
43+
await $(callActionsTransferMenuKey).tap();
44+
await $(callActionsTransferMenuBlindInitKey).tap();
45+
await $(MainFlavor.keypad.toNavBarKey()).tap();
46+
await enterKeypadNumber($, callNumberB);
47+
await $(actionPadStartKey).tap();
48+
await pumpFor(const Duration(seconds: 2), $);
49+
expect($(CallActiveScaffold).visible, false, reason: 'Call1 should be transferred');
5450

55-
// Make a call and wait for it to be active.
56-
await $(MainFlavor.keypad.toNavBarKey()).tap();
57-
await enterKeypadNumber($, callNumberA);
58-
await $(actionPadStartKey).tap();
59-
await $(CallActiveScaffold).waitUntilVisible();
60-
await pumpFor(const Duration(seconds: 5), $);
61-
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call2 should be active');
51+
await Future.delayed(crossCallSleep);
6252

63-
// Make second call and wait for it to be active.
64-
await $.native.pressBack();
65-
await $(MainFlavor.keypad.toNavBarKey()).tap();
66-
await enterKeypadNumber($, callNumberB);
67-
await $(actionPadStartKey).tap();
68-
await $(CallActiveScaffold).waitUntilVisible();
69-
await pumpFor(const Duration(seconds: 5), $);
70-
expect(find.textContaining('On Hold'), findsOneWidget, reason: 'One call should be on hold');
71-
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Another call should be active');
53+
// Make a call and wait for it to be active.
54+
await $(MainFlavor.keypad.toNavBarKey()).tap();
55+
await enterKeypadNumber($, callNumberA);
56+
await $(actionPadStartKey).tap();
57+
await $(CallActiveScaffold).waitUntilVisible();
58+
await pumpFor(const Duration(seconds: 5), $);
59+
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Call2 should be active');
60+
61+
// Make second call and wait for it to be active.
62+
await $.native.pressBack();
63+
await $(MainFlavor.keypad.toNavBarKey()).tap();
64+
await enterKeypadNumber($, callNumberB);
65+
await $(actionPadStartKey).tap();
66+
await $(CallActiveScaffold).waitUntilVisible();
67+
await pumpFor(const Duration(seconds: 5), $);
68+
expect(find.textContaining('On Hold'), findsOneWidget, reason: 'One call should be on hold');
69+
expect(find.textContaining('00:0'), findsOneWidget, reason: 'Another call should be active');
7270

73-
// Make attended transfer and verify that the call is transferred.
74-
await $(callActionsTransferMenuKey).tap();
75-
await $(callActionsTransferMenuNumberKey).at(0).tap();
76-
await pumpFor(const Duration(seconds: 2), $);
77-
expect($(CallActiveScaffold).visible, false, reason: 'Call2 should be transferred');
71+
// Make attended transfer and verify that the call is transferred.
72+
await $(callActionsTransferMenuKey).tap();
73+
await $(callActionsTransferMenuNumberKey).at(0).tap();
74+
await pumpFor(const Duration(seconds: 2), $);
75+
expect($(CallActiveScaffold).visible, false, reason: 'Call2 should be transferred');
7876

79-
await Future.delayed(crossCallSleep);
80-
},
81-
);
77+
await Future.delayed(crossCallSleep);
78+
});
8279
}

0 commit comments

Comments
 (0)