Skip to content

current, latest and previous shorthands result in wrong browsers #238

@Kuirak

Description

@Kuirak

When using the shorthands like chrome_latest and chrome_previous the browsers are selected wrongly.

Expected Behavior

It should select the latest stable browser and one version before.

Actual Behavior

At the time of writing this (07/12/2020) results in chrome 87 for latest and chrome 87 beta for previous
For Edge it even selects the old edge 17 and 18 instead of edgeium 87 and 86

browserstack.json

  "browsers": [
    "chrome_latest",
    "chrome__previous",
    "firefox_latest",
    "firefox__previous",
    "edge_latest",
    "edge__previous",
    "safari_latest",
    "safari__previous"
  ]

Platform details

  1. browserstack-runner version: 0.9.3
  2. node version: 12.9.0
  3. os type and version: WSL 2 Ubuntu 20

Details

After diving into some code the problem is that browserstack-runner expects the browser list only to return numbers, which the api doesn't, it returns a 87.0 beta for chrome or 84 beta for firefox which results in a wrong order and for edge it includes insider preview and parseFloat('insider preview') results in NaN and that breaks the sorting.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions