Skip to content

Commit

Permalink
Merge branch 'main' into disable-simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
soulgalore authored Dec 22, 2023
2 parents 21b3e07 + 95d92a7 commit c70f108
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 12 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md → .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# How to contribute
Browser Time (it's browser time!) needs help from the users so please contribute!
Browsertime needs help from the users so please contribute!

## Making changes
If you want help out, that's great! Check the issue list and see if there's something there you want to do and drop Peter a note so we know and we can help you get into the project.
Expand All @@ -16,7 +16,7 @@ If you find a defect, please file a bug report and follow the instructions in ht
If you have the skills & the time, it is perfect if you send a pull request with a fix, that helps me alot!

## Add a change request/new functionality request
If you have an idea or something that you want Browser Time to handle, add an issue and lets discuss it there. Ideas/changes/requests are very very welcome!
If you have an idea or something that you want browsertim to handle, add an issue and lets discuss it there. Ideas/changes/requests are very very welcome!


Thanks for your support & time!
Expand Down
15 changes: 8 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,14 @@ To get the HAR from Firefox we use the [HAR Export Trigger](https://github.com/f

We welcome contributions from the community! Whether you're fixing a bug, adding a feature, or improving documentation, your help is valuable. Here’s how you can contribute:

1. **Fork and Clone**: Fork the repository and clone it locally.
2. **Create a Branch**: Create a new branch for your feature or bug fix.
3. **Develop**: Make your changes. Ensure you adhere to the coding standards and write tests if applicable.
4. **Test**: Run tests to ensure everything works as expected.
5. **Submit a Pull Request**: Push your changes to your fork and submit a pull request to the main repository.

Before contributing, please read our [CONTRIBUTING.md](CONTRIBUTING.md) for more detailed information on how to contribute.
1. **Create an Issue**: Create an issue and discuss with us how to implement the issue.
2. **Fork and Clone**: Fork the repository and clone it locally.
3. **Create a Branch**: Create a new branch for your feature or bug fix.
4. **Develop**: Make your changes. Ensure you adhere to the coding standards and write tests if applicable.
5. **Test**: Run tests to ensure everything works as expected.
6. **Submit a Pull Request**: Push your changes to your fork and submit a pull request to the main repository.

Before contributing, please read our [CONTRIBUTING.md](.github/CONTRIBUTING.md) for more detailed information on how to contribute.

### Reporting Issues
Found a bug or have a feature request? Please use the [GitHub Issues](https://github.com/sitespeedio/browsertime/issues) to report them. Be sure to check existing issues to avoid duplicates.
Expand Down
34 changes: 31 additions & 3 deletions lib/firefox/webdriver/builder.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { resolve } from 'node:path';
import { fileURLToPath } from 'node:url';
import path from 'node:path';
import { platform } from 'node:os';
import {
ServiceBuilder,
Options,
Expand Down Expand Up @@ -168,9 +169,36 @@ export async function configureBuilder(builder, baseDir, options) {
// https://bugzilla.mozilla.org/show_bug.cgi?id=1751196

if (!isAndroidConfigured(options)) {
ffOptions.setBinary(
firefoxTypes.length > 0 ? firefoxTypes[0] : Channel.RELEASE
);
// Fix for https://github.com/sitespeedio/browsertime/issues/2041
if (platform() === 'darwin') {
if (
!firefoxConfig.binaryPath &&
!firefoxConfig.nightly &&
!firefoxConfig.beta &&
!firefoxConfig.developer
) {
ffOptions.setBinary('/Applications/Firefox.app/Contents/MacOS/firefox');
} else if (firefoxConfig.nightly) {
ffOptions.setBinary(
'/Applications/Firefox Nightly.app/Contents/MacOS/firefox'
);
} else if (firefoxConfig.beta) {
ffOptions.setBinary(
'/Applications/Firefox Nightly.app/Contents/MacOS/firefox'
);
} else if (firefoxConfig.developer) {
ffOptions.setBinary(
'/Applications/FirefoxDeveloperEdition.app/Contents/MacOS/firefox'
);
} else if (firefoxConfig.binaryPath) {
ffOptions.setBinary(firefoxConfig.binaryPath);
}
} else {
// See https://github.com/sitespeedio/browsertime/issues/2041
ffOptions.setBinary(
firefoxTypes.length > 0 ? firefoxTypes[0] : Channel.RELEASE
);
}
}

ffOptions.addArguments('-no-remote');
Expand Down

0 comments on commit c70f108

Please sign in to comment.