skekauoha / salty-cypress-testrail-reporter

MIT License
5 stars 21 forks source link

TypeError: Cannot read property 'description' of undefined #14

Open ad9999 opened 2 years ago

ad9999 commented 2 years ago

Version we have installed "salty-cypress-testrail-reporter": "^1.4.0",

Looks like an issue on the following line

_this.runId = response.data[0].id;

which should be

_this.runId = response.data.runs[0].id;

ad9999 commented 2 years ago

Not sure if related but the documentation mentions about API EP changes

https://discuss.gurock.com/t/bulk-api-endpoint-changes-coming-soon/19537

ad9999 commented 2 years ago

One more change would be,

From

_this.lastRunDate = response.data[0].description;

To,

_this.lastRunDate = response.data.runs[0].description;

ad9999 commented 2 years ago

Just realized that the code in Git and one we have in package which we can also explore through doesnt match. Are we missing anything ?

https://npm.runkit.com/salty-cypress-testrail-reporter/dist/testrail.js?t=1632787129742