Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
7428ab66
Unverified
Commit
7428ab66
authored
Jan 14, 2022
by
Chris Yang
Committed by
GitHub
Jan 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug informations on ios_module_test (#96622)
parent
accd6aba
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
9 deletions
+36
-9
FlutterUITests.m
...ration_tests/ios_host_app/FlutterUITests/FlutterUITests.m
+8
-4
MainViewController.m
dev/integration_tests/ios_host_app/Host/MainViewController.m
+28
-5
No files found.
dev/integration_tests/ios_host_app/FlutterUITests/FlutterUITests.m
View file @
7428ab66
...
...
@@ -3,6 +3,7 @@
// found in the LICENSE file.
@import
XCTest
;
@import
os
.
log
;
static
const
CGFloat
kStandardTimeOut
=
60
.
0
;
...
...
@@ -65,6 +66,9 @@ static const CGFloat kStandardTimeOut = 60.0;
// too soon. Trying to tap the element again.
[
self
waitForAndTapElement
:
app
.
buttons
[
@"Flutter View (Warm)"
]];
newPageAppeared
=
[
app
.
staticTexts
[
@"Button tapped 0 times."
]
waitForExistenceWithTimeout
:
kStandardTimeOut
];
if
(
!
newPageAppeared
)
{
os_log
(
OS_LOG_DEFAULT
,
"%@"
,
app
.
debugDescription
);
}
}
XCTAssertTrue
(
newPageAppeared
);
...
...
dev/integration_tests/ios_host_app/Host/MainViewController.m
View file @
7428ab66
...
...
@@ -12,6 +12,8 @@
@interface
MainViewController
()
@property
(
weak
,
nonatomic
)
UIButton
*
flutterViewWarmButton
;
@end
...
...
@@ -39,7 +41,7 @@
[
self
addButton
:
@"Native iOS View"
action
:
@selector
(
showNative
)];
[
self
addButton
:
@"Full Screen (Cold)"
action
:
@selector
(
showFullScreenCold
)];
[
self
addButton
:
@"Full Screen (Warm)"
action
:
@selector
(
showFullScreenWarm
)];
[
self
addButton
:
@"Flutter View (Warm)"
action
:
@selector
(
showFlutterViewWarm
)];
self
.
flutterViewWarmButton
=
[
self
addButton
:
@"Flutter View (Warm)"
action
:
@selector
(
showFlutterViewWarm
)];
[
self
addButton
:
@"Hybrid View (Warm)"
action
:
@selector
(
showHybridView
)];
[
self
addButton
:
@"Dual Flutter View (Cold)"
action
:
@selector
(
showDualView
)];
}
...
...
@@ -99,26 +101,47 @@
}
-
(
void
)
showFlutterViewWarm
{
[[
self
engine
].
navigationChannel
invokeMethod
:
@"setInitialRoute"
self
.
flutterViewWarmButton
.
backgroundColor
=
UIColor
.
redColor
;
FlutterEngine
*
engine
=
[
self
engine
];
FlutterBasicMessageChannel
*
messageChannel
=
[
self
reloadMessageChannel
];
NSAssert
(
engine
!=
nil
,
@"Engine is not nil."
);
NSAssert
(
engine
.
navigationChannel
!=
nil
,
@"Engine.navigationChannel is not nil."
);
NSAssert
(
messageChannel
!=
nil
,
@"messageChannel is not nil."
);
[
engine
.
navigationChannel
invokeMethod
:
@"setInitialRoute"
arguments
:
@"/"
];
[
[
self
reloadMessageChannel
]
sendMessage
:
@"/"
];
[
messageChannel
sendMessage
:
@"/"
];
FlutterViewController
*
flutterViewController
=
[[
FlutterViewController
alloc
]
initWithEngine
:[
self
engine
]
nibName
:
nil
bundle
:
nil
];
flutterViewController
.
view
.
accessibilityLabel
=
@"flutter view"
;
NSAssert
(
self
.
navigationController
!=
nil
,
@"self.navigationController is not nil."
);
[
self
.
navigationController
pushViewController
:
flutterViewController
animated
:
YES
];
animated
:
NO
];
if
(
self
.
navigationController
.
topViewController
!=
flutterViewController
)
{
// For debugging:
// Some unknown issue happened caused `flutterViewController` not being pushed.
// We try to push an basic UIViewController to see if it would work.
UIViewController
*
viewController
=
[[
UIViewController
alloc
]
init
];
viewController
.
view
.
backgroundColor
=
UIColor
.
blueColor
;
[
self
.
navigationController
pushViewController
:
viewController
animated
:
NO
];
NSAssert
(
self
.
navigationController
.
topViewController
==
viewController
,
@"self.navigationController.topViewController should be the basic view controller"
);
}
}
-
(
void
)
addButton
:
(
NSString
*
)
title
action
:
(
SEL
)
action
{
-
(
UIButton
*
)
addButton
:
(
NSString
*
)
title
action
:
(
SEL
)
action
{
UIButton
*
button
=
[
UIButton
buttonWithType
:
UIButtonTypeSystem
];
[
button
setTitle
:
title
forState
:
UIControlStateNormal
];
[
button
addTarget
:
self
action
:
action
forControlEvents
:
UIControlEventTouchUpInside
];
[
_stackView
addArrangedSubview
:
button
];
return
button
;
}
@end
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