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 c4c80a0
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions test/features/organisations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,23 @@ 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 35 characters aaaaaaaaaaaa"
# This is actually the URL
And I fill in "name" with "org-name-more-than-35-characters-aaaaaaaaaaaa"
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 35 characters aaaaaaaaaaaa']"

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

0 comments on commit c4c80a0

Please sign in to comment.