@dhlab/e2e-autogen
Version:
Google 스프레드시트 기반 시나리오를 Playwright 테스트 스텁 코드로 자동 생성하고, 테스트 실행 결과를 다시 시트에 업데이트하는 CLI 도구
26 lines (25 loc) • 1.23 kB
JavaScript
var _GenerateCommand_config;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GenerateCommand = void 0;
const tslib_1 = require("tslib");
const google_spreadsheets_1 = require("../google-spreadsheets");
const test_scribe_1 = require("../test-scribe");
const base_command_1 = require("./base-command");
/**
* Google Sheets에서 스텁 코드를 생성하는 명령어를 수행한다.
*/
class GenerateCommand extends base_command_1.BaseCommand {
constructor(config) {
super();
_GenerateCommand_config.set(this, void 0);
tslib_1.__classPrivateFieldSet(this, _GenerateCommand_config, config, "f");
}
async execute() {
const { sheetsUrl, credentialsFile, stubOutputFolder, framework, googleSheetColumns, } = tslib_1.__classPrivateFieldGet(this, _GenerateCommand_config, "f");
const googleSpreadsheets = await (0, google_spreadsheets_1.authorizedGoogleSpreadsheets)(sheetsUrl, credentialsFile, googleSheetColumns);
const testScribe = new test_scribe_1.TestScribe(googleSpreadsheets, stubOutputFolder);
await testScribe.generateStubFor(framework);
}
}
exports.GenerateCommand = GenerateCommand;
_GenerateCommand_config = new WeakMap();