mirror of
https://github.com/foss42/apidash.git
synced 2025-06-10 15:24:32 +08:00
Added check for inline button test-failing
This commit is contained in:
@ -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(
|
||||||
|
Reference in New Issue
Block a user