Fakultas Ilmu Komputer UI

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

[RED] Remove preorder

parent afa33617
Pipeline #62325 failed with stages
in 6 minutes and 30 seconds
...@@ -45,7 +45,6 @@ void main() { ...@@ -45,7 +45,6 @@ void main() {
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
preOrder: false,
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -81,7 +80,6 @@ void main() { ...@@ -81,7 +80,6 @@ void main() {
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
id: '1', id: '1',
preOrder: false,
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
stock: 2, stock: 2,
...@@ -129,7 +127,6 @@ void main() { ...@@ -129,7 +127,6 @@ void main() {
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
id: '1', id: '1',
preOrder: false,
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
stock: 2, stock: 2,
...@@ -165,7 +162,6 @@ void main() { ...@@ -165,7 +162,6 @@ void main() {
categoryName: 'catName', categoryName: 'catName',
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
preOrder: false,
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
...@@ -201,7 +197,6 @@ void main() { ...@@ -201,7 +197,6 @@ void main() {
categoryName: 'catName', categoryName: 'catName',
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
preOrder: false,
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
...@@ -229,7 +224,6 @@ void main() { ...@@ -229,7 +224,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 10, stock: 10,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -261,7 +255,6 @@ void main() { ...@@ -261,7 +255,6 @@ void main() {
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
preOrder: false,
stock: 10, stock: 10,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -278,7 +271,6 @@ void main() { ...@@ -278,7 +271,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 10, stock: 10,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -321,7 +313,6 @@ void main() { ...@@ -321,7 +313,6 @@ void main() {
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
preOrder: false,
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -338,7 +329,6 @@ void main() { ...@@ -338,7 +329,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -366,7 +356,6 @@ void main() { ...@@ -366,7 +356,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -383,7 +372,6 @@ void main() { ...@@ -383,7 +372,6 @@ void main() {
id: '2', id: '2',
description: 'aaaa', description: 'aaaa',
price: '10000', price: '10000',
preOrder: false,
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -405,7 +393,6 @@ void main() { ...@@ -405,7 +393,6 @@ void main() {
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
id: '1', id: '1',
preOrder: false,
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
stock: 2, stock: 2,
...@@ -420,7 +407,6 @@ void main() { ...@@ -420,7 +407,6 @@ void main() {
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
id: '2', id: '2',
preOrder: false,
description: 'aaaa', description: 'aaaa',
price: '10000', price: '10000',
stock: 2, stock: 2,
...@@ -453,7 +439,6 @@ void main() { ...@@ -453,7 +439,6 @@ void main() {
1, 1,
Product( Product(
image: null, image: null,
preOrder: false,
categoryName: 'catName', categoryName: 'catName',
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
...@@ -483,7 +468,6 @@ void main() { ...@@ -483,7 +468,6 @@ void main() {
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
preOrder: true,
stock: null, stock: null,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -491,7 +475,6 @@ void main() { ...@@ -491,7 +475,6 @@ void main() {
await tester.pumpWidget(testedWidget); await tester.pumpWidget(testedWidget);
expect(find.text('Keranjang'), findsOneWidget); expect(find.text('Keranjang'), findsOneWidget);
expect(find.text('kue'), findsOneWidget); expect(find.text('kue'), findsOneWidget);
expect(find.text('Preorder'), findsOneWidget);
expect(find.byType(PriceTextFormatter), findsNWidgets(3)); expect(find.byType(PriceTextFormatter), findsNWidgets(3));
}); });
...@@ -524,7 +507,6 @@ void main() { ...@@ -524,7 +507,6 @@ void main() {
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
preOrder: false,
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
subcategoryName: 'subCatName')) subcategoryName: 'subCatName'))
...@@ -552,7 +534,6 @@ void main() { ...@@ -552,7 +534,6 @@ void main() {
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
id: '1', id: '1',
preOrder: false,
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
stock: 2, stock: 2,
...@@ -584,7 +565,6 @@ void main() { ...@@ -584,7 +565,6 @@ void main() {
categoryName: 'catName', categoryName: 'catName',
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
preOrder: false,
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
...@@ -621,7 +601,6 @@ void main() { ...@@ -621,7 +601,6 @@ void main() {
categoryName: 'catName', categoryName: 'catName',
category: 'catId', category: 'catId',
name: 'kue', name: 'kue',
preOrder: false,
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
...@@ -651,7 +630,6 @@ void main() { ...@@ -651,7 +630,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -688,7 +666,6 @@ void main() { ...@@ -688,7 +666,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -735,7 +712,6 @@ void main() { ...@@ -735,7 +712,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
...@@ -756,7 +732,6 @@ void main() { ...@@ -756,7 +732,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
......
...@@ -52,7 +52,6 @@ void main() { ...@@ -52,7 +52,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'idSub', subcategory: 'idSub',
...@@ -112,7 +111,6 @@ void main() { ...@@ -112,7 +111,6 @@ void main() {
description: 'aaaa', description: 'aaaa',
price: '200000', price: '200000',
stock: null, stock: null,
preOrder: true,
subcategory: 'idSub', subcategory: 'idSub',
subcategoryName: 'subcat') subcategoryName: 'subcat')
]).toJson())); ]).toJson()));
...@@ -125,7 +123,6 @@ void main() { ...@@ -125,7 +123,6 @@ void main() {
expect(find.byType(ListProductGrid, skipOffstage: false), findsOneWidget); expect(find.byType(ListProductGrid, skipOffstage: false), findsOneWidget);
expect(find.byType(ProductGrid, skipOffstage: false), findsOneWidget); expect(find.byType(ProductGrid, skipOffstage: false), findsOneWidget);
expect(find.text('kue', skipOffstage: false), findsOneWidget); expect(find.text('kue', skipOffstage: false), findsOneWidget);
expect(find.text('Preorder', skipOffstage: false), findsOneWidget);
}); });
testWidgets('Category Page loaded cart not loaded', testWidgets('Category Page loaded cart not loaded',
...@@ -335,7 +332,6 @@ void main() { ...@@ -335,7 +332,6 @@ void main() {
name: 'kue', name: 'kue',
id: '1', id: '1',
description: 'aaaa', description: 'aaaa',
preOrder: false,
price: '200000', price: '200000',
stock: 2, stock: 2,
subcategory: 'subCatId', subcategory: 'subCatId',
......
...@@ -34,7 +34,6 @@ void main() { ...@@ -34,7 +34,6 @@ void main() {
subcategory: 'idsub', subcategory: 'idsub',
price: '10000', price: '10000',
description: 'testttt', description: 'testttt',
preOrder: false,
image: null); image: null);
cartBloc = CartBlocMock(); cartBloc = CartBlocMock();
widgetTested = BlocProvider<CartBloc>.value( widgetTested = BlocProvider<CartBloc>.value(
...@@ -63,7 +62,6 @@ void main() { ...@@ -63,7 +62,6 @@ void main() {
subcategory: 'idsub', subcategory: 'idsub',
price: '10000', price: '10000',
description: 'testttt', description: 'testttt',
preOrder: true,
image: null); image: null);
final widget = BlocProvider<CartBloc>.value( final widget = BlocProvider<CartBloc>.value(
value: cartBloc, value: cartBloc,
...@@ -77,7 +75,6 @@ void main() { ...@@ -77,7 +75,6 @@ void main() {
expect(find.byType(PriceTextFormatter), findsOneWidget); expect(find.byType(PriceTextFormatter), findsOneWidget);
expect(find.text('Stok: 10'), findsNothing); expect(find.text('Stok: 10'), findsNothing);
expect(find.text('testttt'), findsOneWidget); expect(find.text('testttt'), findsOneWidget);
expect(find.text('Preorder'), findsOneWidget);
expect(find.text('Rp10.000'), findsOneWidget); expect(find.text('Rp10.000'), findsOneWidget);
}); });
...@@ -104,7 +101,6 @@ void main() { ...@@ -104,7 +101,6 @@ void main() {
subcategory: 'idsub', subcategory: 'idsub',
price: '10000', price: '10000',
description: 'testttt', description: 'testttt',
preOrder: false,
image: null); image: null);
final widget = BlocProvider<CartBloc>.value( final widget = BlocProvider<CartBloc>.value(
value: cartBloc, value: cartBloc,
......
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