TF-3493 Refactor integration test code for performance and maintainability
Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
@@ -1,24 +1,9 @@
|
||||
import '../../base/test_base.dart';
|
||||
import '../../scenarios/download_all_attachments_scenario.dart';
|
||||
import '../../scenarios/login_with_basic_auth_scenario.dart';
|
||||
|
||||
void main() {
|
||||
TestBase().runPatrolTest(
|
||||
description: 'Should see save dialog when download all attachments successfully',
|
||||
test: ($) async {
|
||||
final loginWithBasicAuthScenario = LoginWithBasicAuthScenario($,
|
||||
username: const String.fromEnvironment('USERNAME'),
|
||||
hostUrl: const String.fromEnvironment('BASIC_AUTH_URL'),
|
||||
email: const String.fromEnvironment('BASIC_AUTH_EMAIL'),
|
||||
password: const String.fromEnvironment('PASSWORD'),
|
||||
);
|
||||
|
||||
final downloadAllAttachmentsScenario = DownloadAllAttachmentsScenario($,
|
||||
loginWithBasicAuthScenario: loginWithBasicAuthScenario,
|
||||
attachmentContents: ['file1', 'file2', 'file3'],
|
||||
);
|
||||
|
||||
await downloadAllAttachmentsScenario.execute();
|
||||
}
|
||||
scenarioBuilder: ($) => DownloadAllAttachmentsScenario($),
|
||||
);
|
||||
}
|
||||
@@ -1,23 +1,9 @@
|
||||
import '../../base/test_base.dart';
|
||||
import '../../scenarios/login_with_basic_auth_scenario.dart';
|
||||
import '../../scenarios/no_disposition_inline_scenario.dart';
|
||||
|
||||
void main() {
|
||||
TestBase().runPatrolTest(
|
||||
description: 'Should see base64 inline image when attachment has no disposition but has cid',
|
||||
test: ($) async {
|
||||
final loginWithBasicAuthScenario = LoginWithBasicAuthScenario($,
|
||||
username: const String.fromEnvironment('USERNAME'),
|
||||
hostUrl: const String.fromEnvironment('BASIC_AUTH_URL'),
|
||||
email: const String.fromEnvironment('BASIC_AUTH_EMAIL'),
|
||||
password: const String.fromEnvironment('PASSWORD'),
|
||||
);
|
||||
|
||||
final noDispositionInlineScenario = NoDispositionInlineScenario($,
|
||||
loginWithBasicAuthScenario: loginWithBasicAuthScenario,
|
||||
);
|
||||
|
||||
await noDispositionInlineScenario.execute();
|
||||
}
|
||||
scenarioBuilder: ($) => NoDispositionInlineScenario($),
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user