Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 13 00:01
    jason0x43 opened #994
  • Sep 12 23:45
    jason0x43 closed #992
  • Sep 12 23:45
    jason0x43 commented #992
  • Sep 12 02:18

    jason0x43 on edge-chromium

    Ignore nodenv files Handle `browserVersion` when fi… Cleanup (compare)

  • Sep 12 02:00

    jason0x43 on edge-chromium

    Support Edge Preview - Handle … (compare)

  • Sep 12 01:56

    jason0x43 on download-webdriver-config

    Make editorconfig consistent wi… External Selenium config, impro… Ignnore nodenv-vars files (compare)

  • Aug 26 08:56
    Biboba closed #77
  • Aug 26 08:56
    Biboba commented #77
  • Aug 26 08:46
    Biboba opened #77
  • Aug 22 05:57
    GARMBoshouwers commented #182
  • Aug 21 21:50
    schontz commented #182
  • Aug 21 21:48
    schontz commented #183
  • Aug 21 21:45
    schontz edited #182
  • Aug 21 21:44
    schontz opened #183
  • Aug 21 21:41
    schontz opened #182
  • Aug 14 20:01
    jason0x43 commented #993
  • Aug 14 13:14
    jason0x43 labeled #993
  • Aug 14 13:14
    jason0x43 assigned #993
  • Aug 14 13:14
    jason0x43 opened #993
  • Aug 13 20:59
    jason0x43 assigned #76
David Schontzler
@schontz
Error initializing Intern: Error: Non-object value "true" for plugins
I also tried plugins=[] and plugins=%5B%5D, but getError initializing Intern: Error: Non-object value "" for plugins`
Jason Cheatham
@jason0x43
That sounds like a potential bug. At least, it's not the intended behavior. The query parser should work essentially the same as the command line parser.
David Schontzler
@schontz
If I don't specify plugins=[] then I get a 404 on my plugin, which is @theintern/visual-plugin. The issues appears to be that it is looking for the plugin at @theintern/visual-plugin, instead of innode_modules/@theintern/visual-plugin. I attempted to add it toloader.options.packages`, but it is ignored.
{
    "name": "@theintern",
    "location": "node_modules/@theintern"
}
Here's the bug for the plugins= issue: theintern/intern#991
David Schontzler
@schontz
SessionNotCreatedException: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"name":"intern","idle-timeout":60,"browserName":"chrome","chromeOptions":{"args":["headless","disable-gpu","window-size=1400,900"]}}}] session not created: This version of ChromeDriver only supports Chrome version 74
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17134 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 726 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'D8KM1Q72', ip: '192.77.217.31', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_211'
Driver info: driver.version: unknown
I am running Chrome 76. I don't have anything in intern.json pointing to particular versions. Attempted to reinstall intern but the error persists.
Jason Cheatham
@jason0x43
You'll need to specify the driver version in tunnelOptions (and I need to publish an updated version of Dig Dug).
"tunnelOptions": {
  "drivers": [
    { "name": "chrome", "version": "76.0.3809.68" }
  ]
}
Dig Dug's goal is to somewhat closely track the current versions of webdrivers (ideally it should be pulling versions from a service or a more frequently updated file, but that hasn't been implemented yet).
David Schontzler
@schontz
Thanks. That did the trick. Should we open a SP support ticket for auto-versioning?
Jason Cheatham
@jason0x43
kailo777
@kailo777

Hey together,

currently I trying to add sinon for unit tests in intern.
The test currently running in browser context

First I add sinon in the intern.json

"packages": [
          {
            "name": "sinon",
            "location": "node_modules/sinon",
            "main": "pkg/sinon.js"
          }
        ]

In my test I add import {stub} from "sinon";

Wanna mock dojo/request/

stub(request, "get")
.yields(JSON.stringify({id: 1}));

Getting the error:

Error: scriptError: ../sinon.js
No stack or location
Fatal error
Error: Dojo loader error: scriptError: ../sinon.js
No stack or location

Did i miss something?

Jason Cheatham
@jason0x43
What does the rest of your dojo config (in intern.json) look like?
kailo777
@kailo777
"configs": {
    "unit-chrome": {
      "serveOnly": "true",
      "loader": {
        "script": "dojo",
        "options": {
          "has": {
            "dojo-undef-api": 1
          },
          "baseUrl": ".",
          "paths": {
            "tests": "/build/tests/unit",
            "app": "/build/webapp/app",
            "dojo": "/lib/dojo",
            "dijit": "/lib/dijit",
            "dstore": "/lib/dstore",
            "dojox": "/lib/dojox"
          }
        },
        "packages": [
          {
            "name": "sinon",
            "location": "node_modules/sinon",
            "main": "pkg/sinon.js"
          }
        ]
      },
      "suites": [
        "tests/testbundle"
      ],
      "functionalSuites": [],
      "environments": [
        {
          "browserName": "chrome"
        }
      ]
    },
Jason Cheatham
@jason0x43
That looks reasonable. What if you remove the baseUrl? Also, I'm assuming your project looks something like:
intern.json
node_modules/
    sinon/
kailo777
@kailo777

Yes project structur is:

intern.json
node_modules/
    sinon/

After removing baseUrL:

Fatal error
Error: scriptError: sinon.js
No stack or location
Fatal error
Error: Dojo loader error: scriptError: sinon.js
No stack or location

Jason Cheatham
@jason0x43
Try removing the .js from pkg/sinon.js
kailo777
@kailo777

It works now !!! :D

first I removed the .js ending and then put the packages tag before paths tags.

"configs": {
    "unit-chrome": {
      "serveOnly": "true",
      "loader": {
        "script": "dojo",
        "options": {
          "has": {
            "dojo-undef-api": 1
          },
          "packages": [
            {
              "name": "sinon",
              "location": "node_modules/sinon",
              "main": "pkg/sinon"
            }
          ],
          "paths": {
            "tests": "/build/tests/unit",
            "app": "/build/webapp/app",
            "dojo": "/lib/dojo",
            "dijit": "/lib/dijit",
            "dstore": "/lib/dstore",
            "dojox": "/lib/dojox"
          }
        }
      },
      "suites": [
        "tests/testbundle"
      ],
      "functionalSuites": [],
      "environments": [
        {
          "browserName": "chrome"
        }
      ]
    },
That makes seens because in the "/build/tests/unit", is my unit test which requires the sinon module.
Thanks @jason0x43
David Schontzler
@schontz
× chrome on windows nt - csp/form/BscanInput - pick result in widget2 acts like a filtering select (0.307s)
    UnknownCommand: [POST http://localhost:4444/wd/hub/session/f5e9b0c3a501ae1e6512bb7c9feeb735/keys / {"value":["MU"]}] sendKeysToActiveElement
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
    System info: host: 'D8KM1Q72', ip: '192.77.217.31', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_211'
    Driver info: driver.version: unknown
Is this a problem with the driver?
Jason Cheatham
@jason0x43
Assuming it's chromedriver 75+, it's operating in W3C mode by default, which doesn't support the /keys command. Are feature tests running? (e.g., fixSessionCapabilities isn't false or "no-detect")
David Schontzler
@schontz
fixSessionCapabilities: "no-detect"
Jason Cheatham
@jason0x43
Try removing that. Leadfoot should figure out that /keys isn't available and switch to simulated key events for that endpoint.
David Schontzler
@schontz
ok. Is there a good reason to ever have that setting? It's been copied around all the intern.json files :)
It works now, but the key simulator seems to have some issues. Adjusting the tests should make up for it.
Jason Cheatham
@jason0x43
no-detect has traditionally been a time-saver with Chrome because Chrome didn't need feature detection -- everything just worked by default. However, with chromedriver's switch to W3C protocol, some things aren't going to work by default until Leadfoot has implemented the W3C way of doing things (like the Actions API).
David Schontzler
@schontz
I am doing something like: pressKeys('MU').pressKeys(keys.ARROW_DOWN).pressKeys(keys.ENTER) to work with a custom combo box, but the value of the box becomes MU
it may be timing on my end though
nope, still get MU. Would that be a bug? Pressing those keys should not result in in the input
Jason Cheatham
@jason0x43
It looks like those keys values are ending up as part of the value rather than being interpreted as control keys
If so, that does seem like a bug
David Schontzler
@schontz
OK. I've worked around it by using mouse clicks. Would the bug be filled in LeadFoot?
David Schontzler
@schontz
It also can add input to <input type="text" readonly>, which is very odd
David Schontzler
@schontz
Ondrej Medek
@xmedeko
Hi, I am quite a newbie to the intern and all JS stuff (although have many years experience with other langs and frameworks). We have an electron.js app and tests in intern running in a browser. Is it possible to run intern tests in electron.js and debug by VS Code (https://github.com/microsoft/vscode-recipes/tree/master/Electron)? Thanks
Jason Cheatham
@jason0x43
It is possible to run tests in Electron using either Spectron or chromedriver (https://github.com/theintern/intern-examples/tree/master/electron-example). It's very likely possible to debug the tests using VS Code, but that's not something I've tried.
Ondrej Medek
@xmedeko
@jason0x43 thanks, will look at that.
Guido Boshouwers
@GARMBoshouwers
When I try to get a clean install using npm install intern, I seem to get version 4.4.3 instead of the new 4.5.0 version. Is this correct?
Jason Cheatham
@jason0x43
At the moment 4.5 is tagged as a "next" version in npm so that interested people can try it out, but it's not yet the default. (There were some typing and dependency changes that might have caused issues in some configurations.) You can install it with npm install intern@next.
Guido Boshouwers
@GARMBoshouwers
I will do that, thanks
Guido Boshouwers
@GARMBoshouwers
What does functionalCoverage cover exactly? Does it perform code coverage of the functional test code itself, or does it perform code coverage of the web pages that are used in the functional tests?
Jason Cheatham
@jason0x43
I collects coverage data for any instrumented code that's loaded during functional tests.
Guido Boshouwers
@GARMBoshouwers
Are there any known options to perform code coverage of de javascript included in tested web pages?
Libor Buš
@liborbus

Hi, we are facing problems with running intern@latest (and intern@next) unit tests for Chrome (v76.0.3809.132) in Windows 10 command shell. We are not aware of any related change. We get "This version of ChromeDriver only supports Chrome version 74" error:

SessionNotCreatedException: [POST http://localhost:4444/wd/hub/session / {"desiredCapabilities":{"name":"intern","idle-timeout":60,"browserName":"chrome","goog:chromeOptions":{"args":["headless","disable-gpu","window-size=1024,768"]}}}] session not created: This version of ChromeDriver only supports Chrome version 74
  (Driver info: chromedriver=74.0.3729.6 (255758eccf3d244491b8a1317aa76e1ce10d57e9-refs/branch-heads/3729@{#29}),platform=Windows NT 10.0.17763 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 639 milliseconds
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
System info: host: 'XXX', ip: '192.168.99.1', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_221'
Driver info: driver.version: unknown
  at Server.post @ node_modules\src\Server.ts:361:16
  at Server.createSession @ node_modules\src\Server.ts:406:16
  at Suite.before @ src\lib\executors\Node.ts:448:15
  @ src\lib\Suite.ts:431:26
  at new e @ node_modules\@theintern\common\index.js:16:5076
  at runLifecycleMethod @ src\lib\Suite.ts:398:13
  at before @ src\lib\Suite.ts:495:13
  at Suite.run @ src\lib\Suite.ts:514:10
  @ src\lib\executors\Node.ts:769:27
  at FunctionQueue.next @ src\lib\executors\Node.ts:893:19

Can you please advice what is wrong?

Jason Cheatham
@jason0x43
Currently Intern defaults to chromedriver 74. To use a newer version, specify it in tunnelOptions:
// intern.json
{
  "tunnelOptions": {
    "drivers": [
      { "name": "chrome", "version": "76.0.3809.126" }
    ]
  }
}
Libor Buš
@liborbus
@jason0x43 : Thanks, that works.
jake-harrington
@jake-harrington
When my functional tests fail, it's logging a giant object, which includes a giant wall of text for an encoded screenshot when the error happened. Any idea how to suppress that?
(or is it something i might be unintentionally doing?)