Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 08:58
    viper3400 commented #746
  • 06:16
    Krithikmano opened #746
  • 05:53
    renovate[bot] edited #738
  • 05:53
    renovate[bot] synchronize #738
  • 05:53

    renovate[bot] on configure

    Add renovate.json (compare)

  • 05:22
    dependabot[bot] labeled #745
  • 05:22
    dependabot[bot] opened #745
  • 05:22

    dependabot[bot] on npm_and_yarn

    chore(deps): bump chai from 4.3… (compare)

  • 05:13

    dependabot[bot] on npm_and_yarn

    chore(deps-dev): bump lerna fro… (compare)

  • 05:13
    dependabot[bot] labeled #744
  • 05:13
    dependabot[bot] opened #744
  • Mar 02 18:00

    jan-molak on gh-pages

    Updates (compare)

  • Mar 02 17:33

    jan-molak on master

    Update the-trouble-with-test-sc… Merge pull request #743 from ma… (compare)

  • Mar 02 17:33
    jan-molak closed #743
  • Mar 02 17:33
    jan-molak commented #743
  • Mar 02 12:48
    jan-molak labeled #741
  • Mar 02 12:48
    jan-molak commented #741
  • Mar 02 10:01
    sumithkhandelwal commented #281
  • Mar 02 07:43
    manuelfidalgo opened #743
  • Mar 02 07:39
    renovate[bot] edited #738
rakeshnambiar
@rakeshnambiar
no
Jan Molak
@jan-molak
Ok, I'd also suggest using a long term support version of node, latest one is 14
Version 13 (as well as any other odd version) is experimental, so I wouldn't recommend it for production
rakeshnambiar
@rakeshnambiar
I used the latest version before then downgraded to 13 to make-sure the node latest version is not creating the issue
:)
Jan Molak
@jan-molak
☺️
rakeshnambiar
@rakeshnambiar
switch back to node v14.2.0 and npm 6.14.4 but same result
WARNING: An illegal reflective access operation has occurred - Is this common ?
Jan Molak
@jan-molak
I can reproduce the issue on Win 10, let me have a look at what's going on
rakeshnambiar
@rakeshnambiar
thanks a lot @jan-molak
Jan Molak
@jan-molak
Could you clone the latest version and re-test, please?
(looks like dependabot has updated package.json but not package-lock.json in the template project, so serenity-bdd reporter was pulling in an older version of core)
rakeshnambiar
@rakeshnambiar
sure, thanks for solving it. I will try and let you know
image.png
It looks perfect now
Jan Molak
@jan-molak
let me know how it goes with migrating to S/JS 2 - we have an upgrade guide at https://serenity-js.org/handbook/integration/upgrading-to-serenity-js-2.html
rakeshnambiar
@rakeshnambiar
Hi @jan-molak into the template project I just copy pasted the javascript - pageobject model based legacy script and ended up with the error Error: Error: Cannot find module 'unicode-13.0.0/Binary_Property/ID_Start/code-points.js' - Is this somehow connected to the serenityJS framework?
30 replies
Jan Molak
@jan-molak

Hey folks! Serenity/JS 2.19 adds two new interfaces to Abilities: Initialisable and Discardable.

Any custom Abilities you create that implement those interfaces will be initialised by Serenity/JS before the actor starts to perform their activities, and discarded when the scenario finishes (if the actor was instantiated in scenario scope), or when the entire test run finishes (if the actor was initialised in beforeAll-style hook).

Here's an example of using those new features to make a Serenity/JS test interact with a PostgreSQL DB - https://serenity-js.org/modules/core/class/src/screenplay/Ability.ts~Ability.html

Take this new version for a spin and let me know what you think :-) I can't wait to see what you integrate your tests with!

Eric Tavela
@etavela

Hi folks - new supporter here migrating over from the Java world of Serenity BDD. Very thankful this project exists - I've just started incorporating it as my REST integration test step in a Kubernetes microservice build pipeline.

I wanted to ask what do you find is the best approach to pass in the base URL for REST tests in this kind of scenario where the URL is not known ahead of time? For now I'm going to extract it from an environment variable and default to localhost:8080 but wondered if there was more sophisticated handling for REST defaults, etc. Thanks!

Jan Molak
@jan-molak
Hi @etavela, welcome!
Is this a REST-only scenario? Or are you interacting with some UI too?
Eric Tavela
@etavela
Thanks! Yeah, REST only in this case. I'll be setting up web-based functional tests down the road, but this scenario is per-service and REST only.
Jan Molak
@jan-molak
Cool! Make sure to check out the REST testing example in the main repo.
Regarding your question, there are several ways to configure the CallAnApi ability.
13 replies
Andreas Worm
@globalworming
Nooo @etavela how could you abondon us! Traitor! 😁 Seriously though, kudos to @jan-molak for handling the JS side of serenity so well
3 replies
Nywlem
@Nywlem
Hello Folks, I have an issue with IE11 browser alone, where the Navigate.to(url) does not work in the second iteration
3 replies
Josh McVey
@y3rsh_gitlab
Hello, is there an easy way to grab the name of the current scenario/scenario outline from cucumber in the middle of a test?
Jan Molak
@jan-molak
What are you trying to do? @y3rsh_gitlab
Josh McVey
@y3rsh_gitlab
I am pushing data to a Database and I would like to record which test (scenario) called the interaction as the scenario name is a unique identifier for us
Jan Molak
@jan-molak
You could get it in a Before hook and then make the actor take a note of it, perhaps?
Another option is to write a custom StageCrewMember and get scenario name from Serenity events
Josh McVey
@y3rsh_gitlab
Awesome ty, got me going in the right direction. I was able to get what I wanted in the hooks Before and take note of it.
I typed this below so it may be missing something but for posterity:
const ScenarioName = (scenario: HookScenarioResult) =>
    Question.about('The name of the scenario', actor => scenario.pickle.name);

Before( scenario => actorCalled('User').attemptsTo(
    MaximizeBrowser.start(),
    TakeNote.of(ScenarioName(scenario)).as('scenarioName'),
));

// code in an async interaction gets the name to use
const scenarioName: string = await actorCalled('User').answer(Note.of('scenarioName'));
Jan Molak
@jan-molak
Nice one!
By the way, there's a built in interaction to resize browser window if you need it https://serenity-js.org/modules/protractor/class/src/screenplay/interactions/ResizeBrowserWindow.ts~ResizeBrowserWindow.html
Jan Molak
@jan-molak

Hey folks! I've added a neat little Question in version 2.19.5, it's called q and works just like string templates, but with other Serenity/JS questions:

 import { q, actorCalled } from '@serenity-js/core';
 import { Send, DeleteRequest } from '@serenity-js/rest';

 actorCalled('Alice').attemptsTo(
     Send.a(DeleteRequest.to(
         q `/articles/${ Text.of(Article.id()) }`  
     ))
 )

Thoughts and feedback welcome!

Also, @cnishina (Angular/Protractor team) will be giving an update on some cool new features coming up for Protractor on his Twitch channel on the 18th of December - twitch.tv/cnishina
eyesopen
@eyesopen

Hi, is there a #result or something that can be used in the question string to display value of the question? i can only see #actor... i am trying to write a question that can be chained like tasks

class DateText extends Question {
  static of(target) {
    return new DateText(target);
  }

  as(dateFormat) {
    this.dateFormat = dateFormat;
    return this;
  }

  constructor(target) {
    super();
    this.target = target;
  }

  async performAs(actor) {
    /*more fancy stuff here*/
    const result = '2020/12/15';
    return result;
  }

}

but without toString method this throws and exception in formatter. If i return const string then it is being used in the calling Ensure as value...

9 replies
Jan Molak
@jan-molak
Hey folks! I've updated the Cucumber project template and would love to hear your thoughts - https://github.com/serenity-js/serenity-js-cucumber-protractor-template
2 replies
ssrinivasKG
@ssrinivasKG
new to serenity-js here
was wondering if the action class based approach exists in Serenity-JS or is Screenplay the only supported approach?
Jan Molak
@jan-molak
Hi @ssrinivasKG, welcome! Could you give an example of what you have in mind?
ssrinivasKG
@ssrinivasKG
Hey @jan-molak, thanks for the welcome! :) im looking at the serenity-bdd ScenarioSteps equivalent i suppose in Serenity-Js
8 replies
Jan Molak
@jan-molak
Merry Christmas everyone!🎄
1 reply
Anthony Browness
@demos74dx
test?
@jan-molak hi
Jan Molak
@jan-molak
Welcome, @demos74dx!
Kyrie Irving
@mnajibb_twitter
Hi @jan-molak , im new to serenityJs, currently want to do some research on how to integrate SerenityJS with appium (emulator, real device and device farm) and integrate also with CI/CD, do you have any suggestion where can i start my journey first? thank you very much!!!
3 replies
ssrinivasKG
@ssrinivasKG
anyone here attempted to do a Serenity-JS Allure reporting setup?
3 replies
Nywlem
@Nywlem
Need help to capture css value inherited by parent element of the target element.
1 reply