-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Melos scripts improvements (#400)
* Improvement on melos script * Add fail fast to lint * Melos directory * Updated test * Update melos.yaml * fix tests --------- Co-authored-by: Lucas Oliveira <[email protected]>
- Loading branch information
1 parent
16fa623
commit c6df98c
Showing
5 changed files
with
82 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,5 @@ | ||
void main() {} | ||
import 'package:test/test.dart'; | ||
|
||
void main() { | ||
test('description', () => expect(true, true)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,5 @@ | ||
void main() { | ||
// group('RemixButton', () { | ||
// testWidgets('renders with correct label', (WidgetTester tester) async { | ||
// const label = 'Test Button'; | ||
// await tester.pumpWidget( | ||
// MaterialApp( | ||
// home: RxButton(label: label, onPressed: () {}), | ||
// ), | ||
// ); | ||
|
||
// expect( | ||
// find.byWidgetPredicate( | ||
// (widget) => widget is Text && widget.data == label, | ||
// ), | ||
// findsOneWidget, | ||
// ); | ||
// }); | ||
|
||
// testWidgets('shows loading indicator and label when isLoading is true', | ||
// (WidgetTester tester) async { | ||
// const loadingLabel = 'Loading...'; | ||
|
||
// await tester.pumpWidget( | ||
// MaterialApp( | ||
// home: RxButton( | ||
// label: 'Test Button', | ||
// loading: true, | ||
// onPressed: () {}, | ||
// ), | ||
// ), | ||
// ); | ||
|
||
// expect(find.byType(CircularProgressIndicator), findsOneWidget); | ||
// expect(find.text(loadingLabel), findsOneWidget); | ||
// }); | ||
|
||
// testWidgets('displays correct icons when provided', | ||
// (WidgetTester tester) async { | ||
// await tester.pumpWidget(MaterialApp( | ||
// home: RxButton( | ||
// label: 'Test Button', | ||
// iconLeft: Icons.arrow_back, | ||
// iconRight: Icons.arrow_forward, | ||
// onPressed: () {}, | ||
// ), | ||
// )); | ||
|
||
// expect(find.byIcon(Icons.arrow_back), findsOneWidget); | ||
// expect(find.byIcon(Icons.arrow_forward), findsOneWidget); | ||
|
||
// final HBox iconRow = tester.widget(find.byType(HBox)); | ||
// expect(iconRow.children.first, isInstanceOf<StyledIcon>()); | ||
// expect((iconRow.children.first as StyledIcon).icon, Icons.arrow_back); | ||
// expect(iconRow.children.last, isInstanceOf<StyledIcon>()); | ||
// expect((iconRow.children.last as StyledIcon).icon, Icons.arrow_forward); | ||
// }); | ||
// }); | ||
import 'package:flutter_test/flutter_test.dart'; | ||
|
||
// testWidgets('when disabled must not call onPressed', | ||
// (WidgetTester tester) async { | ||
// bool didCallOnPressed = false; | ||
|
||
// await tester.pumpWidget(MaterialApp( | ||
// home: RxButton( | ||
// label: 'Disabled Button', | ||
// onPressed: () { | ||
// didCallOnPressed = true; | ||
// }, | ||
// disabled: true, | ||
// ), | ||
// )); | ||
|
||
// await tester.tap(find.byType(RxButton)); | ||
// await tester.pumpAndSettle(const Duration(milliseconds: 200)); | ||
|
||
// expect(didCallOnPressed, false); | ||
// }); | ||
|
||
// testWidgets('when enabled must call onPressed', (WidgetTester tester) async { | ||
// bool didCallOnPressed = false; | ||
|
||
// await tester.pumpWidget(MaterialApp( | ||
// home: RxButton( | ||
// label: 'Disabled Button', | ||
// onPressed: () { | ||
// didCallOnPressed = true; | ||
// }, | ||
// ), | ||
// )); | ||
|
||
// await tester.tap(find.byType(RxButton)); | ||
// await tester.pumpAndSettle(const Duration(milliseconds: 200)); | ||
|
||
// expect(didCallOnPressed, isTrue); | ||
// }); | ||
void main() { | ||
test('description', () => expect(true, true)); | ||
} |