-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from adityadroid/ConversationUI-Test
Tests for Conversation Page
- Loading branch information
Showing
13 changed files
with
235 additions
and
99 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
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,14 @@ | ||
|
||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/main.dart'; | ||
import 'package:messio/pages/ConversationPageList.dart'; | ||
|
||
void main() { | ||
testWidgets('Main UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(Messio()); | ||
|
||
expect(find.byType(ConversationPageList),findsOneWidget); | ||
|
||
}); | ||
} |
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,19 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/pages/ConversationPage.dart'; | ||
import 'package:messio/pages/ConversationPageList.dart'; | ||
|
||
void main(){ | ||
const MaterialApp app = MaterialApp( | ||
home: Scaffold( | ||
body: const ConversationPageList() | ||
), | ||
); | ||
testWidgets('ConversationPageList UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(app); | ||
expect(find.byType(ConversationPage),findsOneWidget); | ||
expect(find.byType(PageView),findsOneWidget); | ||
|
||
}); | ||
} |
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,25 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/pages/ConversationPage.dart'; | ||
import 'package:messio/widgets/ChatAppBar.dart'; | ||
import 'package:messio/widgets/ChatListWidget.dart'; | ||
import 'package:messio/widgets/InputWidget.dart'; | ||
|
||
void main(){ | ||
const MaterialApp app = MaterialApp( | ||
home: Scaffold( | ||
body: const ConversationPage() | ||
), | ||
); | ||
|
||
testWidgets('ConversationPage UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(app); | ||
|
||
expect(find.byType(ChatAppBar),findsOneWidget); | ||
expect(find.byType(InputWidget),findsOneWidget); | ||
expect(find.byType(ChatListWidget),findsOneWidget); | ||
|
||
|
||
}); | ||
} |
This file was deleted.
Oops, something went wrong.
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,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/widgets/ChatAppBar.dart'; | ||
|
||
void main(){ | ||
const MaterialApp app = MaterialApp( | ||
home: Scaffold( | ||
body: const ChatAppBar() | ||
), | ||
); | ||
testWidgets('ChatAppBar UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(app); | ||
|
||
expect(find.text('Aditya Gurjar'), findsOneWidget); | ||
expect(find.text('@adityagurjar'), findsOneWidget); | ||
expect(find.byType(IconButton),findsNWidgets(1)); | ||
expect(find.byType(CircleAvatar),findsOneWidget); | ||
}); | ||
} |
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,20 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/widgets/ChatItemWidget.dart'; | ||
|
||
void main(){ | ||
const MaterialApp app = MaterialApp( | ||
home: Scaffold( | ||
body: const ChatItemWidget(0) | ||
), | ||
); | ||
testWidgets('ChatItemWidget UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(app); | ||
|
||
expect(find.byType(Container),findsNWidgets(3)); | ||
expect(find.byType(Column),findsNWidgets(1)); | ||
expect(find.byType(Row),findsNWidgets(2)); | ||
expect(find.byType(Text),findsNWidgets(2)); | ||
}); | ||
} |
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,12 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:flutter_test/flutter_test.dart'; | ||
import 'package:messio/main.dart'; | ||
|
||
void main(){ | ||
testWidgets('ChatListWidget UI Test', (WidgetTester tester) async { | ||
// Build our app and trigger a frame. | ||
await tester.pumpWidget(Messio()); | ||
|
||
expect(find.byType(ListView),findsOneWidget); | ||
}); | ||
} |
Oops, something went wrong.