Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
DTB-Layanan Fasilitas Publik Penyandang Disabilitas
PoiPoLeGan-PPLapanganTembak-DTB Layanan Fasilitas Publik Penyandang Disabilitas-FE
Commits
c434cbe3
Commit
c434cbe3
authored
Mar 29, 2020
by
fazasabira
Browse files
[RED] test still not passed & deleted unfunctional widget in filter.dart
parent
a05fa545
Pipeline
#37673
failed with stages
in 2 minutes and 32 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
lib/page/filter & fasilitas/filter.dart
View file @
c434cbe3
...
...
@@ -62,7 +62,6 @@ class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateM
@override
Widget
build
(
BuildContext
context
)
{
//print("show urutan $showUrutan");
return
new
Scaffold
(
key:
_scaffoldKey
,
appBar:
new
AppBar
(
...
...
@@ -97,86 +96,5 @@ class _MyHomePageState extends State<MyHomePage> with SingleTickerProviderStateM
),
);
}
Widget
_newTaskModalBottomSheet
(
context
)
{
return
Container
(
child:
new
Row
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
Column
(
children:
<
Widget
>[
Expanded
(
flex:
1
,
child:
new
InkWell
(
child:
new
Text
(
'Urutan'
),
onTap:
()
=
>
setState
(()
{
print
(
'no'
);
showUrutan
=
true
;
})),
),
Expanded
(
flex:
1
,
child:
new
InkWell
(
child:
new
Text
(
'Jenis Fasilitas'
),
onTap:
()
=
>
setState
(()
{
print
(
"yes"
);
showUrutan
=
false
;
})),
)
],
),
),
Expanded
(
flex:
3
,
child:
Stack
(
children:
<
Widget
>[
Opacity
(
opacity:
showUrutan
?
1
:
0
,
child:
Column
(
children:
<
Widget
>[
new
ListTile
(
title:
new
Text
(
'Kursi roda'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Lift'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Toilet Disabilitas'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Tempat Ibadah'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Bidang Miring (Ramp)'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Parkir Umum'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Parkir Disabilitas'
),
onTap:
()
{}),
],
),
),
Opacity
(
opacity:
showUrutan
?
0
:
1
,
child:
Column
(
children:
<
Widget
>[
new
ListTile
(
title:
new
Text
(
'Komentar Terbaru'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Komentar Terpopuler'
),
onTap:
()
{}),
new
ListTile
(
title:
new
Text
(
'Komentar dengan Rating Tertinggi'
),
onTap:
()
{}),
],
),
),
],
),
)
],
),
);
}
}
}
lib/page/filter & fasilitas/insideFilter.dart
View file @
c434cbe3
...
...
@@ -25,7 +25,6 @@ class _InsideFilterState extends State<InsideFilter>
height:
MediaQuery
.
of
(
context
)
.
size
.
height
/
2
,
decoration:
BoxDecoration
(
border:
Border
.
all
(
color:
Colors
.
green
)),
child:
new
Row
(
//body: ListView(
children:
<
Widget
>[
Expanded
(
flex:
1
,
...
...
@@ -295,7 +294,7 @@ class _InsideFilterState extends State<InsideFilter>
)
),
Container
(
height:
2
13
.0
,
height:
2
08
.0
,
),
Container
(
margin:
EdgeInsets
.
only
(
...
...
@@ -331,7 +330,40 @@ class _InsideFilterState extends State<InsideFilter>
),
],
),
)
),
Expanded
(
flex:
1
,
child:
ListView
(
children:
<
Widget
>[
Container
(
margin:
EdgeInsets
.
only
(
top:
doubleSpace
,
bottom:
doubleSpace
,
left:
smallSpace
),
decoration:
BoxDecoration
(
boxShadow:
regularShadow
),
child:
SizedBox
(
width:
double
.
infinity
,
child:
FlatButton
(
color:
Colors
.
transparent
,
textColor:
Colors
.
black
,
//disabledColor: Colors.grey,
//disabledTextColor: Colors.black,
padding:
EdgeInsets
.
all
(
8
),
shape:
RoundedRectangleBorder
(
borderRadius:
regularBorderRadius
,
side:
BorderSide
(
color:
Colors
.
transparent
)),
splashColor:
Colors
.
transparent
,
onPressed:
()
{
/*...*/
},
child:
Text
(
"BATAL"
,
style:
TextStyle
(
fontSize:
10
),
),
),
),
),
],
),
),
],
),
);
...
...
test/filter_test.dart
View file @
c434cbe3
...
...
@@ -23,16 +23,21 @@ void main() {
await
tester
.
tap
(
button
);
//await Future.delayed(Duration(seconds: 2));
// Search for the childWidget in the tree and verify it exists.
expect
(
find
.
byType
(
Scaffold
),
findsNothing
);
expect
(
find
.
byType
(
Container
),
findsNWidgets
(
9
));
expect
(
find
.
byType
(
Icon
),
findsNothing
);
expect
(
find
.
byType
(
Row
),
findsNWidgets
(
1
0
));
// inside filter
expect
(
find
.
byType
(
Container
),
findsNWidgets
(
14
)
);
expect
(
find
.
byType
(
Row
),
findsNWidgets
(
1
1
));
expect
(
find
.
byType
(
Column
),
findsNothing
);
expect
(
find
.
byType
(
Text
),
findsNWidgets
(
25
));
expect
(
find
.
byType
(
Flex
),
findsN
Widgets
(
2
)
);
expect
(
find
.
byType
(
Text
),
findsNWidgets
(
14
));
expect
(
find
.
byType
(
Flex
),
findsN
othing
);
expect
(
find
.
text
(
'jns fasilitas'
),
findsNothing
);
expect
(
find
.
text
(
'urutn'
),
findsNothing
);
expect
(
find
.
text
(
'hps smw'
),
findsNothing
);
// filter
expect
(
find
.
byType
(
Scaffold
),
findsOneWidget
);
expect
(
find
.
byType
(
Icon
),
findsOneWidget
);
});
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment