by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 06 06:22
    rhpijnacker commented #1168
  • Jul 06 05:50
    github-actions[bot] labeled #1168
  • Jul 06 05:50
    rhpijnacker opened #1168
  • Jun 17 06:34
    github-actions[bot] labeled #1167
  • Jun 17 06:34
    rhpijnacker opened #1167
  • Jun 08 21:26
    msssk commented #1165
  • Jun 08 21:24
    msssk commented #1165
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 labeled #1166
  • Jun 08 18:54
    jason0x43 opened #1166
  • Jun 08 13:25
    jason0x43 commented #1165
  • Jun 06 15:50

    jason0x43 on oclif-test

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8.7

    (compare)

  • Jun 05 01:22

    jason0x43 on 4.8

    Updating metadata for 4.8.7 Updating source version to 4.8.… (compare)

  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 commented #80
  • Jun 05 00:54
    jason0x43 labeled #80
  • Jun 04 15:07

    jason0x43 on 4.8

    chore: update Intern config sch… chore: update schema Improve h… feat: add support for 'internLo… and 1 more (compare)

Jason Cheatham
@jason0x43
:thumbsup:
Khobab
@khobabc
Just one more question, is there a way to not change the module resolution and resolve this?
Jason Cheatham
@jason0x43

You may be able to use paths, like

{
  "compilerOptions": {
    "paths": {
      "@theintern/common": ["node_modules/@theintern/common/index"],
      "source-map": ["node_modules/source-map/source-map"]
    }
}

However, you may still run into issues because modules published through npm are going to assume node-based module resolution.

Khobab
@khobabc
ahaan.
Thank you very much for your help.
Dylan Staley
@dstaley
Did 4.8.4 break compatibility with older versions of Chrome? It looks like my GitHub workflows are failing on the 4.8.4 upgrade saying ChromeDriver only supports Chrome 83. GitHub Actions use Chrome 81.
Jason Cheatham
@jason0x43

Funny, someone else just pinged me because GHA recently updated to Chrome 83 and their tests started failing. :grinning: Intern's policy is to track the current stable versions of webdrivers by default. If you need to pin to a specific driver version, you can do that using tunnelOptions.drivers:

{
  "tunnelOptions": {
    "drivers": [
      { "name": "chrome", "version": "81..." }
    ]
  }
}

We can actually make that a bit easier with GHA, because (at least according to their release notes) they publish something to a CHROMEWEBDRIVER environment variable in the container. I haven't checked to see what that contains, though (path to an exe, version number, ...).

Dylan Staley
@dstaley
oh huh maybe it's failing because Chrome is actually v83 and ChromeDriver can't properly detect it?
Jason Cheatham
@jason0x43
4.8.4 uses the chromedriver for Chrome 81 by default, so you'd need to pin to a v83 chromedriver. Intern 4.8.5 (published yesterday) checks for updated webdriver versions when you run tests, so it should stay up-to-date.
Dylan Staley
@dstaley
Oh, sorry, it's actually v4.8.5 that's breaking
This version of ChromeDriver only supports Chrome version 83
Jason Cheatham
@jason0x43
Ah, yeah, being on 4.8.5 would make more sense with that error.
It looks like you're using a Windows environment?
Dylan Staley
@dstaley
Yup, the Windows 2019 environment, which as of seven days ago is using chrome 81 (at least according to this https://github.com/actions/virtual-environments/blame/master/images/win/Windows2019-Readme.md#L573)
Jason Cheatham
@jason0x43
Hmm...the release notes for the most recent release (3 days ago) says it's on Chrome 83. (https://github.com/actions/virtual-environments/releases/tag/win19%2F20200524.1)
In any case. the solution is still to pin the chromedriver version to something compatible with the target environment.
It would be useful to be able to easily make use of the environment variable, though. The Windows release notes point out that it points to the driver exe. so that's useful to know. I'll create an issue for it...
Dylan Staley
@dstaley
So intern always downloads the latest version of the driver? Would it make sense to provide an option to download the driver that matches the installed version of Chrome?
Because I can pin to v81 to get tests passing now, but in a few days when the environment updates to v83 I'm gonna have the same issue.
I guess I could, in CI, interpolate the chrome version into the config?
Jason Cheatham
@jason0x43
Intern does download the latest version as that's the most common use case. Detecting the local version would be useful, but tricky, particularly if the browser being used was in a non-standard location.
Being able to use environment variables in the config would handle the GHA case (and would be generally useful). You can already use an INTERN_ARGS environment variable to pass command line options, but it's not very ergonomic for something like this.
Dylan Staley
@dstaley
So the best solution for right now would be updating the config with the value from the CHROMEDRIVER variable?
Jason Cheatham
@jason0x43
Unfortunately, there isn't a way to configure a path to a local webdriver executable, so the best solution for the moment is to pin the version in the config. Depending on the format of their CHROMEWEBDRIVER variable, you might be able to extract the local version from that and use it to set the webdriver version.
Dylan Staley
@dstaley
Yeah that's what I'll try. I'll report the format in the issue
Jason Cheatham
@jason0x43
:thumbsup:
Dylan Staley
@dstaley
Wait, it looks like GHA is installing ChromeDriver in addition to Chrome. Can intern pick up on that since it's in the PATH?
Dylan Staley
@dstaley
Ah okay nevermind, looks like the issue encompasses updating digdug to accept a path to an executable
Dylan Staley
@dstaley
When pinning a webdriver version, should tunnelOptions go at the root of the config?
Jason Cheatham
@jason0x43
Yes.
{
  "tunnelOptions": {
    "drivers": [ { "name": "chrome", "version": "81.xxx" } ]
  }
}
MarvDann
@MarvDann
Hi Jason, what is the recommended way to mock api requests in intern 3? I have tried using nock but was unable to import it as a module after using bower to install it as a package alongside dojo in /src folder
Scott Davis
@stdavis
image.png
So I have unit tests running in the browser. How do I get those to run in a headless browser on my CI server?
Jason Cheatham
@jason0x43
@MarvDann If you're using dojo for requests, you can mock the request handling during tests. If you're using something else, you could try Sinon, which provides facilities for mocking XHR requests.
Jason Cheatham
@jason0x43
@stdavis In a CI system, you'd run Intern from the command line, and use the Selenium tunnel (assuming the browser is on your CI system) to load and manage the browser. In your Intern config, you'd setup an environment for headless chrome (see https://theintern.io/docs.html#Intern/4/docs/docs%2Fhow_to.md/run-tests-with-headless-chrome). Note that your CI system would need Java (headless Java is fine) to run Selenium. If Java isn't an option, you can also interact with chromedriver directly, but it's a bit more work (better support for direct interaction with web drivers is in the works).
1 reply
Dylan Staley
@dstaley
Is Firefox on GitHub Actions really flaky? I feel like every third run fails with Timeout: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"name":"intern","idle-timeout":60,"browserName":"firefox","moz:firefoxOptions":{"args":["-headless"],"browser":"firefox"}}] connection refused
rhpijnacker
@rhpijnacker
Since upgrading from Intern 3 to Intern 4 we have a number of files that have (much) lower code coverage.
I've been able to chase this down to test cases that use a (dojo) context require with a map to reroute dependencies to mock files. After the test case is finished, we clean up the loaded module (using require.undef) to force-load it (without mocked dependencies) the next time it is needed.
It seems that reloading a module with Intern 4 resets the coverage built up so far, whereas with Intern 3 this wasn't the case.
Any thoughts on how to work around this? Do we even consider this a bug?
Jason Cheatham
@jason0x43
I'd call that a bug. At least, I would expect coverage to be cumulative over the course of a test session.
rhpijnacker
@rhpijnacker
Ok, filed an issue with repro
Jason Cheatham
@jason0x43
Awesome, thanks