replace Link with Button in Course Home Dialog
refs: UIDEV-270 TEST PLAN: - set-up: ensure you have Pages but no front page set - navigate to a course - select home from the sub navigation - select "choose home page" from the right side bar - see 'Front Page must be set first' - next turn off the Front Page and repeat the steps to choose a home page... should see the name of the Front Page with a change link (since in context has been kept as a link that will underline by default) - lastly, ensure 'Front Page must be set first' underlines if the user feature is turned on to underline links Change-Id: I043ec7b44f9ad4f83d53f4089f490401900b15c2 Reviewed-on: https://gerrit.instructure.com/197974 Tested-by: Jenkins Reviewed-by: Jennifer Stern <jstern@instructure.com> QA-Review: Daniel Sasaki <dsasaki@instructure.com> Product-Review: Pam Hiett <phiett@instructure.com>
This commit is contained in:
parent
d74d78e015
commit
90c7bf938a
|
@ -72,7 +72,7 @@ class CourseHomeDialog extends React.Component {
|
|||
<AccessibleContent>*</AccessibleContent>
|
||||
<ScreenReaderContent>
|
||||
<Link href={wikiUrl}>
|
||||
{I18n.t('Front page must be set first')}
|
||||
{I18n.t('Front Page must be set first')}
|
||||
</Link>
|
||||
</ScreenReaderContent>
|
||||
</span>
|
||||
|
@ -163,15 +163,17 @@ class CourseHomeDialog extends React.Component {
|
|||
null
|
||||
) : (
|
||||
<div className="content-box-mini">
|
||||
* <Link href={wikiUrl}>{I18n.t('Front page must be set first')}
|
||||
</Link></div>
|
||||
* <Button variant="link" href={wikiUrl} theme={{mediumPadding: '0', mediumHeight: '1.5rem'}}>
|
||||
{I18n.t('Front Page must be set first')}
|
||||
</Button>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
</ModalBody>
|
||||
|
||||
<ModalFooter>
|
||||
<Button onClick={this.props.onRequestClose}>{I18n.t('Cancel')}</Button>
|
||||
<Button onClick={this.props.onRequestClose} margin="0 x-small">{I18n.t('Cancel')}</Button>
|
||||
<Button
|
||||
onClick={this.onSubmit}
|
||||
disabled={this.props.isPublishing && this.state.selectedDefaultView === 'modules'}
|
||||
|
|
|
@ -109,7 +109,7 @@ test('calls onRequestClose when cancel is clicked', () => {
|
|||
onRequestClose={onRequestClose}
|
||||
/>
|
||||
)
|
||||
const cancelBtn = dialog.find('Button').first()
|
||||
const cancelBtn = dialog.find('Button').at(1)
|
||||
equal(cancelBtn.props().children, 'Cancel')
|
||||
cancelBtn.simulate('click')
|
||||
ok(onRequestClose.called)
|
||||
|
|
Loading…
Reference in New Issue