UNPKG

artes

Version:

The simplest way to automate UI and API tests using Cucumber-style steps.

21 lines (19 loc) 580 B
const { addElements } = require("./elementController"); const cucumberConfig = require("../../../cucumber.config"); const fs = require("fs"); function pomCollector() { if (fs.existsSync(cucumberConfig.default.pomPath)) { fs.readdir(`${cucumberConfig.default.pomPath}`, (err, files) => { files.forEach((file) => { fs.readFile( `${cucumberConfig.default.pomPath}/${file}`, "utf-8", (err, content) => { addElements(JSON.parse(content)); }, ); }); }); } } module.exports = { pomCollector };