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

Problem with EnhanceCapabilitiesWithFixtures #2962

Closed
luanqauto opened this issue Nov 3, 2022 · 2 comments
Closed

Problem with EnhanceCapabilitiesWithFixtures #2962

luanqauto opened this issue Nov 3, 2022 · 2 comments

Comments

@luanqauto
Copy link

luanqauto commented Nov 3, 2022

serenity.version 3.3.10
I want to add capabilities by implemented FixtureService. However

  • in "ChromeDriverProvider" class, at line "EnhanceCapabilitiesWithFixtures.using(fixtureProviderService).into(enhancedOptions)" > enhancedOptions cannot get options that I added by implemented FixtureService.

  • by debugging, I see some problems in methods
    public T into(MutableCapabilities options) {
    applyFixturesTo(options);
    return (T) options; // --> this return the original options (empty options), not the options after executed by "applyFixturesTo(options)"
    }

    private void applyFixturesTo(MutableCapabilities options) {
    fixtureProviderService.getFixtureServices().forEach(
    fixtureService -> fixtureService.addCapabilitiesTo(options)
    );
    }
    image

>> So the method "applyFixturesTo(MutableCapabilities options)" should return the options that were implemented by "FixtureService"

@wakaleo
Copy link
Member

wakaleo commented Nov 3, 2022

Thanks for spotting this. Could you make the change locally and test with a snapshot build, and if it works to your satisfaction propose a PR?

@wakaleo
Copy link
Member

wakaleo commented Nov 7, 2022

I took a look at the code - applyFixturesTo doesn't return a value, it just acts on the options passed to it, so this part of the code behaves as expected.

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

No branches or pull requests

2 participants