attachmentPath function

Future<void> attachmentPath(
  1. String name,
  2. String path, {
  3. required String contentType,
  4. String? fileExtension,
  5. bool wrapInStep = true,
  6. int? timestamp,
})

Adds an attachment from a filesystem path to the current test.

Implementation

Future<void> attachmentPath(
  String name,
  String path, {
  required String contentType,
  String? fileExtension,
  bool wrapInStep = true,
  int? timestamp,
}) {
  return _globalTestRuntime.send(
    RuntimeMessage(
      type: 'attachment_path',
      data: <String, Object?>{
        'name': name,
        'path': path,
        'contentType': contentType,
        'fileExtension': fileExtension,
        'wrapInStep': wrapInStep,
        'timestamp': timestamp,
      },
    ),
  );
}