From 9c97ef97346829bd0691f4c9f57a3c929f28c876 Mon Sep 17 00:00:00 2001 From: antuarc Date: Thu, 12 Dec 2024 10:57:09 +1000 Subject: [PATCH] [QOLSVC-8587] add scenario test for truncating long organisation names --- test/features/organisations.feature | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/features/organisations.feature b/test/features/organisations.feature index c83c07fa..db99fdc1 100644 --- a/test/features/organisations.feature +++ b/test/features/organisations.feature @@ -51,3 +51,21 @@ Feature: Organization APIs And I press "My Organisations" Then I should see "Test Organisation" And I should see an element with xpath "//a[contains(@href, 'organization/new') and contains(string(), 'Add Organisation')]" + + Scenario: As a sysadmin, when I create an organisation with a long name, it should be preserved + Given "SysAdmin" as the persona + When I log in + And I go to organisation page + And I click the link to "/organization/new" + And I fill in "title" with "Org name more than 30 characters" + And I press the element with xpath "//button[contains(@class, 'btn-primary')]" + And I take a debugging screenshot + # Breadcrumb should be truncated but preserve full name in a tooltip + Then I should see an element with xpath "//ol[contains(@class, 'breadcrumb')]//a[contains(string(), 'Org name more than') and contains(string(), '...') and @title = 'Org name more than 30 characters']" + + # Search facets should be truncated but preserve full name in a tooltip + When I create a dataset and resource with key-value parameters "notes=Testing long org name::owner_org=Org name more than 30 characters" and "name=Test" + And I press "Org name more than 30" + 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 30 characters']" + 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 30 characters']" + 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 30 characters']"