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

Exception handling in steps with tables for [gauge js] #2200

Open
zabil opened this issue Jan 28, 2022 Discussed in #2199 · 0 comments
Open

Exception handling in steps with tables for [gauge js] #2200

zabil opened this issue Jan 28, 2022 Discussed in #2199 · 0 comments

Comments

@zabil
Copy link
Member

zabil commented Jan 28, 2022

Discussed in #2199

Originally posted by ademant January 28, 2022
According to your description (https://docs.gauge.org/writing-specifications.html?os=macos&language=javascript&ide=vscode#step-implementations) I wrote following step definition to check all input fields on a site:

step("Check field and value via table <table>",
  async function (table) {
      table.entries(function(entry) {
        checkName(driver,entry["value"],entry["field"]);
      });
  }
);

In a scenario I like to use it as followed:

* Check field and value via table
| field | value |
|----|----|
| name | test |
| description | Description |

If values differ from expected value the step does not give an error, but gives a green check. I tried several tricks, changing to sync functions, use try/catch statements, used .catch functions, but none worked. Differing values are accepted with the test.

Environment:
Ubuntu Impish
Gauge 1.4.3
html-report 4.1.4
js 2.4.0
json-report 0.3.6

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

No branches or pull requests

1 participant