Added check for inline button test-failing

This commit is contained in:
Chinmay
2024-03-03 10:06:49 +05:30
parent 81218d9fe7
commit f0ff324b69

View File

@ -4,19 +4,21 @@ import 'package:flutter_test/flutter_test.dart';
import 'package:apidash/widgets/markdown.dart'; import 'package:apidash/widgets/markdown.dart';
void main() { void main() {
testWidgets('Testing CustomMarkdown', (tester) async { group('CustomMarkdown Widget Tests', () {
const markdown = CustomMarkdown( testWidgets('Testing CustomMarkdown buttons and tags renders', (tester) async {
data: """Is a markdown ~`star on github`~ const markdown = CustomMarkdown(
data: """Is a markdown ~`star on github`~
#br #br
#br #br
~`github repo`~ ~`Discord Server`~""", ~`github repo`~ ~`Discord Server`~""",
); );
await tester.pumpWidget(const MaterialApp(home: markdown)); await tester.pumpWidget(const MaterialApp(home: markdown));
});
group('CustomMarkdown Widget Tests', () { expect(find.byType(InlineButton), findsNWidgets(3));
expect(find.text('#br'), findsNothing);
});
testWidgets('CustomMarkdown renders correctly', testWidgets('CustomMarkdown renders correctly',
(WidgetTester tester) async { (WidgetTester tester) async {
await tester.pumpWidget(const MaterialApp( await tester.pumpWidget(const MaterialApp(