░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/spec/coffeescripts/views/outcomes
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: ContentViewSpec.js
/* * Copyright (C) 2014 - present Instructure, Inc. * * This file is part of Canvas. * * Canvas is free software: you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License as published by the Free * Software Foundation, version 3 of the License. * * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License along * with this program. If not, see <http://www.gnu.org/licenses/>. */ import $ from 'jquery' import Backbone from '@canvas/backbone' import ContentView from '@canvas/outcome-content-view' import fakeENV from 'helpers/fakeENV' import instructionsTemplate from 'ui/features/learning_outcomes/jst/mainInstructions.handlebars' import assertions from 'helpers/assertions' import {publish} from 'jquery-tinypubsub' QUnit.module('CollectionView', { setup() { fakeENV.setup() const viewEl = $('<div id="content-view-el">original_text</div>') viewEl.appendTo(fixtures) this.contentView = new ContentView({ el: viewEl, instructionsTemplate, renderengInstructions: false, }) this.contentView.$el.appendTo($('#fixtures')) this.contentView.render() }, teardown() { fakeENV.teardown() this.contentView.remove() }, }) test('should be accessible', function (assert) { const done = assert.async() assertions.isAccessible(this.contentView, done, {a11yReport: true}) }) test('collectionView replaces text with warning and link on renderNoOutcomeWarning event', function () { ok(this.contentView.$el.text().match(/original_text/)) publish('renderNoOutcomeWarning') ok(this.contentView.$el.text().match(/You have no outcomes/)) ok(!this.contentView.$el.text().match(/original_text/)) ok( this.contentView.$el .find('a') .attr('href') .search(`${this.contentView._contextPath()}/outcomes`) > 0 ) })
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 ContentViewSpec.js
JS
2.1 KB
2023-09-24 03:36
EDIT
📄 OutcomeGroupViewSpec.js
JS
3.4 KB
2023-09-24 03:36
EDIT
📄 OutcomeViewSpec.js
JS
23.8 KB
2023-09-24 03:36
EDIT