Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flutter_boost_1.22.4
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢冠章
flutter_boost_1.22.4
Commits
969ea9fd
Commit
969ea9fd
authored
Feb 20, 2020
by
yangwu.jia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test case
parent
7d7ac629
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
0 deletions
+38
-0
test/lib/unit/flutter_boost_test.dart
test/lib/unit/flutter_boost_test.dart
+38
-0
No files found.
test/lib/unit/flutter_boost_test.dart
View file @
969ea9fd
...
@@ -71,6 +71,7 @@ void main() {
...
@@ -71,6 +71,7 @@ void main() {
MyApp
(),
MyApp
(),
);
);
//open firt page
//open firt page
ContainerCoordinator
.
singleton
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
"first"
,
{},
"1000000"
);
.
nativeContainerDidShow
(
"first"
,
{},
"1000000"
);
...
@@ -79,6 +80,7 @@ void main() {
...
@@ -79,6 +80,7 @@ void main() {
expect
(
find
.
text
(
'First'
),
findsOneWidget
);
expect
(
find
.
text
(
'First'
),
findsOneWidget
);
//open second page
//open second page
ContainerCoordinator
.
singleton
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
"second"
,
{},
"2000000"
);
.
nativeContainerDidShow
(
"second"
,
{},
"2000000"
);
...
@@ -89,6 +91,8 @@ void main() {
...
@@ -89,6 +91,8 @@ void main() {
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
//close sencod page
//close sencod page
FlutterBoost
.
containerManager
?.
remove
(
"2000000"
);
FlutterBoost
.
containerManager
?.
remove
(
"2000000"
);
...
@@ -97,5 +101,39 @@ void main() {
...
@@ -97,5 +101,39 @@ void main() {
expect
(
find
.
text
(
'First'
),
findsOneWidget
);
expect
(
find
.
text
(
'First'
),
findsOneWidget
);
// second page ,but pageId is 2000001
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
"second"
,
{},
"2000001"
);
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
expect
(
find
.
text
(
'Second'
),
findsOneWidget
);
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
//reopen firt page
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
"first"
,
{},
"1000000"
);
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
expect
(
find
.
text
(
'First'
),
findsOneWidget
);
// close second page and pageId is 2000001
ContainerCoordinator
.
singleton
.
nativeContainerDidShow
(
"second"
,
{},
"2000001"
);
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
expect
(
find
.
text
(
'Second'
),
findsOneWidget
);
await
tester
.
pump
(
const
Duration
(
seconds:
1
));
});
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment