UNCLASSIFIED

Commit 3e71441d authored by graham.smith's avatar graham.smith
Browse files

Merge branch 'LB-47' into 'BULL-529'

LB -47: Uneven vertical margins for MY CURRICULUM SCHEDULE

See merge request platform-one/products/bullhorn/launchboard-fe!67
parents 78a69f9e ad4228a1
...@@ -176,6 +176,12 @@ ...@@ -176,6 +176,12 @@
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==",
"dev": true "dev": true
}, },
"semver": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz",
"integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==",
"dev": true
},
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
...@@ -558,7 +564,18 @@ ...@@ -558,7 +564,18 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
},
"semver": {
"version": "6.3.0",
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz",
"integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==",
"dev": true
},
"source-map": {
"version": "0.5.7",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
"integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
"dev": true "dev": true
} }
} }
...@@ -1575,8 +1592,7 @@ ...@@ -1575,8 +1592,7 @@
"lodash": { "lodash": {
"version": "4.17.21", "version": "4.17.21",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
"dev": true
}, },
"source-map": { "source-map": {
"version": "0.5.7", "version": "0.5.7",
...@@ -13041,6 +13057,12 @@ ...@@ -13041,6 +13057,12 @@
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
"integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
}, },
"lodash.debounce": {
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
"integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=",
"dev": true
},
"lodash.defaultsdeep": { "lodash.defaultsdeep": {
"version": "4.6.1", "version": "4.6.1",
"resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz", "resolved": "https://registry.npmjs.org/lodash.defaultsdeep/-/lodash.defaultsdeep-4.6.1.tgz",
......
<template> <template>
<div class="curriculum-schedule"> <v-container class="curriculum-schedule text-left px-2">
<v-skeleton-loader :loading="loading" type="paragraph@5" class="w-100"> <v-skeleton-loader :loading="loading" type="paragraph@5" class="w-100">
<v-card v-if="emptyString"> <v-card v-if="emptyString">
<v-card-title>You currently don't have any classes! </v-card-title> <v-card-title>You currently don't have any classes! </v-card-title>
<v-card-text>Your scheduled classes will appear here.</v-card-text> <v-card-text>Your scheduled classes will appear here.</v-card-text>
</v-card> </v-card>
<v-container class="px-6"> <v-container class="px-6" v-else>
<div <div
v-for="(item, index) in schedule" v-for="(item, index) in schedule"
:key="index" :key="index"
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
</v-container> </v-container>
</v-skeleton-loader> </v-skeleton-loader>
</div> </v-container>
</template> </template>
<script> <script>
...@@ -45,9 +45,8 @@ export default { ...@@ -45,9 +45,8 @@ export default {
async mounted() { async mounted() {
try { try {
this.loading = true; this.loading = true;
this.schedule = await ScheduleService.getScheduleForUser(); const response = await ScheduleService.getScheduleForUser();
console.log("schedule"); this.schedule = response.registrations;
console.log(this.schedule);
if (this.schedule.length === 0) { if (this.schedule.length === 0) {
this.emptyString = true; this.emptyString = true;
} }
......
...@@ -8,7 +8,7 @@ describe("CurriculumSchedule", () => { ...@@ -8,7 +8,7 @@ describe("CurriculumSchedule", () => {
const mockSchedule = [{ name: "course1" }, { name: "course2" }]; const mockSchedule = [{ name: "course1" }, { name: "course2" }];
ScheduleService.getScheduleForUser = jest ScheduleService.getScheduleForUser = jest
.fn() .fn()
.mockResolvedValue(mockSchedule); .mockResolvedValue({ registrations: mockSchedule });
const wrapper = shallowMount(CurriculumSchedule); const wrapper = shallowMount(CurriculumSchedule);
expect(wrapper.vm.loading).toEqual(true); expect(wrapper.vm.loading).toEqual(true);
...@@ -30,7 +30,9 @@ describe("CurriculumSchedule", () => { ...@@ -30,7 +30,9 @@ describe("CurriculumSchedule", () => {
}); });
it("should set emptyString to true", async () => { it("should set emptyString to true", async () => {
ScheduleService.getScheduleForUser = jest.fn().mockResolvedValue([]); ScheduleService.getScheduleForUser = jest
.fn()
.mockResolvedValue({ registrations: [] });
const wrapper = shallowMount(CurriculumSchedule); const wrapper = shallowMount(CurriculumSchedule);
expect(wrapper.vm.loading).toEqual(true); expect(wrapper.vm.loading).toEqual(true);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment