Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Add a few query tests #69

Merged
merged 6 commits into from
Aug 17, 2018
Merged

Conversation

jrbenny35
Copy link
Collaborator

Fixes #63 #62 #64 #61 #65 #59

Copy link
Collaborator

@hackebrot hackebrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @jrbenny35! 👏

One comment on type annotations.

Currently the tests check that the first search result is what we expect. Ideally we also check that the search results don't contain items that do not match the search string. We could do this by additionally assertion the number of results?

What do you think?

@@ -15,14 +16,93 @@
("Ashleys Query", "Query created by Ashley."),
],
)
def test_query(
def test_query_by_username(
create_queries,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please update this to:

create_queries: typing.Callable[..., None],

@jrbenny35
Copy link
Collaborator Author

I think asserting the number of results could work but what if they query is like 'default query' but there is one named 'default query 1' ?

@hackebrot
Copy link
Collaborator

That depends on the expected behavior for the search feature of Redash.

Thoughts @madalincm?

@jrbenny35
Copy link
Collaborator Author

Just trying it myself, they both show up.

Copy link
Collaborator

@hackebrot hackebrot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tests Tasks to implement UI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test: Searching for queries with special characters in the name
2 participants