Skip to content

Commit d82c1d4

Browse files
committed
fix: e2e ios testing
1 parent 985709a commit d82c1d4

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

example/lib/src/screens/my_home_page.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,10 @@ class _MyHomePageState extends State<MyHomePage> {
114114
BugReporting.setInvocationEvents([invocationEvent]);
115115
}
116116

117-
void changePrimaryColor() {
117+
void changePrimaryColor() async {
118118
String text = primaryColorController.text.replaceAll('#', '');
119-
Instabug.setTheme(ThemeConfig(primaryColor: '#$text'));
119+
await Instabug.setTheme(ThemeConfig(primaryColor: '#$text'));
120+
await Future.delayed(const Duration(milliseconds: 500));
120121
}
121122

122123
void setColorTheme(ColorTheme colorTheme) {

test/instabug_test.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -443,15 +443,4 @@ void main() {
443443
mHost.setTheme(themeConfig.toMap()),
444444
).called(1);
445445
});
446-
447-
test('[setPrimaryColor] should call setTheme with primary color', () async {
448-
const color = Color(0xFFFF0000);
449-
450-
// ignore: deprecated_member_use
451-
await Instabug.setPrimaryColor(color);
452-
453-
verify(
454-
mHost.setTheme(any),
455-
).called(1);
456-
});
457446
}

0 commit comments

Comments
 (0)