mirror of
https://github.com/foss42/apidash.git
synced 2025-06-21 14:57:07 +08:00
Ensure introData() Function Works During Testing by Using setMockInitialValues
This commit is contained in:
@ -1,9 +1,16 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:apidash/widgets/intro_message.dart';
|
import 'package:apidash/widgets/intro_message.dart';
|
||||||
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
testWidgets('Testing Intro Message', (tester) async {
|
testWidgets('Testing Intro Message', (tester) async {
|
||||||
|
PackageInfo.setMockInitialValues(
|
||||||
|
appName: 'API Dash',
|
||||||
|
packageName: 'dev.apidash.apidash',
|
||||||
|
version: '1.0.0',
|
||||||
|
buildNumber: '1',
|
||||||
|
buildSignature: 'buildSignature');
|
||||||
await tester.pumpWidget(
|
await tester.pumpWidget(
|
||||||
const MaterialApp(
|
const MaterialApp(
|
||||||
title: 'Intro Message',
|
title: 'Intro Message',
|
||||||
|
Reference in New Issue
Block a user