Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
ramaaneel
@ramaaneel
Hello guys. I am facing an issue while creating protractor test with cucumber. I have 2 assertions in two different block. My first block assertion was failed (intentionally i make it as failed). My last then block was skipped.But I want to continue my all test steps even if it is pass or fail (then definitely i think i have to use soft assert).In testng we have a class called softassert. Is there something available here as well similar to that one. I am using chai package for assertion purpose
image.png
image.png
My requirement is it to execute all blocks whether if it pass or fail
TIA
jain-neeeraj
@jain-neeeraj
@ricardgarcia hi
can you share you conf file for wdio cucumber project?
Danilo Arantes
@d4niloArantes
Hi! I'm trying to write BDD scenarios in my native language (Portuguese) using cucumber-js. I have set my .feature file with the header '# language: pt' and translated all the words. Now the question is: How do I require { Given, When, Then } in portuguese inside my step definition file. From this: 'const { Given, When, Then } = require("cucumber");' to this 'const { Dado, Quando, Entao } = require("cucumber");'
image.png
When I tryed here I got this:
Miguel
@miguelsantos500
@d4niloArantes Given, When, Then are special Cucumber words and cannot be changed, as far as I'm aware
Danilo Arantes
@d4niloArantes
It can be done using Ruby...
ruby_example.jpeg
Miguel
@miguelsantos500

Didn't know, always learning something. You should try this then:

const { Given:Dado, When:Quando, Then:Entao } = require("cucumber");
Quando(/^Eu fizer login$/, function () {
//...
});

This is called object destructuring, while assigning to new names: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#Assigning_to_new_variable_names

But this actually doesn't change anything Cucumber related, it only lets you declare the step in Portuguese. Cucumber will probably search the Gherkin file for all translations

Danilo Arantes
@d4niloArantes
huuuum interesting... maybe cucumber-js does not have support to do it. I'm gonna try it out later. Thanks for the help
Danilo Arantes
@d4niloArantes
Worked perfectly!!! haha
Miguel
@miguelsantos500
Yeah, Cucumber, under the hood, probably looks for all translations
Leo Li
@yuxli066
has anyone used the visual regression service in wdio with cucumber.js?
Danilo Arantes
@d4niloArantes
nope...
Leo Li
@yuxli066
does anyone use webdriverCSS?
Leo Li
@yuxli066
has anyone ported to v5 yet for cucumberJS?
I am having some issues porting
importing*
image.png
it does not see like an es6 issue because the import keyword is recognized
Miguel
@miguelsantos500
@yuxli066 , that's a question for another channel, https://gitter.im/webdriverio/webdriverio
Leo Li
@yuxli066
do tags not work in cucumberJS in v5?
instead of TagExpression it is not Tags?
Leo Li
@yuxli066
Can someone please tell me what this is, for the life of me i cannot figure out but it started to appear in my spec report after I upgraded to v5
image.png
vinilnarayan
@vinilnarayan
hi all,
Is it possible to integrate galen with cucumber ?
if anyone done this, plz share the details...
Danilo Arantes
@d4niloArantes
Do you guys have suggestions for articles about the world.js??
Samuel Roldan
@sam3k
Hi all, question, I am wondering why, when I run cucumber in the CLI, it does not exit after it runs all the tests. Do i need to run something set something in the config?
Danilo Arantes
@d4niloArantes
Have you configured the "after method" into the hooks.js?
Samuel Roldan
@sam3k
No I have not. I’ve only configured the After method on cucumber.conf.js. Not sure if the same?
I see the this.driver.quit(); but it does not seem to apply for chromedriver
Leo Li
@yuxli066
Hi all, what reporting service do you guys use for cucumberJS in v5?
Leo Li
@yuxli066
Hi all, is anyone experiencing allure report issues with v5 cucumberJS?
Thomas G Henry
@ThomasGHenry
Hey, folks. My tests appear to run and pass, but cucumber never returns. I'm new to cucumber and the debugging doc is just a stub. Where should I begin to look to resolve this? I should point out that my tests use async/await in case that matters.
Thanks in advance
const { Given, When, Then } = require('cucumber');
const app = require('../../lib/app');
const request = require('supertest');

Given('server is running', function() {
  console.log('assume server is running');
});

When(
  'user posts to upload endpoint',
  { timeout: 1 * 60 * 1000 },
  async function() {
    await request(app)
      .post('/uploads')
      .set('Accept', 'application/json')
      .attach('photo', 'test/testimage.jpg')
      .expect(200);
  }
);

Then('image is downloadable', async function() {
  await request(app)
    .get('/uploads/testimage.jpg')
    .set('Accept', 'application/json')
    .expect(200);
});
app is an expressjs instance
Arkadiusz Buchholz
@arkbuchholz
hello, is it possible to fetch logins and passwords from external file? I don't like idea of hardcoding creentials...
Leo Li
@yuxli066
you can use the .env file to do what you want to do
Rahul Kuntoji
@Rahul-Kuntoji
Hello, I am not able to get the step description using the afterStep hook.
Kārlis Amoliņš
@kamolins
Heyo. I am unable to find anything in the docs about listening to cuke events. The only information I can find on the web is old aka defineSupportCode which is deprecated now. I am on v5.1.0 and using TS. Any pointers would be most welcome