Skip to content

Update test to support new frontend UI #3188

@rgaiacs

Description

@rgaiacs

BinderHub frontend UI migrated to vanilla HTML to React based app in jupyterhub/binderhub#1856. Because of this, the test

def test_proxy_page(helm_config, federation_url):
r = requests.get(federation_url)
r.raise_for_status()
assert "How it works" in r.text
requires re-design.

The "simplest" solution is to replace assert to check for

<div id="root"></div>

from https://github.com/jupyterhub/binderhub/blob/65f807c12c61aed2179293d1bd0f72d117e92793/binderhub/templates/page.html#L24. In this simplest solution will don't need to run the JavaScript. We only check that the React based app has a HTML anchor.

Alternatively, the assert can be replaced with a solution powered by an automation library for browser testing like

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