Skip to content

Allow tests to continue working when the Open Tree synthetic tree version changes #101

@gaurav

Description

@gaurav

We currently hardcode expected URLs for Open Tree resolution in our tests:

expect(resultObj.Alligatoridae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott195670',
label: 'Alligatoridae',
});
expect(resultObj.Alligatorinae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott151255',
label: 'Alligatorinae',
});
expect(resultObj.Crocodylidae[0].resolved).to.include({
'@id': 'https://tree.opentreeoflife.org/opentree/argus/opentree12.3@ott1092501',
label: 'Longirostres',
});
expect(resultObj.Diplocynodontinae[0]).to.include({
error: 'no_mrca_found:400',
});

This is fine until the Open Tree of Life synthetic tree version, which is part of the URL, changes. Unfortunately, I don't see a way of requesting a node on a particular version of the synthetic tree. Therefore, we should change this test to work with whichever version of the Open Tree synthetic tree is returned. We will still need to change the node IDs if they change, but since those are tied to their Open Tree Taxonomy ID (e.g. Longirostris, which is ott1092501), they shouldn't change between releases unless the taxonomy has changed dramatically.

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