From 9343f94131becfac6ee41c9cd0db8c2e79e41ed5 Mon Sep 17 00:00:00 2001 From: Jake Dallimore Date: Thu, 24 Mar 2022 15:40:59 +0800 Subject: [PATCH] MDL-74312 enrol_lti: fix copytoclipboard trigger element This should be a button given it's an action, and making it a button means it can be activated using either the space or enter keys, instead of just enter. --- enrol/lti/styles.css | 4 ++-- .../local/ltiadvantage/tool_details.mustache | 12 ++++------- .../behat/lti_adv_tool_registration.feature | 20 +++++++++---------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/enrol/lti/styles.css b/enrol/lti/styles.css index f7d8b75d1be..0c39fb2ce9e 100644 --- a/enrol/lti/styles.css +++ b/enrol/lti/styles.css @@ -1,11 +1,11 @@ /* enrol_lti styles */ -#registration-tab-content .input-group-append a.btn { +#registration-tab-content .input-group-append button.btn { border: solid 1px #8f959e; } form#auto_submit { display: none; } -#registration-tab-content .input-group-append a.btn span.pix { +#registration-tab-content .input-group-append button.btn span.pix { padding-left: 0.5rem; } diff --git a/enrol/lti/templates/local/ltiadvantage/tool_details.mustache b/enrol/lti/templates/local/ltiadvantage/tool_details.mustache index 367660d9789..4bc88646c89 100644 --- a/enrol/lti/templates/local/ltiadvantage/tool_details.mustache +++ b/enrol/lti/templates/local/ltiadvantage/tool_details.mustache @@ -70,9 +70,7 @@
@@ -110,9 +108,7 @@
diff --git a/enrol/lti/tests/behat/lti_adv_tool_registration.feature b/enrol/lti/tests/behat/lti_adv_tool_registration.feature index ae86a1d2096..d30e5d55a4f 100644 --- a/enrol/lti/tests/behat/lti_adv_tool_registration.feature +++ b/enrol/lti/tests/behat/lti_adv_tool_registration.feature @@ -198,18 +198,18 @@ Feature: Register a platform with the tool And the "value" attribute of "Initiate login URL" "field" should contain "enrol/lti/login.php" And the "value" attribute of "JWKS URL" "field" should contain "enrol/lti/jwks.php" And the "value" attribute of "Deep linking URL" "field" should contain "enrol/lti/launch_deeplink.php" - And "Copy to clipboard" "link" should exist in the "Registration URL" "table_row" - And "Copy to clipboard" "link" should exist in the "Tool URL" "table_row" - And "Copy to clipboard" "link" should exist in the "Initiate login URL" "table_row" - And "Copy to clipboard" "link" should exist in the "JWKS URL" "table_row" - And "Copy to clipboard" "link" should exist in the "Deep linking URL" "table_row" - When I click on "Copy to clipboard" "link" in the "Registration URL" "table_row" + And "Copy to clipboard" "button" should exist in the "Registration URL" "table_row" + And "Copy to clipboard" "button" should exist in the "Tool URL" "table_row" + And "Copy to clipboard" "button" should exist in the "Initiate login URL" "table_row" + And "Copy to clipboard" "button" should exist in the "JWKS URL" "table_row" + And "Copy to clipboard" "button" should exist in the "Deep linking URL" "table_row" + When I click on "Copy to clipboard" "button" in the "Registration URL" "table_row" Then I should see "Registration URL copied to clipboard" - And I click on "Copy to clipboard" "link" in the "Tool URL" "table_row" + And I click on "Copy to clipboard" "button" in the "Tool URL" "table_row" And I should see "Tool URL copied to clipboard" - And I click on "Copy to clipboard" "link" in the "Initiate login URL" "table_row" + And I click on "Copy to clipboard" "button" in the "Initiate login URL" "table_row" And I should see "Initiate login URL copied to clipboard" - And I click on "Copy to clipboard" "link" in the "JWKS URL" "table_row" + And I click on "Copy to clipboard" "button" in the "JWKS URL" "table_row" And I should see "JWKS URL copied to clipboard" - And I click on "Copy to clipboard" "link" in the "Deep linking URL" "table_row" + And I click on "Copy to clipboard" "button" in the "Deep linking URL" "table_row" And I should see "Deep linking URL copied to clipboard"