From 9baa9b590591d767928869ff4b9e3ac190c3edd1 Mon Sep 17 00:00:00 2001 From: William Washington Date: Fri, 14 Jun 2024 13:59:35 -0700 Subject: [PATCH 1/7] Fix/muwm 5296 (#3114) MUWM-5296, --------- Co-authored-by: Fang Lin --- myuw/data/resource_link_import.csv | 6 +-- .../home/major-declaration/declare-major.vue | 47 ++++++++++++------- .../home/major-declaration/major-bot.vue | 20 ++++++-- myuw_vue/tests/declare-major.test.js | 37 +++++++++++++-- 4 files changed, 79 insertions(+), 31 deletions(-) diff --git a/myuw/data/resource_link_import.csv b/myuw/data/resource_link_import.csv index 75637a8a6..05319fcb5 100644 --- a/myuw/data/resource_link_import.csv +++ b/myuw/data/resource_link_import.csv @@ -69,7 +69,7 @@ Campus Life,Campus Safety,all,http://www.washington.edu/safecampus/,SafeCampus,, Campus Life,Campus Safety,all,,,https://www.ehs.washington.edu/,Environmental Health & Safety,https://www.uwb.edu/safety/ehs-emergency/environment-health-safety,Environmental Health & Safety,https://www.tacoma.uw.edu/fa/environmental-health-safety,Environmental Health & Safety,no Campus Life,Campus Safety,all,https://mychem.ehs.washington.edu/,MyChem,,,,,,,no Campus Life,Campus Safety,all,,,https://www.washington.edu/uwem/,UW Emergency Management,https://www.uwb.edu/emergency,UW Bothell Emergency Page,https://www.tacoma.uw.edu/fa/safety/emergency-preparedness,UW Tacoma Emergency Response,no -Campus Life,Getting Around Campus,all,,,http://www.washington.edu/maps/,Campus Map,https://www.uwb.edu/wp-content/uploads/2023/09/uw-bothell-campus-map.pdf,Campus Map,http://www.tacoma.uw.edu/campus-map/campus-map,Campus Map,no +Campus Life,Getting Around Campus,all,,,http://www.washington.edu/maps/,Campus Map,https://www.uwb.edu/wp-content/uploads/2024/04/uw-bothell-campus-map.pdf,Campus Map,http://www.tacoma.uw.edu/campus-map/campus-map,Campus Map,no Campus Life,Getting Around Campus,all,,,https://transportation.uw.edu/getting-here,Getting to Seattle Campus,http://www.uwb.edu/visitors/directions,Getting to UW Bothell Campus,https://www.tacoma.uw.edu/fa/facilities/transportation/parking-and-transportation-resources#permalink-19448,Getting to UW Tacoma Campus,no Campus Life,Getting Around Campus,all,,,https://transportation.uw.edu/getting-here/transit/u-pass#u-pass-students,U-PASS for Students,https://www.uwb.edu/commuter-services/transportation/upass,U-PASS,https://www.tacoma.uw.edu/uwt/fa/facilities/transportation/u-pass,U-PASS,no Campus Life,Getting Around Campus,all,,,https://transportation.uw.edu/getting-here/transit/u-pass#u-pass-faculty-staff,U-PASS for Employees,,,,,no @@ -116,7 +116,7 @@ Events and Activities,Student Clubs and Organizations,all,,,https://hub.washingt "Health, Wellness, & Support",Advocacy and Support,all,https://www.washington.edu/titleix/report/,Make a Title IX report,,,,,,,no "Health, Wellness, & Support",Health & Wellness,all,https://wellbeing.uw.edu/,Husky Health & Well-Being,,,,,,,no "Health, Wellness, & Support",Health & Wellness,all,,,http://www.washington.edu/counseling/,Counseling Center,https://www.uwb.edu/student-affairs/counseling,Counseling Services,https://www.tacoma.uw.edu/uwt/caps,Counseling & Psychological Services,no -"Health, Wellness, & Support",Health & Wellness,all,,,https://wellbeing.uw.edu/unit/hall-health/,Hall Health Center,https://www.uwb.edu/arc/hawrc,Health and Wellness Resource Center,https://www.tacoma.uw.edu/sh,Student Health Services (SHS),no +"Health, Wellness, & Support",Health & Wellness,all,,,https://wellbeing.uw.edu/unit/hall-health/,Hall Health Center,https://www.uwb.edu/student-affairs/hawrc,Health and Wellness Resource Center,https://www.tacoma.uw.edu/sh,Student Health Services (SHS),no "Health, Wellness, & Support",Health & Wellness,all,,,https://wellbeing.uw.edu/unit/livewell/,LiveWell Office,,,,,no "Health, Wellness, & Support",Health & Wellness,all,,,http://www.washington.edu/ima/,Recreational Sports Programs (IMA),https://www.uwb.edu/arc/,Activities and Recreation Center(ARC),http://www.tacoma.uw.edu/uwy/,Recreation & Fitness,no "Health, Wellness, & Support",Health & Wellness,all,https://www.washington.edu/wholeu/,Whole U (for staff and faculty),,,,,,,no @@ -177,4 +177,4 @@ Research,Research Data and Publishing,all,https://guides.lib.uw.edu/research/spo Research,Technical Support,all,https://itconnect.uw.edu/help/,UW-IT Technical Support,,,,,,,no Research,Technical Support,all,https://uw.service-now.com/sp?id=sc_audience&sys_id=bd183bc1db07bb8c37ae9ec6db9619d9&sysparm_category=bd183bc1db07bb8c37ae9ec6db9619d9,UW-IT Services for Researchers,,,,,,,no Research,Technical Support,all,https://itconnect.uw.edu/research/,UW-IT Research Computing Resources,,,,,,,no -Research,Technical Support,all,https://www.lib.washington.edu/dataservices/tools/storage-options,Data Storage Options,,,,,,,no \ No newline at end of file +Research,Technical Support,all,https://www.lib.washington.edu/dataservices/tools/storage-options,Data Storage Options,,,,,,,no diff --git a/myuw_vue/components/home/major-declaration/declare-major.vue b/myuw_vue/components/home/major-declaration/declare-major.vue index 188aba8f8..1e12eba16 100644 --- a/myuw_vue/components/home/major-declaration/declare-major.vue +++ b/myuw_vue/components/home/major-declaration/declare-major.vue @@ -29,29 +29,20 @@

- Satisfactory Progress Status + 105 Credit Rule Status + Satisfactory Progress Status

- - Registration Hold - - - Review options - Review options - - + Registration Hold - Review options

Why plan ahead?

  • - Satisfactory Progress Policy (SPP): By the + 105-Credit Rule: + Satisfactory Progress Policy (SPP): By the time students have earned 105 credits AND completed 5 quarters at the university, students are expected to declare a major or they receive a registration hold. @@ -70,7 +61,18 @@

    Interested in a particular major?

    -
    @@ -210,7 +213,7 @@ export default { }, isTargetViewer() { return ( - this.seattle && (this.isJunior || this.isSenior) || + (this.seattle || this.bothell) && (this.isJunior || this.isSenior) || this.tacoma && (this.isSophomore || this.isJunior || this.isSenior)); }, showContent() { @@ -223,6 +226,14 @@ export default { isErrored() { return (this.isNoticesErrored || this.isProfileErrored); }, + reviewOptionsUrl () { + return (this.tacoma ? + "https://www.tacoma.uw.edu/registrar/academic-policies#permalink-16061" + : this.bothell ? + "https://www.uwb.edu/premajor/academic-advising/petitions" + : "https://advising.uw.edu/academic-support/satisfactory-progress/" + ); + }, }, created() { this.fetchProfile(); diff --git a/myuw_vue/components/home/major-declaration/major-bot.vue b/myuw_vue/components/home/major-declaration/major-bot.vue index a9021b2a6..25d81e2dc 100644 --- a/myuw_vue/components/home/major-declaration/major-bot.vue +++ b/myuw_vue/components/home/major-declaration/major-bot.vue @@ -2,11 +2,21 @@

    Unsure of what major to choose?

    diff --git a/myuw_vue/tests/declare-major.test.js b/myuw_vue/tests/declare-major.test.js index a2d568b85..a0c5b40ae 100644 --- a/myuw_vue/tests/declare-major.test.js +++ b/myuw_vue/tests/declare-major.test.js @@ -9,6 +9,8 @@ import profile from '../vuex/store/profile'; import DeclareMajorCard from '../components/home/major-declaration/declare-major.vue'; import MajorSea from '../components/home/major-declaration/major-sea.vue'; +import MajorBot from '../components/home/major-declaration/major-bot.vue'; +import MajorTac from '../components/home/major-declaration/major-tac.vue'; import CurMajors from '../components/_common/cur_major.vue'; import mockNotices from './mock_data/notice/jinter.json'; import premajorProfile from './mock_data/profile/javgPremajor.json'; @@ -39,6 +41,7 @@ describe('Declare Major Card', () => { }); it('Verify with a seattle junior of premajor', async () => { + // MUWM-5144 axios.get.mockImplementation((url) => { const urlData = { '/api/v1/notices/': mockNotices, @@ -59,6 +62,7 @@ describe('Declare Major Card', () => { expect(wrapper.findAllComponents(CurMajors)).toHaveLength(1); expect(wrapper.findAllComponents(MajorSea)).toHaveLength(1); expect(wrapper.findAll('h3').length).toBe(6); + expect(wrapper.vm.reviewOptionsUrl).toHaveLength(63); }); it('Verify junior with declared major, hide card', async () => { @@ -75,19 +79,42 @@ describe('Declare Major Card', () => { expect(wrapper.vm.notDeclaredMajor).toBe(false); expect(wrapper.vm.showCard).toBe(false); }); - it('Verify with a non-seattle, hide the card', async () => { - // MUWM - 5288 + it('Verify Bothell case', async () => { + // MUWM-5296 store.state.user.affiliations.seattle = false; + store.state.user.affiliations.bothell = true; axios.get.mockImplementation((url) => { const urlData = { '/api/v1/notices/': mockNotices, - '/api/v1/profile/': javg005Profile + '/api/v1/profile/': premajorProfile }; return Promise.resolve({ data: urlData[url] }); }); const wrapper = mount(DeclareMajorCard, { store, localVue }); await new Promise(setImmediate); - expect(wrapper.vm.seattle).toBe(false); - expect(wrapper.vm.showCard).toBe(false); + expect(wrapper.vm.bothell).toBe(true); + expect(wrapper.vm.isTargetViewer).toBe(true); + expect(wrapper.vm.showCard).toBe(true); + expect(wrapper.vm.reviewOptionsUrl).toHaveLength(56); + expect(wrapper.findAllComponents(MajorBot)).toHaveLength(1); + }); + it('Verify Tacoma case', async () => { + // MUWM-5297 + store.state.user.affiliations.seattle = false; + store.state.user.affiliations.tacoma = true; + axios.get.mockImplementation((url) => { + const urlData = { + '/api/v1/notices/': mockNotices, + '/api/v1/profile/': premajorProfile + }; + return Promise.resolve({ data: urlData[url] }); + }); + const wrapper = mount(DeclareMajorCard, { store, localVue }); + await new Promise(setImmediate); + expect(wrapper.vm.tacoma).toBe(true); + expect(wrapper.vm.isTargetViewer).toBe(true); + expect(wrapper.vm.showCard).toBe(true); + expect(wrapper.vm.reviewOptionsUrl).toHaveLength(69); + expect(wrapper.findAllComponents(MajorTac)).toHaveLength(1); }); }); From 95d2954f7e3424049b11e3db899825dc257d5a04 Mon Sep 17 00:00:00 2001 From: Fang Lin Date: Mon, 24 Jun 2024 12:26:54 -0700 Subject: [PATCH 2/7] Fix/muwm 5346 (#3119) Resolve MUWM-5346 --- myuw_vue/components/academics/adviser.vue | 18 +++++++++++++----- myuw_vue/components/textbooks/textbooks.vue | 14 ++++++++++++-- myuw_vue/tests/textbooks.test.js | 2 ++ 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/myuw_vue/components/academics/adviser.vue b/myuw_vue/components/academics/adviser.vue index 2190ae9d8..ac1cb3cf6 100644 --- a/myuw_vue/components/academics/adviser.vue +++ b/myuw_vue/components/academics/adviser.vue @@ -1,7 +1,7 @@