From 18077a3bc0161187d5ca888fe993641bf6558636 Mon Sep 17 00:00:00 2001 From: antuarc Date: Thu, 12 Dec 2024 16:09:15 +1000 Subject: [PATCH] [QOLSVC-8587] add testing of name truncation on the global search page - Ensure that long organisation and group names are truncated within the search facets on /dataset --- test/features/groups.feature | 5 +++++ test/features/organisations.feature | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/test/features/groups.feature b/test/features/groups.feature index 387d3180..5ecce5e4 100644 --- a/test/features/groups.feature +++ b/test/features/groups.feature @@ -63,3 +63,8 @@ Feature: Group APIs Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" When I press the element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" + + When I go to dataset page + Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" + When I press the element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" + Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), 'Group name more') and contains(string(), '...') and @title = '$group_title']" diff --git a/test/features/organisations.feature b/test/features/organisations.feature index 471187af..800ba171 100644 --- a/test/features/organisations.feature +++ b/test/features/organisations.feature @@ -71,3 +71,7 @@ Feature: Organization APIs Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']" When I press the element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']" Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']" + When I go to dataset page + Then I should see an element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']" + When I press the element with xpath "//li[contains(@class, 'nav-item')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']" + Then I should see an element with xpath "//li[contains(@class, 'nav-item') and contains(@class, 'active')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 35 characters aaaaaaaaaaaa']"