Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
fluttertpc_get
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jonatas
2020-12-19 20:46:55 -0300
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
f1a15b102a308c94a43174434768c5c5a28cc353
f1a15b10
1 parent
c3fc8a0c
improve extensions widget test
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
test/utils/extensions/widget_extensions_test.dart
test/utils/extensions/widget_extensions_test.dart
View file @
f1a15b1
...
...
@@ -2,10 +2,17 @@ import 'package:flutter/widgets.dart';
import
'package:flutter_test/flutter_test.dart'
;
import
'package:get/utils.dart'
;
class
Foo
extends
StatelessWidget
{
@override
Widget
build
(
BuildContext
context
)
{
return
SizedBox
.
shrink
();
}
}
void
main
(
)
{
group
(
'Group test for PaddingX Extension'
,
()
{
testWidgets
(
'Test of paddingAll'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
expect
(
find
.
byType
(
Padding
),
findsNothing
);
...
...
@@ -15,7 +22,7 @@ void main() {
});
testWidgets
(
'Test of paddingOnly'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
expect
(
find
.
byType
(
Padding
),
findsNothing
);
...
...
@@ -25,7 +32,7 @@ void main() {
});
testWidgets
(
'Test of paddingSymmetric'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
expect
(
find
.
byType
(
Padding
),
findsNothing
);
...
...
@@ -35,7 +42,7 @@ void main() {
});
testWidgets
(
'Test of paddingZero'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
expect
(
find
.
byType
(
Padding
),
findsNothing
);
...
...
@@ -47,7 +54,7 @@ void main() {
group
(
'Group test for MarginX Extension'
,
()
{
testWidgets
(
'Test of marginAll'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
await
tester
.
pumpWidget
(
containerTest
.
marginAll
(
16
));
...
...
@@ -55,7 +62,7 @@ void main() {
});
testWidgets
(
'Test of marginOnly'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
await
tester
.
pumpWidget
(
containerTest
.
marginOnly
(
top:
16
));
...
...
@@ -63,7 +70,7 @@ void main() {
});
testWidgets
(
'Test of marginSymmetric'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
await
tester
.
pumpWidget
(
containerTest
.
marginSymmetric
(
vertical:
16
));
...
...
@@ -71,7 +78,7 @@ void main() {
});
testWidgets
(
'Test of marginZero'
,
(
tester
)
async
{
Widget
containerTest
=
Container
();
Widget
containerTest
=
Foo
();
await
tester
.
pumpWidget
(
containerTest
.
marginZero
);
...
...
Please
register
or
login
to post a comment