File tree 2 files changed +24
-0
lines changed
app/templates/views/guidance/using-notify
2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 10
10
{% block content_column_content %}
11
11
12
12
< h1 class ="heading-large "> Documentation</ h1 >
13
+
14
+ {% if current_user.platform_admin %}
15
+ < a href ="{{ url_for( ".guidance_api_documentation_section ") }}"
16
+ class="govuk-link govuk-link--no-visited-state "
17
+ target ="_blank " rel ="noopener ">
18
+ Send a link to docs section
19
+ </ a >
20
+ < p > </ p >
21
+ {% endif %}
22
+
13
23
< p class ="govuk-body "> This documentation is for developers who want to integrate the GOV.UK Notify API with a web application or back office system.</ p >
14
24
< h2 class ="heading-medium " id ="client-libraries "> Client libraries</ h2 >
15
25
< p class ="govuk-body "> Links to documentation open in a new tab.</ p >
Original file line number Diff line number Diff line change @@ -386,6 +386,20 @@ def test_trial_mode_sending_limits(client_request):
386
386
]
387
387
388
388
389
+ def test_guidance_api_documentation_links_to_section_flow_for_platform_admins (client_request , platform_admin_user ):
390
+ client_request .login (platform_admin_user )
391
+
392
+ page = client_request .get ("main.guidance_api_documentation" )
393
+
394
+ assert len (page .select ('a[href^="{link}"]' .format (link = url_for (".guidance_api_documentation_section" )))) == 1
395
+
396
+
397
+ def test_guidance_api_documentation_does_not_link_to_section_flow_for_non_platform_admins (client_request ):
398
+ page = client_request .get ("main.guidance_api_documentation" )
399
+
400
+ assert len (page .select ('a[href^="{link}"]' .format (link = url_for (".guidance_api_documentation_section" )))) == 0
401
+
402
+
389
403
def test_GET_guidance_api_documentation_section (client_request ):
390
404
page = client_request .get ("main.guidance_api_documentation_section" )
391
405
You can’t perform that action at this time.
0 commit comments