I was trying to run a sample test in cucumber protractor javascript tests. But it is returning 0 scenarios.Could someone please look into my code pasted below.
sample_scenario.feature
Feature: To test version
@test
Scenario: To test the UI version of OFP
Given a verification order is created
| orderOrigin | OFX4 |
| orderType | VOE |
| isNewEmployer | true |
| verifierClient | default |
Given OFP is used by "ldap" user
And the version is verified
ofp_order_processing_steps.js
let ofpHomePage = require('../../pages/ofp_pages/task_pages/ofp_home_page');
Given(/^the version is verified$/, { timeout: 720 * 1000 }, function () {
return ofpHomePage.verifyVersion(this.verificationOrder.preProcessingData.employee);
});
ofp_home_page.js
let OfpTaskBasePage = require('./ofp_task_base_page');
class ofpHomePage extends OfpTaskBasePage {
constructor() {
super();
this.uiVersion = element(by.xpath('//*[@id="container"]/sd-home/efx-footer/footer/div/div[3]/p[1]'));
}
verifyVersion(employee) {
return browser.wait(this.isVisible(this.uiVersion))
.then(() => {
expect(this.uiVersion.getText()).to.eventually.equal(employee.uiVersion);
});
}
}
module.exports = new ofpHomePage();