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

QOLDEV-955 fix testing on CKAN 2.11 and master #150

Merged
merged 8 commits into from
Jan 29, 2025
Prev Previous commit
Next Next commit
[QOLDEV-955] fix test XPath syntax
- Missing closing bracket
  • Loading branch information
ThrawnCA committed Jan 28, 2025
commit 0261d532ee061bc8c4b811c1aad6270d1a6d7c24
4 changes: 2 additions & 2 deletions test/features/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ def request_reset(context):
@then(u'I should see a search facet for "{title}" truncated to "{truncated_title}"')
def truncated_facet_visible(context, title, truncated_title):
context.execute_steps(u"""
Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), '{truncated_title}') and contains(string(), '...') and (contains(@title, '{title}') or contains(@data-bs-title, '{title}')]"
Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), '{truncated_title}') and contains(string(), '...') and (contains(@title, '{title}') or contains(@data-bs-title, '{title}'))]"
""".format(title=title, truncated_title=truncated_title))


@then(u'I should see an active search facet for "{title}" truncated to "{truncated_title}"')
def active_truncated_facet_visible(context, title, truncated_title):
context.execute_steps(u"""
Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), '{truncated_title}') and contains(string(), '...') and (contains(@title, '{title}') or contains(@data-bs-title, '{title}')]"
Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), '{truncated_title}') and contains(string(), '...') and (contains(@title, '{title}') or contains(@data-bs-title, '{title}'))]"
""".format(title=title, truncated_title=truncated_title))


Expand Down
Loading