Skip to content

Commit

Permalink
Fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Dante291 committed Nov 28, 2023
1 parent 031ff2a commit 5d547e3
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions test/plugins/talawa_plugin_provider_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -212,34 +212,35 @@ void main() {
expect(find.text('Test Plugin'), findsNothing);
});
testWidgets(
'Widget hides child when not visible and Current Organization is Not Set ',
(WidgetTester tester) async {
box.put(
'plugins',
[
{
'_id': '1',
'pluginName': 'Plugin 1',
'pluginCreatedBy': 'User A',
'pluginDesc': 'Description A',
'pluginInstallStatus': false,
'installedOrgs': [''],
},
],
);

when(userConfig.currentOrg).thenReturn(org);
await tester.pumpWidget(
const MaterialApp(
home: TalawaPluginProvider(
visible: false,
pluginName: 'Plugin 1',
child: Text('Test Plugin'),
'Widget hides child when not visible and Current Organization is Not Set ',
(WidgetTester tester) async {
box.put(
'plugins',
[
{
'_id': '1',
'pluginName': 'Plugin 1',
'pluginCreatedBy': 'User A',
'pluginDesc': 'Description A',
'pluginInstallStatus': false,
'installedOrgs': [''],
},
],
);

when(userConfig.currentOrg).thenReturn(org);
await tester.pumpWidget(
const MaterialApp(
home: TalawaPluginProvider(
visible: false,
pluginName: 'Plugin 1',
child: Text('Test Plugin'),
),
),
),
);
);

expect(find.text('Test Plugin'), findsNothing);
});
expect(find.text('Test Plugin'), findsNothing);
},
);
});
}

0 comments on commit 5d547e3

Please sign in to comment.