Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify is not reported as Failure in Cucumber_Report.json, subsequently we are not seeing the step as failure in cucumber html report #255

Open
ArjunReddyKorandla opened this issue Nov 3, 2021 · 0 comments

Comments

@ArjunReddyKorandla
Copy link

ArjunReddyKorandla commented Nov 3, 2021

I have a simple google.feature file which launches google , verify title and checks for the presence of search box.

// wantedly making the title to expect "Googlie" instead of "Google" and in the step-definitions I have used "Verify" consciously so my test proceeds further and I expect the tests to proceed with next steps and once the test is completed I should see 1 failure and 3 steps passed.

********************************************************** Feature file********************************
Feature: Google Search
Scenario: Searching Google
Given I open Google's search page
Then the title is "Googlie"
Then the title is "Google"
Then the title is "Google"
And the Google search form exists

******************step-definitions/google.js

const { client } = require('nightwatch-api');
const { Given, Then, When } = require('cucumber');

Given(/^I open Google's search page$/, () => {
return client.url('http://google.com').waitForElementVisible('body', 1000);
});

Then(/^the title is "([^"]*)"$/, title => {
return client.verify.title(title); // consciously used verify
});

Then(/^the Google search form exists$/, () => {
return client.assert.visible('input[name="q"]');
});


image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant