Skip to content

DOCS(#2982) allure createStep public API description #3104

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

Merged
merged 5 commits into from
Feb 3, 2022
Merged

DOCS(#2982) allure createStep public API description #3104

merged 5 commits into from
Feb 3, 2022

Conversation

EgorBodnar
Copy link
Contributor

@EgorBodnar EgorBodnar commented Oct 29, 2021

Motivation/Description of the PR

Applicable helpers:

  • WebDriver
  • Puppeteer
  • Nightmare
  • REST
  • FileHelper
  • Appium
  • Protractor
  • TestCafe
  • Playwright

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@EgorBodnar
Copy link
Contributor Author

@DavertMik Hi!
Is there any ways to type a plugin not including it into the index.js?
If so, I could do it for allure plugin as part of this PR.

@Arhell Arhell requested a review from DavertMik October 29, 2021 10:41
@DavertMik
Copy link
Contributor

@EgorBodnar sorry, didn't get question. Write to me in Slack, I will try to answer there.

I would really love to see it working like this:

allure.createStep('I do something important', () => {
  I.amOnPage('/');
  I.click('Important link');
  // ....
})

So to wrap CodeceptJS actions into the allure step. Do you think it is possible?

@EgorBodnar
Copy link
Contributor Author

@DavertMik added the required option, but also left the old one.
Here is an example when why it is necessary:
https://github.com/EgorBodnar/rest-axios-codeceptjs-allure-docker-test-example/blob/main/utils/HttpService.ts
The built-in functionality of the concepts is not enough for me to make backend requests and test them, so I use Axios. Codeceptjs acts as a test runner and as an aggregator of integration plugins, reports (allure, TestRail etc.)

@DavertMik
Copy link
Contributor

@EgorBodnar, ok, I got it...
If I would implement it I would move these Http calls int a custom helper, so a step would be created from it and allure step as well...

@EgorBodnar
Copy link
Contributor Author

@DavertMik Yes, that's right.
In my example(github link), just the implementation of the helper through which I send requests.

@EgorBodnar
Copy link
Contributor Author

I think I'll add typing in another PR. If everything is ok with this PR, can we merge it?

@EgorBodnar
Copy link
Contributor Author

@EgorBodnar sorry, didn't get question. Write to me in Slack, I will try to answer there.

I would really love to see it working like this:

allure.createStep('I do something important', () => {
  I.amOnPage('/');
  I.click('Important link');
  // ....
})

So to wrap CodeceptJS actions into the allure step. Do you think it is possible?

Nope.
At least at BDD tests it doesn't work properly.
The hierarchy is not respected and step chaos ensues.

@DavertMik DavertMik merged commit 93f2e20 into codeceptjs:3.x Feb 3, 2022
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

Successfully merging this pull request may close these issues.

3 participants