Skip to content

Commit

Permalink
Merge pull request #7962 from jrjohnson/clear-non-strict-types-deprec…
Browse files Browse the repository at this point in the history
…ation

Dasherize Model Names
  • Loading branch information
stopfstedt committed Jul 15, 2024
2 parents 6f61add + a3cd3a9 commit 78d70bb
Show file tree
Hide file tree
Showing 173 changed files with 893 additions and 897 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default class AssignStudentsManagerComponent extends Component {
get data() {
return {
programs: this.store.peekAll('program'),
programYears: this.store.peekAll('programYear'),
programYears: this.store.peekAll('program-year'),
cohorts: this.store.peekAll('cohort'),
};
}
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/app/components/bulk-new-users.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default class BulkNewUsersComponent extends Component {
return {
schools: this.store.peekAll('school'),
programs: this.store.peekAll('program'),
programYears: this.store.peekAll('programYear'),
programYears: this.store.peekAll('program-year'),
cohorts: this.store.peekAll('cohort'),
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default class CurriculumInventoryNewReportComponent extends Component {
const endDate = this.academicYearCrossesCalendarYearBoundaries
? new Date(year + 1, 5, 30)
: new Date(year, 11, 31);
const report = this.store.createRecord('curriculumInventoryReport', {
const report = this.store.createRecord('curriculum-inventory-report', {
name: this.name,
program: this.args.currentProgram,
year: year,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ export default class CurriculumInventoryNewSequenceBlock extends Component {
if (!isValid) {
return false;
}
const block = this.store.createRecord('curriculumInventorySequenceBlock', {
const block = this.store.createRecord('curriculum-inventory-sequence-block', {
title: this.title,
description: this.description,
parent: this.args.parent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default class CurriculumInventoryReportDetailsComponent extends Component
}

finalize = dropTask(async () => {
const newExport = this.store.createRecord('curriculumInventoryExport', {
const newExport = this.store.createRecord('curriculum-inventory-export', {
report: this.args.report,
});
this.showFinalizeConfirmation = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class SequenceBlockListComponent extends Component {
// therefore, we must reload them here in order to get those updated sort order values.
// [ST 2021/03/16]
if (this.args.parent) {
await this.store.findRecord('curriculum_inventory_sequence_block', this.args.parent.id, {
await this.store.findRecord('curriculum-inventory-sequence-block', this.args.parent.id, {
include: 'children',
reload: true,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default class SchoolSessionTypesExpandedComponent extends Component {
save = dropTask(
async (title, calendarColor, assessment, assessmentOption, aamcMethod, isActive) => {
this.args.setSchoolNewSessionType(null);
const sessionType = this.store.createRecord('sessionType');
const sessionType = this.store.createRecord('session-type');
const aamcMethods = aamcMethod ? [aamcMethod] : [];
sessionType.setProperties({
school: this.args.school,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default class CurriculumInventorySequenceBlockController extends Controll
// inside an "ordered" sequence block. they all get re-sorted server-side.
// therefore, we must reload them here in order to get those updated sort order values.
// [ST 2021/03/16]
await this.store.findRecord('curriculum_inventory_sequence_block', this.model.id, {
await this.store.findRecord('curriculum-inventory-sequence-block', this.model.id, {
include: 'children',
reload: true,
});
Expand Down
1 change: 0 additions & 1 deletion packages/frontend/app/deprecation-workflow.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const SHOULD_THROW = config.environment !== 'production';
const SILENCED_DEPRECATIONS = [
// Add ids of deprecations we temporarily want to silence here.
'ember-data:deprecate-legacy-imports',
'ember-data:deprecate-non-strict-types',
'ember-data:deprecate-non-unique-relationship-entries',
'ember-data:deprecate-many-array-duplicates',
];
Expand Down
2 changes: 1 addition & 1 deletion packages/frontend/tests/acceptance/assign-students-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module('Acceptance | assign students', function (hooks) {
this.school = this.server.create('school');
this.school2 = this.server.create('school');
const program = this.server.create('program', { school: this.school });
const programYear = this.server.create('programYear', {
const programYear = this.server.create('program-year', {
program,
startYear: DateTime.now().year,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module('Acceptance | course visualizations - instructor', function (hooks) {
const term3 = this.server.create('term', {
vocabulary: vocabulary2,
});
const sessionType1 = this.server.create('sessionType');
const sessionType2 = this.server.create('sessionType');
const sessionType1 = this.server.create('session-type');
const sessionType2 = this.server.create('session-type');
const session1 = this.server.create('session', {
sessionType: sessionType1,
terms: [term1],
Expand All @@ -37,12 +37,12 @@ module('Acceptance | course visualizations - instructor', function (hooks) {
terms: [term2, term3],
});
const session3 = this.server.create('session');
this.server.create('ilmSession', {
this.server.create('ilm-session', {
session: session3,
hours: 2,
instructors: [instructor],
});
const instructorGroup1 = this.server.create('instructorGroup', {
const instructorGroup1 = this.server.create('instructor-group', {
users: [instructor],
});
this.server.create('offering', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module('Acceptance | course visualizations - instructors', function (hooks) {
const term3 = this.server.create('term', {
vocabulary: vocabulary2,
});
const sessionType1 = this.server.create('sessionType');
const sessionType2 = this.server.create('sessionType');
const sessionType1 = this.server.create('session-type');
const sessionType2 = this.server.create('session-type');
const session1 = this.server.create('session', {
sessionType: sessionType1,
terms: [term1],
Expand All @@ -34,10 +34,10 @@ module('Acceptance | course visualizations - instructors', function (hooks) {
terms: [term2, term3],
});
const session3 = this.server.create('session');
const instructorGroup1 = this.server.create('instructorGroup', {
const instructorGroup1 = this.server.create('instructor-group', {
users: [instructor1],
});
const instructorGroup2 = this.server.create('instructorGroup', {
const instructorGroup2 = this.server.create('instructor-group', {
users: [instructor2],
});
this.server.create('offering', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ module('Acceptance | course visualizations - objectives', function (hooks) {
assert.expect(14);
const school = this.server.create('school');
const course = this.server.create('course', { year: 2021, school });
const courseObjectives = this.server.createList('courseObjective', 3, {
const courseObjectives = this.server.createList('course-objective', 3, {
course,
});
const session1 = this.server.create('session', {
Expand All @@ -30,15 +30,15 @@ module('Acceptance | course visualizations - objectives', function (hooks) {
title: 'Empty Session',
course,
});
this.server.create('sessionObjective', {
this.server.create('session-objective', {
session: session1,
courseObjectives: [courseObjectives[0]],
});
this.server.create('sessionObjective', {
this.server.create('session-objective', {
session: session2,
courseObjectives: [courseObjectives[1]],
});
this.server.create('sessionObjective', {
this.server.create('session-objective', {
session: session3,
courseObjectives: [courseObjectives[2]],
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module('Acceptance | course visualizations - session-type', function (hooks) {

test('it renders', async function (assert) {
assert.expect(16);
const sessionType = this.server.create('sessionType');
const sessionType = this.server.create('session-type');
const vocabulary1 = this.server.create('vocabulary');
const vocabulary2 = this.server.create('vocabulary');
const term1 = this.server.create('term', {
Expand All @@ -35,7 +35,7 @@ module('Acceptance | course visualizations - session-type', function (hooks) {
terms: [term2, term3],
});
const session3 = this.server.create('session', sessionType);
this.server.create('ilmSession', {
this.server.create('ilm-session', {
session: session3,
hours: 2,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ module('Acceptance | course visualizations - session-types', function (hooks) {

test('it renders', async function (assert) {
assert.expect(14);
const sessionType1 = this.server.create('sessionType');
const sessionType2 = this.server.create('sessionType');
const sessionType3 = this.server.create('sessionType');
const sessionType1 = this.server.create('session-type');
const sessionType2 = this.server.create('session-type');
const sessionType3 = this.server.create('session-type');
const vocabulary1 = this.server.create('vocabulary');
const vocabulary2 = this.server.create('vocabulary');
const term1 = this.server.create('term', {
Expand All @@ -39,7 +39,7 @@ module('Acceptance | course visualizations - session-types', function (hooks) {
const session3 = this.server.create('session', {
sessionType: sessionType3,
});
this.server.create('ilmSession', {
this.server.create('ilm-session', {
session: session3,
hours: 2,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module('Acceptance | course visualizations - vocabularies', function (hooks) {

test('it renders', async function (assert) {
assert.expect(12);
const sessionType = this.server.create('sessionType');
const sessionType = this.server.create('session-type');
const vocabulary1 = this.server.create('vocabulary');
const vocabulary2 = this.server.create('vocabulary');
const term1 = this.server.create('term', {
Expand All @@ -37,7 +37,7 @@ module('Acceptance | course visualizations - vocabularies', function (hooks) {
const session3 = this.server.create('session', {
sessionType,
});
this.server.create('ilmSession', {
this.server.create('ilm-session', {
session: session3,
hours: 2,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module('Acceptance | course visualizations - vocabulary', function (hooks) {
const term3 = this.server.create('term', {
vocabulary: this.vocabulary,
});
const sessionType = this.server.create('sessionType');
const sessionType = this.server.create('session-type');
const session1 = this.server.create('session', {
sessionType,
terms: [term1],
Expand All @@ -33,7 +33,7 @@ module('Acceptance | course visualizations - vocabulary', function (hooks) {
sessionType,
terms: [term3],
});
this.server.create('ilmSession', {
this.server.create('ilm-session', {
session: session3,
hours: 2,
});
Expand Down
20 changes: 10 additions & 10 deletions packages/frontend/tests/acceptance/course/cohorts-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ module('Acceptance | Course - Cohorts', function (hooks) {
administeredSchools: [school],
});
const currentYear = new Date().getFullYear();
this.server.create('academicYear', { id: currentYear });
this.server.create('academic-year', { id: currentYear });
const program = this.server.create('program', { school, duration: 4 });
const cohort1 = this.server.create('cohort');
const cohort2 = this.server.create('cohort');
const cohort3 = this.server.create('cohort');
const cohort4 = this.server.create('cohort');

// first two should get through the filter
const programYear1 = this.server.create('programYear', {
const programYear1 = this.server.create('program-year', {
program,
cohort: cohort1,
startYear: currentYear - program.duration,
});
const programYear2 = this.server.create('programYear', {
const programYear2 = this.server.create('program-year', {
program,
cohort: cohort2,
startYear: currentYear - program.duration - 4,
Expand All @@ -37,26 +37,26 @@ module('Acceptance | Course - Cohorts', function (hooks) {
// (startYear + duration) <= (currentYear + duration)
// &&
// (startYear + duration) >= (currentYear + duration)
const programYear3 = this.server.create('programYear', {
const programYear3 = this.server.create('program-year', {
program,
cohort: cohort3,
startYear: currentYear - program.duration - 5,
});
const programYear4 = this.server.create('programYear', {
const programYear4 = this.server.create('program-year', {
program,
cohort: cohort4,
startYear: currentYear - program.duration + 5,
});
const programYearObjective1 = this.server.create('programYearObjective', {
const programYearObjective1 = this.server.create('program-year-objective', {
programYear: programYear1,
});
const programYearObjective2 = this.server.create('programYearObjective', {
const programYearObjective2 = this.server.create('program-year-objective', {
programYear: programYear2,
});
const programYearObjective3 = this.server.create('programYearObjective', {
const programYearObjective3 = this.server.create('program-year-objective', {
programYear: programYear3,
});
const programYearObjective4 = this.server.create('programYearObjective', {
const programYearObjective4 = this.server.create('program-year-objective', {
programYear: programYear4,
});

Expand All @@ -66,7 +66,7 @@ module('Acceptance | Course - Cohorts', function (hooks) {
cohorts: [programYear1.cohort], //instead of just cohort1 otherwise the relationship gets munged
});

this.server.create('courseObjective', {
this.server.create('course-objective', {
course: this.course,
programYearObjectives: [
programYearObjective1,
Expand Down
10 changes: 5 additions & 5 deletions packages/frontend/tests/acceptance/course/competencies-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module('Acceptance | Course - Competencies', function (hooks) {
this.user = await setupAuthentication();
this.school = this.server.create('school');
const program = this.server.create('program', { school: this.school });
const programYear = this.server.create('programYear', {
const programYear = this.server.create('program-year', {
program,
});
const cohort = this.server.create('cohort', {
Expand All @@ -26,11 +26,11 @@ module('Acceptance | Course - Competencies', function (hooks) {
programYears: [programYear],
});

const programYearObjective = this.server.create('programYearObjective', {
const programYearObjective = this.server.create('program-year-objective', {
competency: competency1,
programYear,
});
this.server.create('programYearObjective', {
this.server.create('program-year-objective', {
competency: competency2,
programYear,
});
Expand All @@ -40,11 +40,11 @@ module('Acceptance | Course - Competencies', function (hooks) {
school: this.school,
cohorts: [cohort],
});
this.server.create('courseObjective', {
this.server.create('course-objective', {
programYearObjectives: [programYearObjective],
course: this.course,
});
this.server.create('courseObjective', {
this.server.create('course-objective', {
programYearObjectives: [programYearObjective],
course: this.course,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module('Acceptance | Course - Leadership', function (hooks) {
school: this.school,
administeredSchools: [this.school],
});
this.server.create('academicYear', { id: 2013 });
this.server.create('academic-year', { id: 2013 });

const users = this.server.createList('user', 6);
this.course = this.server.create('course', {
Expand Down
Loading

0 comments on commit 78d70bb

Please sign in to comment.