Fakultas Ilmu Komputer UI

Commit c434cbe3 authored by fazasabira's avatar 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
......@@ -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: () {}),
],
),
),
],
),
)
],
),
);
}
}
}
......@@ -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: 213.0,
height: 208.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),
),
),
),
),
],
),
),
],
),
);
......
......@@ -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(10));
// inside filter
expect(find.byType(Container), findsNWidgets(14));
expect(find.byType(Row), findsNWidgets(11));
expect(find.byType(Column), findsNothing);
expect(find.byType(Text), findsNWidgets(25));
expect(find.byType(Flex), findsNWidgets(2));
expect(find.byType(Text), findsNWidgets(14));
expect(find.byType(Flex), findsNothing);
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);
});
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment