Skip to content

Move end-to-end tests into their own directory #2322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ import 'package:dartdoc/dartdoc.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';

import '../tool/subprocess_launcher.dart';
import 'src/utils.dart';
import '../../tool/subprocess_launcher.dart';
import '../src/utils.dart';

Uri get _currentFileUri =>
(reflect(main) as ClosureMirror).function.location.sourceUri;
String get _testPackagePath =>
path.fromUri(_currentFileUri.resolve('../testing/test_package'));
String get _testPackageFlutterPluginPath => path
.fromUri(_currentFileUri.resolve('../testing/test_package_flutter_plugin'));
path.fromUri(_currentFileUri.resolve('../../testing/test_package'));
String get _testPackageFlutterPluginPath => path.fromUri(
_currentFileUri.resolve('../../testing/test_package_flutter_plugin'));

void main() {
group('Invoking command-line dartdoc', () {
Expand Down Expand Up @@ -210,8 +210,8 @@ void main() {
}, timeout: Timeout.factor(2));

test('--footer-text excludes version', () async {
var _testPackagePath = path
.fromUri(_currentFileUri.resolve('../testing/test_package_options'));
var _testPackagePath = path.fromUri(
_currentFileUri.resolve('../../testing/test_package_options'));

var args = <String>[dartdocPath, '--output', tempDir.path];

Expand Down
2 changes: 1 addition & 1 deletion test/dartdoc_test.dart → test/end2end/dartdoc_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'package:dartdoc/src/warnings.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';

import 'src/utils.dart';
import '../src/utils.dart';

final _resourceProvider = pubPackageMetaProvider.resourceProvider;
final _pathContext = _resourceProvider.pathContext;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import 'package:dartdoc/src/warnings.dart';
import 'package:path/path.dart' as path;
import 'package:test/test.dart';

import 'src/utils.dart' as utils;
import '../src/utils.dart' as utils;

// Init a generator without a GeneratorContext and with the default file writer.
Future<Generator> _initGeneratorForTest() async {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'package:dartdoc/src/special_elements.dart';
import 'package:pub_semver/pub_semver.dart';
import 'package:test/test.dart';

import 'src/utils.dart' as utils;
import '../src/utils.dart' as utils;

final String _platformVersionString = Platform.version.split(' ').first;
final Version _platformVersion = Version.parse(_platformVersionString);
Expand Down
2 changes: 1 addition & 1 deletion test/model_test.dart → test/end2end/model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import 'package:dartdoc/src/special_elements.dart';
import 'package:dartdoc/src/warnings.dart';
import 'package:test/test.dart';

import 'src/utils.dart' as utils;
import '../src/utils.dart' as utils;

final _testPackageGraphMemo = AsyncMemoizer<PackageGraph>();
Future<PackageGraph> get _testPackageGraph =>
Expand Down