Fakultas Ilmu Komputer UI

Commit fba6b7b5 authored by Tsamara Esperanti Erwin's avatar Tsamara Esperanti Erwin
Browse files

[GREEN] Remove preorder

parent d83d192f
Pipeline #62328 passed with stages
in 7 minutes and 6 seconds
......@@ -112,7 +112,7 @@ class _BodyDetailProduct extends StatelessWidget {
),
),
Expanded(
flex: 5,
flex: 3,
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceAround,
......
......@@ -49,35 +49,6 @@ void main() {
Intl.defaultLocale = 'id';
});
testWidgets('Test detail loaded cart loaded preorder',
(WidgetTester tester) async {
when(cartBloc.state).thenAnswer((_) => CartLoaded([], '10000', 1));
final prod = Product(
id: '123',
name: 'kue',
category: 'idCat',
categoryName: 'cat',
stock: null,
subcategoryName: 'subcat',
subcategory: 'idsub',
price: '10000',
description: 'testttt',
image: null);
final widget = BlocProvider<CartBloc>.value(
value: cartBloc,
child: MaterialApp(
onGenerateRoute: Router.generateRoute,
home: RepositoryProvider<ProductRepository>.value(
value: prodRep, child: DetailProduct(product: prod))),
);
await tester.pumpWidget(widget);
expect(find.text('kue'), findsOneWidget);
expect(find.byType(PriceTextFormatter), findsOneWidget);
expect(find.text('Stok: 10'), findsNothing);
expect(find.text('testttt'), findsOneWidget);
expect(find.text('Rp10.000'), findsOneWidget);
});
testWidgets('Test detail loaded cart loaded', (WidgetTester tester) async {
when(cartBloc.state).thenAnswer((_) => CartLoaded([], '10000', 1));
await tester.pumpWidget(widgetTested);
......
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