Skip to content

Commit

Permalink
update ids from branch support
Browse files Browse the repository at this point in the history
  • Loading branch information
DavertMik committed Mar 21, 2024
1 parent a7a02b8 commit 49b6b4b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bin/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ program
await resp;
console.log('Updating test IDs...');
if (apiKey) {
reporter.getIds().then(idMap => {
reporter.getIds({ branch }).then(idMap => {
const updatedFiles = updateFiles(features, idMap, opts.dir || process.cwd());
console.log(`${updatedFiles.length} Files updated`);
});
Expand Down
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 0.5.19

* Added importing to branch

# 0.5.18

* Fixed using non-standard tags for scenarios and features
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "check-cucumber",
"version": "0.5.18",
"version": "0.5.19",
"main": "index.js",
"repository": "git@github.com:testomatio/check-cucumber.git",
"author": "Koushik Mohan <koushikmohan1996@gmail.com>",
Expand Down
6 changes: 4 additions & 2 deletions reporter.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ class Reporter {
return this.isCodecept ? 'codeceptjs' : 'Cucumber';
}

getIds() {
getIds(opts = {}) {
return new Promise((res, rej) => {
const req = request(`${URL.trim()}/api/test_data?api_key=${this.apiKey}`, { method: 'GET' }, (resp) => {
const params = new URLSearchParams(opts).toString();

const req = request(`${URL.trim()}/api/test_data?api_key=${this.apiKey}&${params}`, { method: 'GET' }, (resp) => {
// The whole response has been received. Print out the result.
let message = '';

Expand Down

0 comments on commit 49b6b4b

Please sign in to comment.