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

(feature): Allow create Nested steps from test code #113

Open
BorisOsipov opened this issue Mar 7, 2020 · 3 comments
Open

(feature): Allow create Nested steps from test code #113

BorisOsipov opened this issue Mar 7, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@BorisOsipov
Copy link
Owner

Allow create steps from code.

Example:

step("Given I open the site /", () => {
	// some code
})
step("When I click on the element #textinput", () => {
	// some code
})
step("Then I expect that element #textinput is focused", () => {
	// some code
})

Should produce nested steps in RP:

image

@BorisOsipov BorisOsipov added the enhancement New feature or request label Mar 7, 2020
@BorisOsipov
Copy link
Owner Author

Also it will be nice to have some typescript decorators for PageObject methods.

export class LoginPage {
    @Step("Login to app by login {{0}} and password {{1}}")
    public login(login: string, password: string) {
      // some code
    }
}

and call LoginPage().login("foo", "bar") should produce step in Report Portal as on screen above.

@balukov
Copy link

balukov commented Aug 24, 2020

I am looking forward to this feature.

@balukov
Copy link

balukov commented Dec 14, 2020

one more example do it like allure reporter

const rpReporter = require('wdio-reportportal-reporter');

class popup {

    ...

  save() {
    rpReporter.startStep('click Save');
    this.save().click();
    this.agree().click();
    rpReporter.endStep();
  }
}

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

No branches or pull requests

2 participants