Commit 0a2cfbe3 by Peter Fogg

Merge pull request #9738 from edx/peter-fogg/change-studio-help-links

Remove Tender and change Studio help links.
parents 81abdbe8 fec5129a
@shard_1
Feature: CMS.Help
As a course author, I am able to access online help
Scenario: Users can access online help on course listing page
Given There are no courses
And I am logged into Studio
Then I should see online help for "get_started"
Scenario: Users can access online help within a course
Given I have opened a new course in Studio
And I click the course link in Studio Home
Then I should see online help for "outline"
And I go to the course updates page
Then I should see online help for "updates"
And I go to the pages page
Then I should see online help for "pages"
And I go to the files and uploads page
Then I should see online help for "files"
And I go to the textbooks page
Then I should see online help for "textbooks"
And I select Schedule and Details
Then I should see online help for "setting_up"
And I am viewing the grading settings
Then I should see online help for "grading"
And I am viewing the course team settings
Then I should see online help for "course-team"
And I select the Advanced Settings
Then I should see online help for "index"
And I select Checklists from the Tools menu
Then I should see online help for "checklist"
And I go to the import page
Then I should see online help for "import"
And I go to the export page
Then I should see online help for "export"
Scenario: Users can access online help on the unit page
Given I am in Studio editing a new unit
Then I should see online help for "units"
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
from nose.tools import assert_false # pylint: disable=no-name-in-module
from lettuce import step, world
@step(u'I should see online help for "([^"]*)"$')
def see_online_help_for(step, page_name):
# make sure the online Help link exists on this page and contains the expected page name
elements_found = world.browser.find_by_xpath(
'//li[contains(@class, "nav-account-help")]//a[contains(@href, "{page_name}")]'.format(
page_name=page_name
)
)
assert_false(elements_found.is_empty())
# make sure the PDF link on the sock of this page exists
# for now, the PDF link stays constant for all the pages so we just check for "pdf"
elements_found = world.browser.find_by_xpath(
'//section[contains(@class, "sock")]//li[contains(@class, "js-help-pdf")]//a[contains(@href, "pdf")]'
)
assert_false(elements_found.is_empty())
......@@ -204,8 +204,6 @@ LOGGING = get_logger_config(LOG_DIR,
PLATFORM_NAME = ENV_TOKENS.get('PLATFORM_NAME', 'edX')
STUDIO_NAME = ENV_TOKENS.get('STUDIO_NAME', 'edX Studio')
STUDIO_SHORT_NAME = ENV_TOKENS.get('STUDIO_SHORT_NAME', 'Studio')
TENDER_DOMAIN = ENV_TOKENS.get('TENDER_DOMAIN', TENDER_DOMAIN)
TENDER_SUBDOMAIN = ENV_TOKENS.get('TENDER_SUBDOMAIN', TENDER_SUBDOMAIN)
# Event Tracking
if "TRACKING_IGNORE_URL_PATTERNS" in ENV_TOKENS:
......
......@@ -98,6 +98,9 @@ FEATURES['LICENSING'] = True
FEATURES['ENABLE_MOBILE_REST_API'] = True # Enable video bumper in Studio
FEATURES['ENABLE_VIDEO_BUMPER'] = True # Enable video bumper in Studio settings
# Enable partner support link in Studio footer
FEATURES['PARTNER_SUPPORT_EMAIL'] = 'partner-support@example.com'
########################### Entrance Exams #################################
FEATURES['ENTRANCE_EXAMS'] = True
......
......@@ -619,18 +619,6 @@ REQUIRE_ENVIRONMENT = "node"
DEBUG_TOOLBAR_PATCH_SETTINGS = False
################################# TENDER ######################################
# If you want to enable Tender integration (http://tenderapp.com/),
# put in the subdomain where Tender hosts tender_widget.js. For example,
# if you want to use the URL https://example.tenderapp.com/tender_widget.js,
# you should use "example".
TENDER_SUBDOMAIN = None
# If you want to have a vanity domain that points to Tender, put that here.
# For example, "help.myapp.com". Otherwise, should should be your full
# tenderapp domain name: for example, "example.tenderapp.com".
TENDER_DOMAIN = None
################################# CELERY ######################################
# Message configuration
......
......@@ -94,9 +94,6 @@ STATICFILES_STORAGE = 'pipeline.storage.NonPackagingPipelineStorage'
STATIC_URL = "/static/"
PIPELINE_ENABLED = False
TENDER_DOMAIN = "help.edge.edx.org"
TENDER_SUBDOMAIN = "edxedge"
# Update module store settings per defaults for tests
update_module_store_settings(
MODULESTORE,
......
......@@ -83,7 +83,6 @@
'gettext': 'empty:',
'xmodule': 'empty:',
'mathjax': 'empty:',
'tender': 'empty:',
'youtube': 'empty:'
},
......
......@@ -70,14 +70,6 @@ require.config({
// end of Annotation tool files
// externally hosted files
"tender": [
// if TENDER_SUBDOMAIN is defined, use that; otherwise, use a dummy value
// (the application JS will never `require(['tender'])` if it's not defined)
"//" + (typeof TENDER_SUBDOMAIN === "string" ? TENDER_SUBDOMAIN : "example") + ".tenderapp.com/tender_widget",
// if tender fails to load, fallback on a local file
// so that require doesn't fall over
"js/src/tender_fallback"
],
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": [
// youtube URL does not end in ".js". We add "?noext" to the path so
......@@ -172,9 +164,6 @@ require.config({
deps: ["backbone"],
exports: "Backbone.Paginator"
},
"tender": {
exports: 'Tender'
},
"youtube": {
exports: "YT"
},
......
......@@ -53,7 +53,6 @@ requirejs.config({
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext",
"tender": "//api.tenderapp.com/tender_widget",
"coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix",
"js/spec/test_utils": "js/spec/test_utils",
......
......@@ -44,7 +44,6 @@ requirejs.config({
"mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured",
"youtube": "//www.youtube.com/player_api?noext",
"tender": "//api.tenderapp.com/tender_widget.js"
"coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix"
}
......
......@@ -61,9 +61,6 @@ domReady(function() {
// general link management - smooth scrolling page links
$('a[rel*="view"][href^="#"]').bind('click', smoothScrollLink);
// tender feedback window scrolling
$('a.show-tender').bind('click', smoothScrollTop);
IframeUtils.iframeBinding();
// disable ajax caching in IE so that backbone fetches work
......
......@@ -37,7 +37,6 @@
@import 'elements/header';
@import 'elements/footer';
@import 'elements/sock';
@import 'elements/tender-widget';
@import 'elements/system-feedback'; // alerts, notifications, states
@import 'elements/system-help'; // help UI
@import 'elements/modal'; // interstitial UI, dialogs, modal windows
......
......@@ -86,6 +86,7 @@
.action-item {
@include float(left);
@include margin-right($baseline/2);
margin-bottom: ($baseline/2);
&:last-child {
@include margin-right(0);
......
// tender help/support widget
// ====================
// UI: hiding the default tender help "tag" element
#tender_toggler {
display: none;
}
#tender_frame, #tender_window {
background-image: none !important;
background: none;
}
#tender_window {
border-radius: 3px;
box-shadow: 0 2px 3px $shadow;
height: ($baseline*35) !important;
background: $white !important;
border: 2px solid $blue;
}
#tender_window {
padding: 0 !important;
}
#tender_frame {
background: $white;
}
#tender_closer {
color: $white-t2 !important;
text-transform: uppercase;
top: 16px !important;
&:hover {
color: $white !important;
}
}
// ====================
// tender style overrides - not rendered through here, but an archive is needed
#tender_frame iframe html {
font-size: 62.5%;
}
.widget-layout {
font-family: 'Open Sans', sans-serif;
}
.widget-layout .search,
.widget-layout .tabs,
.widget-layout .footer,
.widget-layout .header h1 a {
display: none;
}
.widget-layout .header {
background: rgb(0, 159, 230);
padding: ($baseline/2) $baseline;
}
.widget-layout h1, .widget-layout h2, .widget-layout h3, .widget-layout h4, .widget-layout h5, .widget-layout h6, .widget-layout label {
@extend %t-strong;
}
.widget-layout .header h1 {
@extend %t-title4;
}
.widget-layout .content {
overflow: auto;
height: auto !important;
padding: 20px;
}
.widget-layout .flash {
margin: -10px 0 15px 0;
padding: 10px 20px !important;
background-image: none !important;
}
.widget-layout .flash-error {
background: rgb(178, 6, 16) !important;
color: rgb(255,255,255) !important;
}
.widget-layout label {
@extend %t-copy-sub1;
@extend %t-strong;
margin-bottom: ($baseline/4);
color: #4c4c4c;
}
.widget-layout input[type="text"], .widget-layout textarea {
@extend %t-copy-base;
padding: 10px;
color: rgb(0,0,0) !important;
border: 1px solid #b0b6c2;
border-radius: 2px;
background-color: #edf1f5;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #edf1f5),color-stop(100%, #fdfdfe));
background-image: -webkit-linear-gradient(top, #edf1f5,#fdfdfe);
background-image: -moz-linear-gradient(top, #edf1f5,#fdfdfe);
background-image: -ms-linear-gradient(top, #edf1f5,#fdfdfe);
background-image: -o-linear-gradient(top, #edf1f5,#fdfdfe);
background-image: linear-gradient(top, #edf1f5,#fdfdfe);
background-color: #edf1f5;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
-moz-box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
box-shadow: 0 1px 2px rgba(0,0,0,0.1) inset;
}
.widget-layout input[type="text"]:focus, .widget-layout textarea:focus {
background-color: #fffcf1;
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fffcf1),color-stop(100%, #fffefd));
background-image: -webkit-linear-gradient(top, #fffcf1,#fffefd);
background-image: -moz-linear-gradient(top, #fffcf1,#fffefd);
background-image: -ms-linear-gradient(top, #fffcf1,#fffefd);
background-image: -o-linear-gradient(top, #fffcf1,#fffefd);
background-image: linear-gradient(top, #fffcf1,#fffefd);
outline: 0;
}
.widget-layout textarea {
width: 97%;
}
.widget-layout p.note {
text-align: right !important;
display: inline-block !important;
position: absolute !important;
right: -130px !important;
top: -5px !important;
font-size: 13px !important;
opacity: 0.80;
}
.widget-layout .form-actions {
margin: 15px 0;
border: none;
padding: 0;
}
.widget-layout dl.form {
float: none;
width: 100%;
border-bottom: 1px solid $gray-l5;
margin-bottom: ($baseline/2);
padding-bottom: ($baseline/2);
}
.widget-layout dl.form:last-child {
border: none;
padding-bottom: 0;
margin-bottom: $baseline;
}
.widget-layout dl.form dt, .widget-layout dl.form dd {
display: inline-block;
vertical-align: middle;
}
.widget-layout dl.form dt {
margin-right: ($baseline*0.75);
width: 70px;
}
.widget-layout dl.form dd {
width: 65%;
position: relative;
}
// specific elements
.widget-layout #discussion_body {
}
.widget-layout #discussion_body:before {
@extend %t-copy-sub1;
@extend %t-strong;
content: "What Question or Feedback Would You Like to Share?";
display: block;
margin-bottom: ($baseline/4);
color: #4c4c4c;
}
.widget-layout dl#brain_buster_captcha {
float: none;
width: 100%;
border-top: 1px solid $gray-l5;
margin-top: ($baseline/2);
padding-top: ($baseline/2);
}
.widget-layout dl#brain_buster_captcha dd {
display: block !important;
}
.widget-layout dl#brain_buster_captcha #captcha_answer {
border-color: #333;
}
.widget-layout dl#brain_buster_captcha dd label {
@extend %t-strong;
display: block;
margin: 0 15px 5px 0 !important;
}
.widget-layout dl#brain_buster_captcha dd #captcha_answer {
display: block;
width: 97%;
}
.widget-layout .form-actions .btn-post_topic {
@extend %t-copy-base;
@extend %t-strong;
display: block;
width: 100%;
height: auto !important;
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset,0 0 0 $transparent;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset,0 0 0 $transparent;
box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset,0 0 0 $transparent;
-webkit-transition-property: background-color,0.15s;
-moz-transition-property: background-color,0.15s;
-ms-transition-property: background-color,0.15s;
-o-transition-property: background-color,0.15s;
transition-property: background-color,0.15s;
-webkit-transition-duration: box-shadow,0.15s;
-moz-transition-duration: box-shadow,0.15s;
-ms-transition-duration: box-shadow,0.15s;
-o-transition-duration: box-shadow,0.15s;
transition-duration: box-shadow,0.15s;
-webkit-transition-timing-function: ease-out;
-moz-transition-timing-function: ease-out;
-ms-transition-timing-function: ease-out;
-o-transition-timing-function: ease-out;
transition-timing-function: ease-out;
-webkit-transition-delay: 0;
-moz-transition-delay: 0;
-ms-transition-delay: 0;
-o-transition-delay: 0;
transition-delay: 0;
border: 1px solid #34854c;
border-radius: 3px;
background-color: rgba(255,255,255,0.3);
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, rgba(255,255,255,0.3)),color-stop(100%, rgba(255,255,255,0)));
background-image: -webkit-linear-gradient(top, rgba(255,255,255,0.3),rgba(255,255,255,0));
background-image: -moz-linear-gradient(top, rgba(255,255,255,0.3),rgba(255,255,255,0));
background-image: -ms-linear-gradient(top, rgba(255,255,255,0.3),rgba(255,255,255,0));
background-image: -o-linear-gradient(top, rgba(255,255,255,0.3),rgba(255,255,255,0));
background-image: linear-gradient(top, rgba(255,255,255,0.3),rgba(255,255,255,0));
background-color: #25b85a;
-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset;
-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset;
box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset;
color: $white;
text-align: center;
margin-top: $baseline;
padding: ($baseline/2) $baseline;
}
.widget-layout .form-actions #private-discussion-opt {
float: none;
text-align: left;
margin: 0 0 15px 0;
}
.widget-layout .form-actions .btn-post_topic:hover, .widget-layout .form-actions .btn-post_topic:active {
background-color: #16ca57;
color: $white;
}
......@@ -24,16 +24,6 @@
)}</p>
</div>
</div>
<ul class="list-actions">
% if settings.TENDER_DOMAIN:
<li class="action-item">
<a href="http://${settings.TENDER_DOMAIN}/discussion/new" class="action action-primary show-tender">
${_('Contact {platform_name} Support').format(platform_name=settings.PLATFORM_NAME)}
</a>
</li>
% endif
</ul>
</div>
</section>
</div>
......
......@@ -42,7 +42,6 @@ import json
<script type="text/javascript">
window.baseUrl = ${json.dumps(settings.STATIC_URL)};
window.TENDER_SUBDOMAIN = ${json.dumps(settings.TENDER_SUBDOMAIN)};
var require = {baseUrl: window.baseUrl};
</script>
<script type="text/javascript" src="${static.url("js/vendor/require.js")}"></script>
......@@ -65,7 +64,6 @@ import json
<%include file="widgets/sock.html" args="online_help_token=online_help_token" />
% endif
<%include file="widgets/footer.html" />
<%include file="widgets/tender.html" />
<div id="page-notification"></div>
</div>
......
......@@ -14,15 +14,8 @@ from django.conf import settings
</%block>
<%!
if settings.TENDER_DOMAIN:
help_link_start = '<a href="http://{domain}/discussion/new" class="show-tender" title="{title}">'.format(
domain=settings.TENDER_DOMAIN,
title=_("Use our feedback tool, Tender, to share your feedback")
),
help_link_end = '</a>'
else:
help_link_start = '<a href="mailto:{email}">'.format(email=settings.TECH_SUPPORT_EMAIL)
help_link_end = '</a>'
help_link_start = '<a href="mailto:{email}">'.format(email=settings.TECH_SUPPORT_EMAIL)
help_link_end = '</a>'
%>
<%block name="content">
......
......@@ -496,13 +496,6 @@
<a href="${get_online_help_info(online_help_token())['doc_url']}" target="_blank">${_("Getting Started with {studio_name}").format(studio_name=settings.STUDIO_NAME)}</a>
</li>
% if settings.TENDER_DOMAIN:
<li class="action-item">
<a href="http://${settings.TENDER_DOMAIN}/discussion/new" class="action action-primary" title="${_("Use our feedback tool, Tender, to request help")}">
${_("Request help with {studio_name}").format(studio_name=settings.STUDIO_NAME)}
</a>
</li>
% endif
</ol>
</div>
......@@ -530,14 +523,8 @@
<%!
from django.conf import settings
if settings.TENDER_DOMAIN:
help_link_start = '<a href="http://{domain}/discussion/new" class="show-tender">'.format(
domain=settings.TENDER_DOMAIN,
)
help_link_end = '</a>'
else:
help_link_start = '<a href="mailto:{email}">'.format(email=settings.TECH_SUPPORT_EMAIL)
help_link_end = '</a>'
help_link_start = '<a href="mailto:{email}">'.format(email=settings.TECH_SUPPORT_EMAIL)
help_link_end = '</a>'
%>
<p>${_("Your request to author courses in {studio_name} has been denied. Please {link_start}contact {platform_name} Staff with further questions{link_end}.").format(
studio_name=settings.STUDIO_NAME,
......@@ -573,16 +560,6 @@ else:
<div class="bit">
<h3 class="title title-3">${_('Need help?')}</h3>
<p>${_('Please check your Junk or Spam folders in case our email isn\'t in your INBOX. Still can\'t find the verification email? Request help via the link below.')}</p>
<ol class='list-actions'>
% if settings.TENDER_DOMAIN:
<li class="action-item">
<a href="http://${settings.TENDER_DOMAIN}/discussion/new" class="show-tender" title="${_("Use our feedback tool, Tender, to request help")}">
${_("Request help with your {studio_name} account").format(studio_name=settings.STUDIO_NAME)}
</a>
</li>
% endif
</ol>
</div>
</aside>
</section>
......
......@@ -45,20 +45,6 @@ from django.utils.translation import ugettext as _
<input name="honor_code" type="checkbox" value="true" checked="true" hidden="true">
</form>
</article>
% if settings.TENDER_DOMAIN:
<aside class="content-supplementary" role="complementary">
<h2 class="sr">${_("{studio_name} Support").format(studio_name=settings.STUDIO_SHORT_NAME)}</h2>
<div class="bit">
<h3 class="title-3">${_("Need Help?")}</h3>
<p>${_('Having trouble with your account? Use {link_start}our support center{link_end} to look over self help steps, find solutions others have found to the same problem, or let us know of your issue.').format(
link_start='<a href="http://{domain}" rel="external">'.format(domain=settings.TENDER_DOMAIN),
link_end='</a>',
)}</p>
</div>
</aside>
% endif
</section>
</div>
</%block>
......
......@@ -19,11 +19,6 @@ from django.core.urlresolvers import reverse
<li class="nav-item nav-peripheral-pp">
<a data-rel="edx.org" href="${marketing_link('PRIVACY')}">${_("Privacy Policy")}</a>
</li>
% if settings.TENDER_DOMAIN and user.is_authenticated():
<li class="nav-item nav-peripheral-feedback">
<a data-rel="edx.org" href="http://${settings.TENDER_DOMAIN}/discussion/new" class="show-tender" title="${_('Use our feedback tool, Tender, to share your feedback')}">${_("Contact Us")}</a>
</li>
% endif
</ol>
</nav>
</div>
......
......@@ -20,46 +20,56 @@ from django.core.urlresolvers import reverse
</header>
<div class="support">
<h3 class="title">${_("{studio_name} Documentation").format(studio_name=settings.STUDIO_NAME)}</h3>
<%!
from django.conf import settings
<div class="copy">
<p>${_("You can click Help in the upper right corner of any page to get more information about the page you're on. You can also use the links below to download the Building and Running an {platform_name} Course PDF file, to go to the {platform_name} Author Support site, or to enroll in edX101.").format(platform_name=settings.PLATFORM_NAME)}</p>
</div>
is_edx_domain = settings.FEATURES.get('IS_EDX_DOMAIN', False)
partner_email = settings.FEATURES.get('PARTNER_SUPPORT_EMAIL', '')
<ul class="list-actions">
<li class="action-item js-help-pdf">
<a href="${get_online_help_info(online_help_token)['pdf_url']}" target="_blank" rel="external" class="action action-primary">${_("Building and Running an {platform_name} Course PDF").format(platform_name=settings.PLATFORM_NAME)}</a>
</li>
% if settings.TENDER_DOMAIN:
<li class="action-item">
<a href="http://${settings.TENDER_DOMAIN}" rel="external" class="action action-primary">${_("{studio_name} Author Support").format(studio_name=settings.STUDIO_NAME)}</a>
<span class="tip">${_("{studio_name} Author Support").format(studio_name=settings.STUDIO_NAME)}</span>
</li>
% endif
<li class="action-item">
<a href="https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1" rel="external" class="action action-primary">${_("Enroll in edX101")}</a>
<span class="tip">${_("How to use {studio_name} to build your course").format(studio_name=settings.STUDIO_NAME)}</span>
</li>
</ul>
</div>
% if settings.TENDER_DOMAIN:
<div class="feedback">
<h3 class="title">${_("Request help with {studio_name}").format(studio_name=settings.STUDIO_NAME)}</h3>
<div class="copy">
<p>${_("Have problems, questions, or suggestions about {studio_name}?").format(studio_name=settings.STUDIO_NAME)}</p>
</div>
links = [{
'href': 'http://docs.edx.org',
'sr_mouseover_text': _('Access documentation on http://docs.edx.org'),
'text': _('edX Documentation'),
'condition': True
}, {
'href': 'https://partners.edx.org',
'sr_mouseover_text': _('Access Course Staff Support on the Partner Portal to submit or review support tickets'),
'text': _('edX Partner Portal'),
'condition': is_edx_domain
}, {
'href': 'https://open.edx.org',
'sr_mouseover_text': _('Access the Open edX Portal'),
'text': _('Open edX Portal'),
'condition': not is_edx_domain
}, {
'href': 'https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1',
'sr_mouseover_text': _('Enroll in edX101: Overview of Creating an edX Course'),
'text': _('Enroll in edX101'),
'condition': True
}, {
'href': 'https://www.edx.org/course/creating-course-edx-studio-edx-studiox',
'sr_mouseover_text': _('Enroll in StudioX: Creating a Course with edX Studio'),
'text': _('Enroll in StudioX'),
'condition': True
}, {
'href': 'mailto:{email}'.format(email=partner_email),
'sr_mouseover_text': _('Send an email to {email}').format(email=partner_email),
'text': _('Contact Us'),
'condition': 'PARTNER_SUPPORT_EMAIL' in settings.FEATURES
}]
%>
<ul class="list-actions">
<li class="action-item">
<a href="http://${settings.TENDER_DOMAIN}/discussion/new" class="action action-primary" title="${_("Use our feedback tool, Tender, to share your feedback")}"><i class="icon fa fa-comments"></i>${_("Contact Us")}</a>
</li>
% for link in links:
% if link['condition']:
<li class="action-item">
<a href="${link['href']}" title="${link['sr_mouseover_text']}" rel="external" class="action action-primary">${link['text']}</a>
<span class="tip">${link['sr_mouseover_text']}</span>
</li>
%endif
% endfor
</ul>
</div>
% endif
</section>
</div>
</div>
% if settings.TENDER_SUBDOMAIN and user.is_authenticated():
<script type="text/javascript">
window.Tender = {
hideToggle: true,
title: '',
body: '',
hide_kb: 'true',
widgetToggles: document.getElementsByClassName('show-tender')
}
// In order to avoid requirejs timeout errors should tender not be
// available, we're not using domReady as a loader plugin here.
// For more details, please see the note at
// http://requirejs.org/docs/api.html#pageload
require(['domReady'], function (domReady) {
domReady(function () {
require(['tender']);
});
});
</script>
% endif
console.error("Can't load Tender -- anything that relies on it will fail");
......@@ -4,6 +4,7 @@ Utility methods useful for Studio page tests.
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys
from bok_choy.javascript import js_defined
from bok_choy.promise import EmptyPromise
from ..common.utils import click_css, wait_for_notification
......@@ -199,3 +200,17 @@ def verify_ordering(test_class, page, expected_orderings):
blocks_checked.add(expected)
break
test_class.assertEqual(len(blocks_checked), len(xblocks))
def click_studio_help(page):
"""Click the Studio help link in the page footer."""
page.q(css='.cta-show-sock').click()
EmptyPromise(
lambda: page.q(css='.support .list-actions a').results[0].text != '',
'Support section opened'
).fulfill()
def studio_help_links(page):
"""Return the list of Studio help links in the page footer."""
return page.q(css='.support .list-actions a').results
"""
Test the Studio help links.
"""
from .base_studio_test import StudioCourseTest
from ...pages.studio.index import DashboardPage
from ...pages.studio.utils import click_studio_help, studio_help_links
class StudioHelpTest(StudioCourseTest):
"""Tests for Studio help."""
def test_studio_help_links(self):
"""Test that the help links are present and have the correct content."""
page = DashboardPage(self.browser)
page.visit()
click_studio_help(page)
links = studio_help_links(page)
expected_links = [{
'href': u'http://docs.edx.org/',
'text': u'edX Documentation',
'sr_text': u'Access documentation on http://docs.edx.org'
}, {
'href': u'https://open.edx.org/',
'text': u'Open edX Portal',
'sr_text': u'Access the Open edX Portal'
}, {
'href': u'https://www.edx.org/course/overview-creating-edx-course-edx-edx101#.VO4eaLPF-n1',
'text': u'Enroll in edX101',
'sr_text': u'Enroll in edX101: Overview of Creating an edX Course'
}, {
'href': u'https://www.edx.org/course/creating-course-edx-studio-edx-studiox',
'text': u'Enroll in StudioX',
'sr_text': u'Enroll in StudioX: Creating a Course with edX Studio'
}, {
'href': u'mailto:partner-support@example.com',
'text': u'Contact Us',
'sr_text': 'Send an email to partner-support@example.com'
}]
for expected, actual in zip(expected_links, links):
self.assertEqual(expected['href'], actual.get_attribute('href'))
self.assertEqual(expected['text'], actual.text)
self.assertEqual(
expected['sr_text'],
actual.find_element_by_xpath('following-sibling::span').text
)
......@@ -50,7 +50,6 @@
'domReady': 'xmodule_js/common_static/js/vendor/domReady',
'mathjax': '//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured',
'youtube': '//www.youtube.com/player_api?noext',
'tender': '//api.tenderapp.com/tender_widget',
'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix',
'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin',
'xmodule_js/common_static/js/test/add_ajax_prefix': 'xmodule_js/common_static/js/test/add_ajax_prefix',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment