Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
942622f
Delete old and unused management commands.
rtibbles Jul 7, 2021
d3343db
Remove unused templates and sample files.
rtibbles Jul 7, 2021
060c8ea
Delete obselete documentation and update locust tests.
rtibbles Jul 7, 2021
2fea9af
Clean up root dir.
rtibbles Jul 7, 2021
42d9443
Remove unused views.
rtibbles Jul 7, 2021
2086d01
Delete unused permissions, tasks, and models.
rtibbles Jul 7, 2021
7c3afa2
Delete unused utils and template tags.
rtibbles Jul 7, 2021
ed48359
Delete unused Exercise model.
rtibbles Jul 8, 2021
aef3fdf
Remove references to exportchannel management command.
rtibbles Jul 8, 2021
4c91ae0
Make sure our JS dependencies reflect what we actually depend on.
rtibbles Aug 11, 2021
6fe56b3
Merge pull request #3227 from rtibbles/spring_clean
bjester Aug 25, 2021
2baeeb5
Merge pull request #3260 from rtibbles/dependencies
bjester Aug 31, 2021
24d06b5
Bump codemirror from 5.56.0 to 5.58.2
dependabot[bot] Aug 31, 2021
cda796b
Move minio to dev requirements, update urllib3
bjester Aug 31, 2021
267a438
Update dev requirements
bjester Aug 31, 2021
9c2067c
Merge pull request #3270 from learningequality/dependabot/npm_and_yar…
bjester Aug 31, 2021
447fd82
Merge pull request #3271 from bjester/minio-dev-only
rtibbles Aug 31, 2021
1a53c4f
Update KDS, move jquery injection to avoid issues linking KDS in dev env
bjester Aug 31, 2021
10c4f8a
Merge pull request #3274 from learningequality/hotfixes
rtibbles Aug 31, 2021
2751b1c
Merge pull request #3272 from bjester/kds-update
rtibbles Aug 31, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .huskyrc

This file was deleted.

23 changes: 0 additions & 23 deletions __mocks__/backbone.js

This file was deleted.

48 changes: 0 additions & 48 deletions __mocks__/vue.js

This file was deleted.

4 changes: 0 additions & 4 deletions codecov.yml

This file was deleted.

5 changes: 3 additions & 2 deletions contentcuration/contentcuration/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
from django.contrib import admin

from contentcuration.models import Exercise, AssessmentItem, License, User
from contentcuration.models import AssessmentItem
from contentcuration.models import License
from contentcuration.models import User

admin.site.register(Exercise)
admin.site.register(AssessmentItem)
admin.site.register(License)

Expand Down
6 changes: 4 additions & 2 deletions contentcuration/contentcuration/apps.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.apps import AppConfig
from django.conf import settings

from contentcuration.utils.minio_utils import ensure_storage_bucket_public
from contentcuration.utils.storage_common import is_gcs_backend


class ContentConfig(AppConfig):
Expand All @@ -10,5 +10,7 @@ class ContentConfig(AppConfig):
def ready(self):
# see note in the celery_signals.py file for why we import here.
import contentcuration.utils.celery.signals # noqa
if settings.AWS_AUTO_CREATE_BUCKET:

if settings.AWS_AUTO_CREATE_BUCKET and not is_gcs_backend():
from contentcuration.utils.minio_utils import ensure_storage_bucket_public
ensure_storage_bucket_public()
16 changes: 0 additions & 16 deletions contentcuration/contentcuration/dev_urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from drf_yasg.views import get_schema_view
from rest_framework import permissions

import contentcuration.views.files as file_views
from .urls import urlpatterns


Expand Down Expand Up @@ -48,21 +47,6 @@ def webpack_redirect_view(request):
r"^redoc/$", schema_view.with_ui("redoc", cache_timeout=0), name="schema-redoc"
),
re_path(r"^api-auth/", include("rest_framework.urls", namespace="rest_framework")),
re_path(
r"^" + settings.STORAGE_URL[1:] + "(?P<path>.*)$",
file_views.debug_serve_file,
name="debug_serve_file",
),
re_path(
r"^" + settings.CONTENT_DATABASE_URL[1:] + "(?P<path>.*)$",
file_views.debug_serve_content_database_file,
name="content_database_debug_serve_file",
),
re_path(
r"^" + settings.CSV_URL[1:] + "(?P<path>.*)$",
file_views.debug_serve_file,
name="csv_debug_serve_file",
),
]

if getattr(settings, "DEBUG_PANEL_ACTIVE", False):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/

(function() {
var jQuery = window.jQuery,
var jQuery = require('jquery'),
undefined,
mqCmdId = 'mathquill-command-id',
mqBlockId = 'mathquill-block-id',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'underscore';
import Vue from 'vue';
import Vuetify from 'vuetify';
import { mount } from '@vue/test-utils';
Expand All @@ -18,19 +17,16 @@ function makeWrapper(kind) {
}

describe('ContentNodeIcon', () => {
it('should display the correct icon', () => {
function test(kind) {
let wrapper = makeWrapper(kind.value);
expect(wrapper.find('.v-icon').text()).toContain(kind.icon);
}
let testIcons = [
{ value: 'topic', icon: 'folder' },
{ value: 'video', icon: 'ondemand_video' },
{ value: 'audio', icon: 'music_note' },
{ value: 'exercise', icon: 'assignment' },
{ value: 'document', icon: 'class' },
{ value: 'html5', icon: 'widgets' },
];
_.each(testIcons, test);
const testIcons = [
{ value: 'topic', icon: 'folder' },
{ value: 'video', icon: 'ondemand_video' },
{ value: 'audio', icon: 'music_note' },
{ value: 'exercise', icon: 'assignment' },
{ value: 'document', icon: 'class' },
{ value: 'html5', icon: 'widgets' },
];
it.each(testIcons)('should display the correct icon $value', kind => {
const wrapper = makeWrapper(kind.value);
expect(wrapper.find('.v-icon').text()).toContain(kind.icon);
});
});
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'underscore';
import Vue from 'vue';
import Vuetify from 'vuetify';
import { mount } from '@vue/test-utils';
Expand All @@ -18,7 +17,7 @@ function makeWrapper() {
});
}

let testLanguages = _.first(LanguagesList, 10);
const testLanguages = LanguagesList.slice(0, 10);

describe('languageDropdown', () => {
let wrapper;
Expand All @@ -27,16 +26,13 @@ describe('languageDropdown', () => {
formWrapper = makeWrapper();
wrapper = formWrapper.find(LanguageDropdown);
});
it('updating the language should emit input event', () => {
it.each(testLanguages)('updating language $id should emit input event', language => {
expect(wrapper.emitted('input')).toBeFalsy();
function test(language, i) {
// It looks like v-autocomplete doesn't trigger correctly, so call
// method directly until resolved
wrapper.find('.v-autocomplete').vm.$emit('input', language.id);
expect(wrapper.emitted('input')).toBeTruthy();
expect(wrapper.emitted('input')[i][0]).toEqual(language.id);
}
_.each(testLanguages, test);
// It looks like v-autocomplete doesn't trigger correctly, so call
// method directly until resolved
wrapper.find('.v-autocomplete').vm.$emit('input', language.id);
expect(wrapper.emitted('input')).toBeTruthy();
expect(wrapper.emitted('input')[0][0]).toEqual(language.id);
});
it('setting readonly should prevent any edits', () => {
expect(wrapper.find('input[readonly]').exists()).toBe(false);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'underscore';
import Vue from 'vue';
import Vuetify from 'vuetify';
import { mount } from '@vue/test-utils';
Expand All @@ -19,7 +18,7 @@ function makeWrapper() {
}

describe('licenseDropdown', () => {
let specialPermissions = _.findWhere(LicensesList, { is_custom: true });
const specialPermissions = LicensesList.find(l => l.is_custom);
let wrapper;
let formWrapper;
beforeEach(() => {
Expand All @@ -28,27 +27,25 @@ describe('licenseDropdown', () => {
});

describe('on load', () => {
it('all license options should be an option to select', () => {
_.each(LicensesList, license => {
expect(wrapper.find('.v-list').text()).toContain(license.license_name);
});
it.each(LicensesList)('%s license option should be an option to select', license => {
expect(wrapper.find('.v-list').text()).toContain(license.license_name);
});
it('should render a license when value is set to a license id', () => {
function test(license) {
it.each(LicensesList)(
'should render license when value is set to a license id $id',
license => {
wrapper.setProps({ value: { license: license.id } });
expect(wrapper.vm.$refs.license.value).toEqual(license.id);
expect(wrapper.find('.v-textarea').exists()).toBe(license.is_custom);
}
_.each(LicensesList, test);
});
it('should render a license when value is set to a license name', () => {
function test(license) {
);
it.each(LicensesList)(
'should render license when value is set to a license name $name',
license => {
wrapper.setProps({ value: { license: license.license_name } });
expect(wrapper.vm.$refs.license.value).toEqual(license.id);
expect(wrapper.find('.v-textarea').exists()).toBe(license.is_custom);
}
_.each(LicensesList, test);
});
);
it('should display licenseDescription prop', () => {
wrapper.setProps({
value: { license: specialPermissions.id, license_description: 'test description' },
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import _ from 'underscore';
import { mount } from '@vue/test-utils';
import VisibilityDropdown from '../VisibilityDropdown.vue';
import TestForm from './TestForm.vue';
Expand All @@ -15,6 +14,8 @@ function makeWrapper() {
});
}

const RolesArray = Array.from(Roles);

describe('visibilityDropdown', () => {
let wrapper;
let formWrapper;
Expand All @@ -24,17 +25,12 @@ describe('visibilityDropdown', () => {
});

describe('on load', () => {
it('all visibility options should be an option to select', () => {
Roles.forEach(role => {
expect(wrapper.find('.v-list').text()).toContain(constantStrings.$tr(role));
});
it.each(RolesArray)('all visibility options should be an option to select', role => {
expect(wrapper.find('.v-list').text()).toContain(constantStrings.$tr(role));
});
it('should render according to visibility prop', () => {
function test(visibility) {
wrapper.setProps({ value: visibility });
expect(wrapper.vm.$refs.visibility.value).toEqual(visibility);
}
_.each(Roles, test);
it.each(RolesArray)('should render according to visibility prop %s', visibility => {
wrapper.setProps({ value: visibility });
expect(wrapper.vm.$refs.visibility.value).toEqual(visibility);
});
});
describe('props', () => {
Expand Down

This file was deleted.

This file was deleted.

Loading