Skip to content

Commit

Permalink
[QOLDEV-982] drop tests for now that only work on CKAN 2.10+
Browse files Browse the repository at this point in the history
- Also adjust CAPTCHA expectations to handle both old and new messages
  • Loading branch information
ThrawnCA committed Jan 16, 2025
1 parent 27d645f commit 0e5960b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 50 deletions.
19 changes: 0 additions & 19 deletions dev-requirements-2.9-py2.txt

This file was deleted.

4 changes: 2 additions & 2 deletions dev-requirements-2.9.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ six>=1.13.0
urllib3>=2.2.2 # not directly required, pinned by Snyk to avoid a vulnerability
zipp>=3.19.1 # not directly required, pinned by Snyk to avoid a vulnerability

-e git+https://github.com/qld-gov-au/ckanext-csrf-filter.git@1.2.1#egg=ckanext-csrf-filter
-e git+https://github.com/qld-gov-au/ckanext-csrf-filter.git@2.0.0#egg=ckanext-csrf-filter
-e git+https://github.com/qld-gov-au/[email protected]#egg=ckanext-qgov
-e git+https://github.com/qld-gov-au/[email protected].9#egg=ckanext-resource-type-validation
-e git+https://github.com/qld-gov-au/[email protected].10#egg=ckanext-resource-type-validation
-e git+https://github.com/qld-gov-au/[email protected]#egg=ckanext-ssm-config
3 changes: 2 additions & 1 deletion test/features/steps/steps.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,5 +581,6 @@ def lock_account(context):
for x in range(11):
context.execute_steps(u"""
When I attempt to log in with password "incorrect password"
Then I should see "Bad username or password or CAPTCHA."
Then I should see "Bad username or password or "
And I should see "CAPTCHA."
""")
28 changes: 0 additions & 28 deletions test/features/users.feature
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,6 @@ Feature: User APIs
Then I should see my datasets
And I should see "Add Dataset"

Scenario: Dashboard news feed can display organisational changes
Given "SysAdmin" as the persona
When I log in
And I go to organisation page
And I press "Test Organisation"
And I press "Manage"
And I press "Update"
And I visit "/dashboard"
Then I should see an element with xpath "//li[contains(string(), 'updated the organisation')]/a[contains(string(), 'Test Organisation') and contains(@href, '/organization/')]/..//a[contains(string(), 'Administrator') and @href='/user/admin']"

@email
Scenario: As a registered user, when I have locked my account with too many failed logins, I can reset my password to unlock it
Given "CKANUser" as the persona
Expand Down Expand Up @@ -164,21 +154,3 @@ Feature: User APIs
And I fill in "password2" with "password1234"
And I press "Create Account"
Then I should see "Password: Must contain at least one number, lowercase letter, capital letter, and symbol"

Scenario: As a sysadmin, when I go to the sysadmin list, I can promote and demote other sysadmins
Given "SysAdmin" as the persona
When I log in
And I click the link to a url that contains "/ckan-admin/"
And I take a debugging screenshot
Then I should see an element with xpath "//table//a[string() = 'Administrator' and @href = '/user/admin']"
And I should not see "Test Admin"

When I fill in "promote-username" with "test_org_admin"
And I press "Promote"
And I take a debugging screenshot
Then I should see "Promoted Test Admin to sysadmin"
And I should see an element with xpath "//table//a[string() = 'Test Admin' and @href = '/user/test_org_admin']"

When I press the element with xpath "//tr/td/a[@href = '/user/test_org_admin']/../following-sibling::td//button[contains(@title, 'Revoke') or contains(@data-bs-title, 'Revoke')]"
Then I should see "Revoked sysadmin permission from Test Admin"
And I should not see an element with xpath "//table//a[@href = '/user/test_org_admin']"

0 comments on commit 0e5960b

Please sign in to comment.