Hi everyone ! So I was trying to push a little pro...
# javascript
d
Hi everyone ! So I was trying to push a little project to github pages, everything works fine locally but when I try to deploy it, it fails on the
testing
part saying this :
Copy code
> Failed to execute all tests:
  :browserTest: java.lang.IllegalStateException: Errors occurred during launch of browser for testing.
  - Opera
  - Firefox
  - Chromium
  Please make sure that you have installed browsers.
  Or change it via
  browser {
      testTask {
          useKarma {
              useFirefox()
              useChrome()
              useSafari()
          }
      }
  }
I know that the issue is related to the fact that it can't find firefox / chromium / opera... But how can I make it so tests are run correctly when deploying without having to remove the whole UI related part in my tests ?
r
Copy code
useKarma {
                useChromeHeadless()
            }
d
Yeah, I could do this but I can't test only
ChromeHeadless
.... Can I ? Aren't Firefox / Safari too different ?
b
Well chrome has over 80% market share these days, so not sure it's that essential to support other browsers to the limit
d
K, I'll do that then... will need to find the arch package to make it work locally ig
e
you could use a different configuration in different environments?
Copy code
if (providers.environmentVariable("CI").forUseAtConfigurationTime().isPresent()) useChromeHeadless() else { useFirefox(); useChrome(); useSafari() }