Import and export Logs
Summary: This diff adds import and export support for the logs plugin Reviewed By: danielbuechele Differential Revision: D13958713 fbshipit-source-id: a072de025f0b959302175ef0ccaf763ca41377e9
This commit is contained in:
committed by
Facebook Github Bot
parent
e5151b9994
commit
c28ef62f07
@@ -5,16 +5,30 @@
|
||||
* @format
|
||||
*/
|
||||
import BaseDevice from './BaseDevice.js';
|
||||
import type {DeviceType, OS, DeviceShell} from './BaseDevice.js';
|
||||
import type {
|
||||
DeviceType,
|
||||
OS,
|
||||
DeviceShell,
|
||||
DeviceLogEntry,
|
||||
} from './BaseDevice.js';
|
||||
|
||||
export default class ArchivedDevice extends BaseDevice {
|
||||
constructor(serial: string, deviceType: DeviceType, title: string, os: OS) {
|
||||
constructor(
|
||||
serial: string,
|
||||
deviceType: DeviceType,
|
||||
title: string,
|
||||
os: OS,
|
||||
logEntries: Array<DeviceLogEntry>,
|
||||
) {
|
||||
super(serial, deviceType, title);
|
||||
this.os = os;
|
||||
this.logs = logEntries;
|
||||
}
|
||||
|
||||
logs: Array<DeviceLogEntry>;
|
||||
|
||||
getLogs() {
|
||||
return [];
|
||||
return this.logs;
|
||||
}
|
||||
|
||||
spawnShell(): ?DeviceShell {
|
||||
|
||||
@@ -41,6 +41,7 @@ export type DeviceExport = {|
|
||||
title: string,
|
||||
deviceType: DeviceType,
|
||||
serial: string,
|
||||
logs: Array<DeviceLogEntry>,
|
||||
|};
|
||||
|
||||
export type OS = 'iOS' | 'Android' | 'Windows';
|
||||
@@ -80,6 +81,7 @@ export default class BaseDevice {
|
||||
title: this.title,
|
||||
deviceType: this.deviceType,
|
||||
serial: this.serial,
|
||||
logs: this.getLogs(),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user