Skip to content

Automatically accept geolocation permission / mock geolocation for tests #2671

Open
@akozmanyan1

Description

@akozmanyan1

Current behavior:

I have a map and a button in my app. When user clicks the button it identifies it’s current position and map pin moves to the current location of the user. This does not happen when running cypress tests.

Desired behavior:

When running cypress test I want to be able to get the location of user and the map to show that position changes.

Steps to reproduce:

I created a simple POC – https://github.com/akozmanyan1/geolocation-bug
Just download and run it - '$ npm run serve'.
You also will need to open cypress - '$ ./node_modules/.bin/cypress open'

Versions

Cypress - Running Electron 59
OS: Windows 10
browser: Google Chrome - Version 69.0.3497.100

Metadata

Metadata

Assignees

No one assigned

    Labels

    E2EIssue related to end-to-end testingtype: featureNew feature that does not currently existtype: unexpected behaviorUser expected result, but got another

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions