From ca117d6ba8aa669d950dd3f47510a8911a579b02 Mon Sep 17 00:00:00 2001 From: ThrawnCA Date: Tue, 14 Nov 2023 13:59:10 +1000 Subject: [PATCH 1/2] [QOLDEV-640] apply link styling to header buttons with the 'btn-link' class --- ckanext/data_qld/fanstatic/data_qld.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ckanext/data_qld/fanstatic/data_qld.css b/ckanext/data_qld/fanstatic/data_qld.css index 4edcd50a..a4b87fd6 100644 --- a/ckanext/data_qld/fanstatic/data_qld.css +++ b/ckanext/data_qld/fanstatic/data_qld.css @@ -304,7 +304,8 @@ div.account-masthead .account ul.unstyled li { border: none; } -div.account-masthead .account ul.unstyled li a { +div.account-masthead .account ul.unstyled li a, +div.account-masthead .account ul.unstyled li .btn-link { color: #ffffff; text-decoration: none; line-height: 1rem; @@ -327,7 +328,9 @@ div.account-masthead .account ul.unstyled li a { } div.account-masthead .account ul.unstyled li a:hover, -div.account-masthead .account ul.unstyled li a:focus { +div.account-masthead .account ul.unstyled li a:focus, +div.account-masthead .account ul.unstyled li .btn-link:hover, +div.account-masthead .account ul.unstyled li .btn-link:focus { color: #ffffff; background-color: #007eb1; } From 3c265c36c2ac1a4082f564756e9fbeb7a76a71b8 Mon Sep 17 00:00:00 2001 From: ThrawnCA Date: Wed, 15 Nov 2023 11:58:56 +1000 Subject: [PATCH 2/2] [QOLDEV-640] adjust test expectations to handle logout as link or POST --- bin/build.sh | 2 +- test/features/engagement_reporting.feature | 1 + test/features/steps/steps.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/build.sh b/bin/build.sh index c65820b1..78a31dde 100755 --- a/bin/build.sh +++ b/bin/build.sh @@ -20,7 +20,7 @@ CKAN_GIT_VERSION=$CKAN_VERSION CKAN_GIT_ORG=qld-gov-au if [ "$CKAN_VERSION" = "2.10" ]; then - CKAN_GIT_VERSION=ckan-2.10.1-qgov.7 + CKAN_GIT_VERSION=ckan-2.10.1-qgov.10 PYTHON_VERSION=py3 PYTHON="${PYTHON}3" else diff --git a/test/features/engagement_reporting.feature b/test/features/engagement_reporting.feature index fecb326c..a02ab65a 100644 --- a/test/features/engagement_reporting.feature +++ b/test/features/engagement_reporting.feature @@ -28,6 +28,7 @@ Feature: Engagement Reporting When I log in And I go to my reports page And I press "Engagement Report" + And I take a debugging screenshot And I press the element with xpath "//button[contains(string(), 'Show')]" Then I should see an element with xpath "//tr[@id='dataset-followers']/td[contains(@class, 'metric-title') and string()='Dataset followers' and position()=1]" And I should see an element with xpath "//tr[@id='dataset-followers']/td[contains(@class, 'metric-data') and string()='0' and position()=2]" diff --git a/test/features/steps/steps.py b/test/features/steps/steps.py index d886c582..3320ada6 100644 --- a/test/features/steps/steps.py +++ b/test/features/steps/steps.py @@ -96,7 +96,7 @@ def log_in_directly(context): assert context.persona, "A persona is required to log in, found [{}] in context. Have you configured the personas in before_scenario?".format(context.persona) context.execute_steps(u""" When I attempt to log in with password "$password" - Then I should see an element with xpath "//a[@title='Log out']" + Then I should see an element with xpath "//*[@title='Log out']/i[contains(@class, 'fa-sign-out')]" """) @@ -573,7 +573,7 @@ def go_to_admin_config(context): @when(u'I log out') def log_out(context): context.execute_steps(u""" - When I visit "/user/_logout" + When I press the element with xpath "//*[@title='Log out']" Then I should see "Log in" """)