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

refactor: enhance test runs #56

Merged
merged 6 commits into from
Mar 19, 2024
Merged

refactor: enhance test runs #56

merged 6 commits into from
Mar 19, 2024

Conversation

feryardiant
Copy link
Contributor

  • Extracts browserstack interactions to dedicated class

    This makes our main class slimmer and less verbose compared to the previous one.

  • Move away binary config to its own class

    Previously, when we want to use our own browserstack-local binary we should do like this:

    Creasi\DuskBrowserStack\SupportsBrowserStack::useBrowserStackLocal('path/to/bs-local');

    Now, we should do like this instead

    Creasi\DuskBrowserStack\LocalBinary::use('path/to/bs-local');
  • Change LocalProcess constructor signature

    Previously, its first param was browserstack-local binary path, now it only require the array of arguments that will passed to the binary. It's the job of LocalBinary class to handle the path, anyway.

  • Change SupportsBrowserStack to WithBrowserStack

    There's nothings wrong with SupportsBrowserStack actually, just to follow the convention using With... as prefix I believe would be better for the long run.

    As of now, I'll keep the SupportsBrowserStack but mark it as deprecated so for those who still using this class won't get any errors when they run their tests.

Previously, when we want to use our own browserstack-local binary
we should do like this:

```
SupportsBrowserStack::useBrowserStackLocal('path/to/bs-local');
```

Now, we should do like this instead

```
LocalBinary::use('path/to/bs-local');
```

Signed-off-by: Fery Wardiyanto <[email protected]>
instead of relying on parameters

Signed-off-by: Fery Wardiyanto <[email protected]>
There's nothings wrong with `SupportsBrowserStack` actually
just to follow the convention using `With...` as prefix I believe
would be better for the long run.

I'll keep the `SupportsBrowserStack` but mark it as deprecated
so for those who still using this class won't noticed anything
when they run their tests

Signed-off-by: Fery Wardiyanto <[email protected]>
@feryardiant feryardiant requested a review from a team March 19, 2024 17:50
@github-actions github-actions bot added enhancement New feature or request integration When multiple functionalities should works together labels Mar 19, 2024
@feryardiant feryardiant merged commit 2213f13 into main Mar 19, 2024
5 checks passed
@feryardiant feryardiant deleted the feat/enhance-test-run-logs branch March 19, 2024 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request integration When multiple functionalities should works together
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

1 participant