Change copy for collaborations getting started

Fixes PLAT-1689

Test Plan:
 - When no collaboration lti tools are setup
   and you have no collaborations created
 - The copy should match the new copy in the ticket

Change-Id: Ie027ed13f0afd70c90b05479abe6530dba87f5ab
Reviewed-on: https://gerrit.instructure.com/85198
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
This commit is contained in:
Matthew Sessions 2016-07-13 14:24:11 -06:00
parent d2425d8d2c
commit 358946f9e0
2 changed files with 10 additions and 12 deletions

View File

@ -7,18 +7,16 @@ define([
renderContent() {
let header, content, link;
let [context, contextId] = splitAssetString((ENV.PARENT_CONTEXT && ENV.PARENT_CONTEXT.context_asset_string) || ENV.context_asset_string)
const url = `/${context}/${contextId}/settings/configurations`;
if (this.props.ltiCollaborators.ltiCollaboratorsData.length === 0) {
if (ENV.current_user_roles.indexOf("teacher") !== -1) {
header = I18n.t('No LTIs Configured')
content = I18n.t('There are no Configured LTIs that interact with collaborations.')
link = <a rel="external" href={url}>{I18n.t('Set some up now')}</a>
header = I18n.t('No Collaboration Apps')
content = I18n.t('Collaborations are web-based tools to work collaboratively on tasks like taking notes or grouped papers. Get started by adding a collaboration app.')
link = <a rel="external" href='https://community.canvaslms.com/docs/DOC-2627'>{I18n.t('Learn more about collaborations')}</a>
}
else{
header = I18n.t('No LTIs Configured')
content = I18n.t('You have no LTIs configured to create collaborations with. Talk to your teacher to get some set up.')
header = I18n.t('No Collaboration Apps')
content = I18n.t('You have no Collaboration apps configured. Talk to your teacher to get some set up.')
link = null
}
}

View File

@ -40,9 +40,9 @@ define([
const actualContent = TestUtils.findRenderedDOMComponentWithTag(component, "p").getDOMNode().innerText
const actualHeader = TestUtils.findRenderedDOMComponentWithClass(component, "ic-Action-header__Heading").getDOMNode().innerText;
const actualLinkText = TestUtils.findRenderedDOMComponentWithTag(component, "a").getDOMNode().innerText
const expectedHeader = "No LTIs Configured"
const expectedContent = "There are no Configured LTIs that interact with collaborations."
const expectedLinkText = "Set some up now"
const expectedHeader = "No Collaboration Apps"
const expectedContent = "Collaborations are web-based tools to work collaboratively on tasks like taking notes or grouped papers. Get started by adding a collaboration app."
const expectedLinkText = "Learn more about collaborations"
ok(expectedHeader === actualHeader);
ok(expectedContent === actualContent);
ok(expectedLinkText === actualLinkText);
@ -54,8 +54,8 @@ define([
let component = TestUtils.renderIntoDocument(<GettingStartedCollaborations {...props}/>);
const actualContent = TestUtils.findRenderedDOMComponentWithTag(component, "p").getDOMNode().innerText
const actualHeader = TestUtils.findRenderedDOMComponentWithClass(component, "ic-Action-header__Heading").getDOMNode().innerText;
const expectedHeader = "No LTIs Configured"
const expectedContent = "You have no LTIs configured to create collaborations with. Talk to your teacher to get some set up."
const expectedHeader = "No Collaboration Apps"
const expectedContent = "You have no Collaboration apps configured. Talk to your teacher to get some set up."
ok(expectedHeader === actualHeader);
ok(expectedContent === actualContent);
ok(TestUtils.scryRenderedDOMComponentsWithTag(component, "a").length === 0)