Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assert top two results have the same properties #73

Open
missinglink opened this issue Sep 8, 2016 · 3 comments
Open

assert top two results have the same properties #73

missinglink opened this issue Sep 8, 2016 · 3 comments

Comments

@missinglink
Copy link
Member

missinglink commented Sep 8, 2016

I am trying to assert that two sections of a road are returned as the top two results, it seems like the current assertion schema doesn't support this sort of thing?

{
      "id": 2,
      "status": "pass",
      "user": "missinglink",
      "description": "road segement divided in the middle by a park",
      "notes": [
        "there should be two records, returned as result 1 & 2",
        "the testing framework doesn't support this type of test"
      ],
      "in": {
        "sources": "osm",
        "layers": "street",
        "text": "grolmanstr, berlin"
      },
      "expected": {
        "coordinates": [ 13.324042, 52.503915 ],
        "properties": [
          {
            "country_a": "DEU",
            "name": "Grolmanstraße",
            "street": "Grolmanstraße",
            "layer": "street"
          },{
            "country_a": "DEU",
            "name": "Grolmanstraße",
            "street": "Grolmanstraße",
            "layer": "street"
          }
        ]
      }
    }

adding additional duplicate blocks has no effect on the pass/fail of the test

@orangejulius
Copy link
Member

{
      "id": 2,
      "status": "pass",
      "user": "missinglink",
      "description": "road segement divided in the middle by a park",
      "notes": [
        "there should be two records, returned as result 1 & 2",
        "the testing framework doesn't support this type of test"
      ],
      "in": {
        "sources": "osm",
        "layers": "street",
        "text": "grolmanstr, berlin"
      },
      "expected": {
        "priorityThresh": 2,
        "coordinates": [ 13.324042, 52.503915 ],
        "properties": [
          {
            "country_a": "DEU",
            "name": "Grolmanstraße",
            "street": "Grolmanstraße",
            "layer": "street"
          },{
            "country_a": "DEU",
            "name": "Grolmanstraße",
            "street": "Grolmanstraße",
            "layer": "street"
          }
        ]
      }
    }

Does that work? Note the priorityThresh added in the expected block.

@missinglink
Copy link
Member Author

I tried that and it didn't work unfortunately, I'm guessing that it's not disregarding records that have already been matched and so both clauses match on the first document.

@orangejulius
Copy link
Member

Ohh right, because the two property blocks are exactly the same. Yeah, right now that isn't handled properly. It would be a bit tricky to support, but we should support it some day.

@dianashk dianashk added this to the Testing... Testing milestone Sep 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants