Skip to content

Commit d2e59d2

Browse files
committed
Update a couple tests that got merged and didn't pass for CodeCombat
1 parent 886e92d commit d2e59d2

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

test/app/models/ClassroomLib.spec.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import ClassroomLib from '../../../app/models/ClassroomLib'
2-
import { courseIDs } from 'app/core/utils.coffee'
2+
import { courseIDs, isOzaria } from 'app/core/utils'
33

44
describe('isStudentOnLockedCourse', () => {
5+
if (!isOzaria) return // This is specific to the Ozaria level locking
6+
57
it('no lock is always false', () => {
68
for (const courseId of Object.values(courseIDs)) {
79
expect(ClassroomLib.isStudentOnLockedCourse({
@@ -55,6 +57,8 @@ describe('isStudentOnLockedCourse', () => {
5557
})
5658

5759
describe('isStudentOnLockedLevel', () => {
60+
if (!isOzaria) return // This is specific to the Ozaria level locking
61+
5862
it('no lock is always false', () => {
5963
for (const courseId of Object.values(courseIDs)) {
6064
expect(ClassroomLib.isStudentOnLockedLevel({

test/app/views/teachers/BaseSingleClass.spec.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
* - Intro level progress breakdown
77
* - Intro level backward compatibility
88
*/
9+
910
import BaseSingleClass from '../../../../ozaria/site/components/teacher-dashboard/BaseSingleClass/index.vue'
11+
import { isOzaria } from 'app/core/utils'
1012

1113
const MOCK_COURSE_ID = 'MOCK_ID'
1214
const OWNER_ID = 'OWNER_ID'
@@ -118,6 +120,8 @@ const twoStudentsMockData = (overrides) => {
118120
}
119121

120122
describe('BaseSingleClass', () => {
123+
if (!isOzaria) return // This is specific to the Ozaria teacher dashboard
124+
121125
it('empty module returns empty array default', () => {
122126
// Here we fill in the `this` object in the method.
123127
const mockedCourse = 'mockCourse'

test/app/views/teachers/TeacherClassView.spec.coco.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
TeacherClassView = require 'views/courses/TeacherClassView'
1+
TeacherClassView = require 'views/courses/TeacherClassView.coco' # Not sure why this dosen't work when imported without .coco
22
storage = require 'core/storage'
33
forms = require 'core/forms'
44
factories = require 'test/app/factories'
@@ -401,4 +401,4 @@ describe 'TeacherClassView', ->
401401
request.respondWith({
402402
status: 500,
403403
responseText: JSON.stringify({ message: "Internal Server Error" })
404-
})
404+
})

0 commit comments

Comments
 (0)