Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Qa #2969

Merged
merged 10 commits into from
Jul 18, 2023
4 changes: 0 additions & 4 deletions cypress/fixtures/resources/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@
{
"title": "Office of Research Information Services (ORIS)",
"url": "https://www.washington.edu/research/oris/"
},
{
"title": "MyFinancial.Desktop",
"url": "http://ucs.admin.uw.edu/myfd"
}
]
},
Expand Down
6 changes: 4 additions & 2 deletions myuw/data/resource_link_import.csv
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@ Services for Faculty and Staff,"HR, Payroll, and Benefits",all,http://isc.uw.edu
Services for Faculty and Staff,"HR, Payroll, and Benefits",all,,,https://hr.uw.edu/benefits/,Benefits,https://www.uwb.edu/hr/benefits,Benefits,https://hr.uw.edu/benefits/,Benefits,no
Services for Faculty and Staff,"HR, Payroll, and Benefits",all,http://isc.uw.edu/admin-corner,ISC Administrators' Corner,,,,,,,no
Services for Faculty and Staff,"HR, Payroll, and Benefits",all,https://www.washington.edu/wholeu/,Whole U (for staff and faculty),,,,,,,no
Services for Faculty and Staff,Procurement,all,https://finance.uw.edu/ps/how-to-buy/ariba,ARIBA,,,,,,,no
Services for Faculty and Staff,Procurement,all,,,https://finance.uw.edu/ps/,Procurement Services,https://www.uwb.edu/finance/purchasing,Purchasing,https://www.tacoma.uw.edu/fa/finance/procurement,Procurement Services,no
Services for Faculty and Staff,Finance and Procurement,all,"https://biportal.uw.edu ",Financial Reports (BI Portal),,,,,,,no
Services for Faculty and Staff,Finance and Procurement,all,"https://uw.service-now.com/finance ","UW Connect Finance ",,,,,,,no
Services for Faculty and Staff,Finance and Procurement,all,,,https://finance.uw.edu/ps/,Procurement Services,https://www.uwb.edu/finance/purchasing,Purchasing,https://www.tacoma.uw.edu/fa/finance/procurement,Procurement Services,no
Services for Faculty and Staff,Finance and Procurement,all,"http://wd5.myworkday.com/uw/login.htmld ",Workday,,,,,,,no
Services for Faculty and Staff,Others,all,http://registrar.washington.edu/staffandfaculty/electronic-academic-records-system-ears,Electronic Advising Records System (EARS),,,,,,,no
Services for Faculty and Staff,Others,all,,,https://itconnect.uw.edu/,IT Connect,https://www.uwb.edu/it,Information Technologies,https://www.tacoma.uw.edu/uwt/it,Information Technology,no
Services for Faculty and Staff,Others,all,https://itconnect.uw.edu/tools-services-support/software-computers/uware/,Software and Hardware,,,,,,,
Expand Down
12 changes: 8 additions & 4 deletions myuw/templates/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,14 @@
{% block body_content %}
<!-- content container -->
<h1 class="h3 my-4">Unable to Load Page - Error 500</h1>
<p>A server error has occurred. You don't have permission to access this page.</p>
<p>
Contact
<a href="mailto:help@uw.edu?subject=MyUW%20Unable%20to%20Load%20Page%20-%20Error%20500&body=Hello,%0A%0A%3CInclude%20your%20comment%20or%20question%20about%20MyUW%20here%3e%0A%0A%0A%0ANetID%3A%20">help@uw.edu</a>
with any questions.
A server error has occurred.
We are aware of the issue and are working on it.
Please try again in a few minutes.
</p>
<p>
Contact
<a href="mailto:help@uw.edu?subject=MyUW%20Unable%20to%20Load%20Page%20-%20Error%20500&body=Hello,%0A%0A%3CInclude%20your%20comment%20or%20question%20about%20MyUW%20here%3e%0A%0A%0A%0ANetID%3A%20">help@uw.edu</a>
with any questions.
</p>
{% include "_common/direct-links.html" %} {% endblock body_content %}
2 changes: 1 addition & 1 deletion myuw/templates/543.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% block body_content %}
<!-- content container -->
<h1 class="h3 my-4">An Error Has Occurred - Error 543</h1>
<p>A data error has occurred. Please try again in a few minutes. </p>
<p>A data error has occurred. Please try again in a few minutes.</p>
<p>
Contact
<a href="mailto:help@uw.edu?subject=MyUW%20An%20Error%20Has%20Occurred20-%20Error%20543&body=Hello,%0A%0A%3CInclude%20your%20comment%20or%20question%20about%20MyUW%20here%3e%0A%0A%0A%0ANetID%3A%20">help@uw.edu</a>
Expand Down
1 change: 0 additions & 1 deletion myuw/templates/_common/direct-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
>Husky Card Account</a
>
</li>
<li><a href="http://ucs.admin.uw.edu/myfd/" target="_blank">MyFinancial.desktop</a></li>
<li>
<a href="http://www.washington.edu/home/peopledir/" target="_blank"
>Faculty/Staff/Student Directory</a
Expand Down
4 changes: 0 additions & 4 deletions myuw_vue/components/_common/outage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,6 @@
<a href="https://wd5.myworkday.com/uw/d/home.htmld"
>Workday</a>
</li>
<li v-if="isEmployee && !isAcademicsPage" class="mb-1">
<a href="http://ucs.admin.uw.edu/myfd/"
>MyFinancial.desktop</a>
</li>
</ul>
</template>
</uw-card>
Expand Down
8 changes: 7 additions & 1 deletion myuw_vue/components/home/graduation/pre-application.vue
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,21 @@ export default {
}),
...mapState('profile', {
degreeStatus: (state) => state.value.degree_status,
termMajors: (state) => state.value.term_majors,
}),
curSenior() {
return (this.classLevel === 'SENIOR');
},
declaredMajor() {
// MUWM-5278
return !this.noDeclaredMajor(this.termMajors);
},
showCard() {
return (this.curSenior && (this.isFetching || this.showContent));
},
showContent() {
return (this.isReady && this.degreeStatus && this.degreeStatus.error_code === 404);
return (this.isReady && this.declaredMajor &&
this.degreeStatus && this.degreeStatus.error_code === 404);
},
term() {
return this.year + ',' + this.quarter;
Expand Down
12 changes: 5 additions & 7 deletions myuw_vue/mixins/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ export default {
},
noDeclaredMajor(termMajors) {
if (termMajors) {
for (let i = 0; i < termMajors.length; i++) {
const majors = termMajors[i].majors;
for (let j = 0; j < majors.length; j++) {
const majorName = majors[j].name;
if (!this.isPreMajor(majorName)) {
return false;
}
const majors = termMajors[termMajors.length - 1].majors;
for (let j = 0; j < majors.length; j++) {
const majorName = majors[j].name;
if (!this.isPreMajor(majorName)) {
return false;
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions myuw_vue/tests/degree-pre-appl.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import profile from '../vuex/store/profile';

import GraduationPreApplication from '../components/home/graduation/pre-application.vue';
import javg001Profile from './mock_data/profile/javg001.json';
import noMajorProfile from './mock_data/profile/javg001-nomajor.json';
import javerageProfile from './mock_data/profile/javerage.json';
import jbothllProfile from './mock_data/profile/jbothell.json';

Expand Down Expand Up @@ -41,6 +42,17 @@ describe('Graduation PreApplication Card', () => {
});
});

it('Verify hide card when not declared major', async () => {
// MUWM-5278
axios.get.mockResolvedValue({ data: noMajorProfile, status: 200 });
const wrapper = shallowMount(GraduationPreApplication, { store, localVue });
await new Promise(setImmediate);
expect(wrapper.vm.curSenior).toBeTruthy();
expect(wrapper.vm.isReady).toBe(true);
expect(wrapper.vm.declaredMajor).toBe(false);
expect(wrapper.vm.showContent).toBe(false);
expect(wrapper.vm.showCard).toBe(false);
});
it('Verify show card', async () => {
axios.get.mockResolvedValue({data: javg001Profile, status: 200});
const wrapper = shallowMount(GraduationPreApplication, {store, localVue});
Expand Down
19 changes: 15 additions & 4 deletions myuw_vue/tests/mixins.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,24 @@ describe('mixins', () => {
expect(utils.methods.noDeclaredMajor(null)).toBe(true);
let TermMajors = [
{
"quarter": "spring",
"quarter": "summer",
"year": 2023,
"majors": [
{
"name": "BIOLOGY",
"full_name": "Biology",
"short_name": "BIOL"
}
]
},
{
"quarter": "autumn",
"year": 2023,
"majors": [
{
"name": "PRE SCIENCE",
"full_name": "Pre Sciences",
"short_name": "PRE SCI"
"name": "EXTENDED PRE MAJOR",
"full_name": "Extended Pre Major",
"short_name": "EXT PRE MAJ"
}
]
}
Expand Down
154 changes: 154 additions & 0 deletions myuw_vue/tests/mock_data/profile/javg001-nomajor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"uwnetid": "javg001",
"uwregid": "9136CCB8F66711D5BE060004AC494001",
"birth_date": "1961-10-26",
"email": "javg001@u.washington.edu",
"first_name": "Jake",
"last_name": "Student1",
"pronouns": "he/him/his",
"student_name": "Average,Jake Joseph",
"student_number": "1033001",
"employee_id": "123456789",
"directory_release": true,
"local_address": {
"city": "Seattle",
"country": "United States",
"street_line1": "4634 26th Ave NE",
"street_line2": "APT 102",
"postal_code": "",
"state": "WA",
"zip_code": "98105-4566"
},
"local_phone": null,
"permanent_address": {
"city": "Bellevue",
"country": "United States",
"street_line1": "1645 140th Ave NE",
"street_line2": "APT 980",
"postal_code": "",
"state": "WA",
"zip_code": "98005-1234"
},
"permanent_phone": "4255556789",
"visa_type": null,
"veteran_code": "0",
"is_student": true,
"is_grad_student": false,
"degree_status": {
"degrees": null,
"error_code": 404
},
"campus": "Seattle",
"class_level": "SENIOR",
"term_majors": [
{
"quarter": "spring",
"year": 2013,
"majors": [
{
"degree_abbr": "PRESCI",
"college_abbr": "A & S",
"college_full_name": "A & S",
"degree_level": 0,
"degree_name": null,
"campus": "Seattle",
"name": "PRE SCIENCE",
"full_name": "Pre Sciences"
}
],
"degrees_modified": false,
"has_only_dropped": false
},
{
"quarter": "summer",
"year": 2013,
"majors": [
{
"degree_abbr": "PRESCI",
"college_abbr": "A & S",
"college_full_name": "A & S",
"degree_level": 0,
"degree_name": null,
"campus": "Seattle",
"name": "PRE SCIENCE",
"full_name": "Pre Sciences"
}
],
"degrees_modified": true,
"has_only_dropped": false
},
{
"quarter": "autumn",
"year": 2013,
"majors": [
{
"degree_abbr": "PRESCI",
"college_abbr": "A & S",
"college_full_name": "A & S",
"degree_level": 0,
"degree_name": null,
"campus": "Seattle",
"name": "PRE SCIENCE",
"full_name": "Pre Sciences"
}
],
"degrees_modified": false,
"has_only_dropped": false
},
{
"quarter": "winter",
"year": 2014,
"majors": [
{
"degree_abbr": "PRESCI",
"college_abbr": "A & S",
"college_full_name": "A & S",
"degree_level": 0,
"degree_name": null,
"campus": "Seattle",
"name": "PRE SCIENCE",
"full_name": "Pre Sciences"
}
],
"degrees_modified": false,
"has_only_dropped": false
}
],
"has_pending_major": true,
"term_minors": [
{
"quarter": "spring",
"year": 2013,
"minors": [
],
"degrees_modified": false,
"has_only_dropped": false
},
{
"quarter": "summer",
"year": 2013,
"minors": [
],
"degrees_modified": false,
"has_only_dropped": false
},
{
"quarter": "autumn",
"year": 2013,
"minors": [
],
"degrees_modified": false,
"has_only_dropped": false
},
{
"quarter": "winter",
"year": 2014,
"minors": [],
"degrees_modified": false,
"has_only_dropped": false
}
],
"has_minors": true,
"has_pending_minor": false,
"display_name": "Jake Average Student"
}
4 changes: 0 additions & 4 deletions myuw_vue/tests/mock_data/resources/all.json
Original file line number Diff line number Diff line change
Expand Up @@ -300,10 +300,6 @@
{
"title": "Office of Research Information Services (ORIS)",
"url": "https://www.washington.edu/research/oris/"
},
{
"title": "MyFinancial.Desktop",
"url": "http://ucs.admin.uw.edu/myfd"
}
]
},
Expand Down
Loading