-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Checked out project detail test from branch all-commits * implemented all methods * refactor * formatting * revert unwanted change and small code cleaning --------- Co-authored-by: Simone Stasi <[email protected]>
- Loading branch information
1 parent
f229b1a
commit 302bdc7
Showing
5 changed files
with
94 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import 'package:azure_devops/src/screens/project_detail/base_project_detail.dart'; | ||
import 'package:azure_devops/src/services/azure_api_service.dart'; | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
import 'api_service_mock.dart'; | ||
|
||
/// Mock details taken from [AzureApiServiceMock.getProjectTeams] | ||
void main() { | ||
TestWidgetsFlutterBinding.ensureInitialized(); | ||
|
||
testWidgets("Project detail page shows all project's informations", (t) async { | ||
final projectPage = AzureApiServiceInherited( | ||
apiService: AzureApiServiceMock(), | ||
child: MaterialApp( | ||
onGenerateRoute: (_) => MaterialPageRoute( | ||
builder: (_) => ProjectDetailPage(), | ||
settings: RouteSettings( | ||
arguments: 'test name', | ||
), | ||
), | ||
), | ||
); | ||
|
||
await t.pumpWidget(projectPage); | ||
await t.pumpAndSettle(); | ||
|
||
expect(find.text('member_2_name', findRichText: true), findsOneWidget); | ||
}); | ||
} |