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

feat: allow selenium server with internal webserver #621

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

daFish
Copy link

@daFish daFish commented Jan 18, 2024

Implements #590 by @dkarlovi.

This change allows the usage of an external selenium instance (e.g. via docker compose) to test against the internal webserver.

Todos:

  • Tests
  • Documentation

@dkarlovi
Copy link

permission of @dkarlovi

What "permission", thank you so much for working on this! \o/ :smile:

@daFish
Copy link
Author

daFish commented Jan 18, 2024

Coding Standards fails seem unrelated.

@dkarlovi Ok, let's rephrase it then. 😄

@dkarlovi
Copy link

dkarlovi commented Mar 1, 2024

@daFish this looks completed to me, why did you leave is as a draft?

@daFish daFish force-pushed the feat/selenium-devserver branch from db389e2 to 55dad6c Compare March 4, 2024 09:04
@daFish
Copy link
Author

daFish commented Mar 4, 2024

@daFish this looks completed to me, why did you leave is as a draft?

I made a small info in the README about it. I will remove the draft status and this is good to go.

@daFish daFish marked this pull request as ready for review March 4, 2024 09:06
@daFish
Copy link
Author

daFish commented Jun 19, 2024

@dunglas Is there anything missing here so it can be merged?

@daFish daFish force-pushed the feat/selenium-devserver branch 2 times, most recently from 1d1929e to 8a59fd8 Compare June 19, 2024 18:01
@daFish
Copy link
Author

daFish commented Jun 19, 2024

Not sure if the coding standards issues are related. Running the check locally revealed issues in 10 files.

@@ -185,7 +185,9 @@ protected static function createPantherClient(array $options = [], array $kernel

if (PantherTestCase::FIREFOX === $browser) {
self::$pantherClients[0] = self::$pantherClient = Client::createFirefoxClient(null, $browserArguments, $managerOptions, self::$baseUri);
} else {
} elseif (PantherTestCase::SELENIUM === $browser) {
self::$pantherClients[0] = self::$pantherClient = Client::createSeleniumClient($managerOptions['host'], $managerOptions['capabilities'], self::$baseUri, $options);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
self::$pantherClients[0] = self::$pantherClient = Client::createSeleniumClient($managerOptions['host'], $managerOptions['capabilities'], self::$baseUri, $options);
self::$pantherClients[0] = self::$pantherClient = Client::createSeleniumClient($managerOptions['host'], $managerOptions['capabilities'] ?? null, self::$baseUri, $options);

Or you need to validate the manager options to enforce the key is defined.

and for host, you probably need to validate it as well.

Also, passing $options looks inconsistent with the case of other factories that are passing $managerOptions instead.

@daFish daFish force-pushed the feat/selenium-devserver branch from 8a59fd8 to cd19f51 Compare December 2, 2024 12:59
Copy link
Member

@dunglas dunglas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM code-wise

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@daFish daFish force-pushed the feat/selenium-devserver branch from cd19f51 to 7b67002 Compare December 3, 2024 08:29
@daFish
Copy link
Author

daFish commented Dec 3, 2024

Added the suggestions to the README.md and squashed my commits.

@daFish daFish force-pushed the feat/selenium-devserver branch from 7b67002 to 0a971e3 Compare December 4, 2024 08:20
@daFish daFish force-pushed the feat/selenium-devserver branch from 0a971e3 to 9d693e4 Compare December 4, 2024 08:32
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.

4 participants