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
08154b22
Unverified
Commit
08154b22
authored
May 14, 2021
by
Jia Hao
Committed by
GitHub
May 14, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Init licenses for test bindings (#81961)" (#82337)
parent
93c87e92
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
65 deletions
+7
-65
license_expectation.txt
dev/automated_tests/integration_test/license_expectation.txt
+0
-1
license_test.dart
dev/automated_tests/integration_test/license_test.dart
+0
-53
binding.dart
packages/flutter_test/lib/src/binding.dart
+7
-7
test_test.dart
packages/flutter_tools/test/integration.shard/test_test.dart
+0
-4
No files found.
dev/automated_tests/integration_test/license_expectation.txt
deleted
100644 → 0
View file @
93c87e92
[0-9]+:[0-9]+ [+]1: All tests passed!
dev/automated_tests/integration_test/license_test.dart
deleted
100644 → 0
View file @
93c87e92
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import
'package:flutter/material.dart'
;
import
'package:flutter_test/flutter_test.dart'
;
void
main
(
)
{
testWidgets
(
'Can show the license page'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
const
TestApp
());
await
tester
.
pump
();
final
Finder
button
=
find
.
byType
(
TextButton
);
await
tester
.
tap
(
button
);
await
tester
.
pumpAndSettle
();
await
tester
.
scrollUntilVisible
(
// Dart should very definitely be in the licenses list.
find
.
text
(
'dart'
),
100
,
maxScrolls:
200
,
);
expect
(
find
.
text
(
'dart'
),
findsOneWidget
);
});
}
class
TestApp
extends
StatelessWidget
{
const
TestApp
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
const
MaterialApp
(
home:
ShowLicenseButton
(),
);
}
}
class
ShowLicenseButton
extends
StatelessWidget
{
const
ShowLicenseButton
({
Key
?
key
})
:
super
(
key:
key
);
@override
Widget
build
(
BuildContext
context
)
{
return
TextButton
(
onPressed:
()
=>
showLicensePage
(
context:
context
),
child:
const
Text
(
'Show licenses'
,
key:
Key
(
'show-licenses'
),
),
);
}
}
packages/flutter_test/lib/src/binding.dart
View file @
08154b22
...
...
@@ -297,6 +297,13 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
_testTextInput
=
TestTextInput
(
onCleared:
_resetFocusedEditable
);
}
@override
// ignore: MUST_CALL_SUPER
void
initLicenses
()
{
// Do not include any licenses, because we're a test, and the LICENSE file
// doesn't get generated for tests.
}
/// Whether there is currently a test executing.
bool
get
inTest
;
...
...
@@ -898,13 +905,6 @@ class AutomatedTestWidgetsFlutterBinding extends TestWidgetsFlutterBinding {
binding
.
mockFlutterAssets
();
}
@override
// ignore: MUST_CALL_SUPER
void
initLicenses
()
{
// Do not include any licenses, because we're a test, and the LICENSE file
// doesn't get generated for tests.
}
FakeAsync
?
_currentFakeAsync
;
// set in runTest; cleared in postTest
Completer
<
void
>?
_pendingAsyncTasks
;
...
...
packages/flutter_tools/test/integration.shard/test_test.dart
View file @
08154b22
...
...
@@ -209,10 +209,6 @@ void main() {
}
expect
(
result
.
exitCode
,
0
);
});
testWithoutContext
(
'integration test can show the license page'
,
()
async
{
return
_testFile
(
'license'
,
automatedTestsDirectory
,
integrationTestDirectory
,
exitCode:
isZero
,
extraArguments:
integrationTestExtraArgs
);
});
}
Future
<
void
>
_testFile
(
...
...
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