Skip to content

Commit

Permalink
[QOLSVC-8587] add scenario test for truncating long organisation names
Browse files Browse the repository at this point in the history
  • Loading branch information
ThrawnCA committed Dec 12, 2024
1 parent 2cdb913 commit a2c23de
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/features/organisations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 "name" with "Org name more than 30 characters"
And I press the element with xpath "//button[contains(@class, 'btn-primary')]"
And 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"

# 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 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']"

0 comments on commit a2c23de

Please sign in to comment.