diff --git a/spec/cypress/cypress.config.js b/spec/cypress/cypress.config.js index 0a19103ff7..0d6d245734 100644 --- a/spec/cypress/cypress.config.js +++ b/spec/cypress/cypress.config.js @@ -13,7 +13,7 @@ module.exports = defineConfig({ setupNodeEvents(on, config) { // implement node event listeners here - const environmentName = process.env.CYPRESS_ENV || 'local'; + const environmentName = process.env.CYPRESS_ENV || 'dev'; const environmentFilename = `cypress.env.${environmentName}.json`; const environmentPath = path.resolve(__dirname, environmentFilename); diff --git a/spec/cypress/cypress.env.dev.json b/spec/cypress/cypress.env.dev.json index 2de97baf9f..517672ad1a 100644 --- a/spec/cypress/cypress.env.dev.json +++ b/spec/cypress/cypress.env.dev.json @@ -4,11 +4,21 @@ "env": { "MEDIA_OBJECT_ID": "fj236208t", "MEDIA_OBJECT_TITLE":"Beginning Responsibility: Lunchroom Manners", - "SEARCH_COLLECTION":"7.7 regression test", - "USERS_ADMINISTRATOR_EMAIL": "admin_email", - "USERS_ADMINISTRATOR_PASSWORD": "placeholder_password", - "USERS_USER_EMAIL":"user_email", - "USERS_USER_PASSWORD": "placeholder_password", - "USER_MANAGER": "userstudy" + "MEDIA_OBJECT_ID_2": "sj1391978", + "MEDIA_OBJECT_TITLE_2":"Cypress automation test media object", + "MEDIA_OBJECT_CAPTION_2":"sample.vtt", + "SEARCH_COLLECTION":"_Cypress automation collection", + "USERS_ADMINISTRATOR_USERNAME":"admin username", + "USERS_ADMINISTRATOR_EMAIL": "admin email", + "USERS_ADMINISTRATOR_PASSWORD": "admin pass", + "USERS_USER_USERNAME":"some basic user's username", + "USERS_USER_EMAIL":"user email", + "USERS_USER_PASSWORD": "user password", + "USER_MANAGER_USERNAME": "placeholder manager name - must be manager of SEARCH_COLLECTION", + "USER_MANAGER_EMAIL": "manager email", + "USER_MANAGER_PASSWORD": "manager password", + "MEDIA_OBJECT_FIELD_MAIN_CONTRIBUTOR": "Coronet Films", + "MEDIA_OBJECT_FIELD_GENRE": "Automation genre", + "MEDIA_OBJECT_FIELD_LANGUAGE": "Spanish" } } \ No newline at end of file diff --git a/spec/cypress/cypress.env.local.json b/spec/cypress/cypress.env.local.json index 9b5140197c..4fa4355eb8 100644 --- a/spec/cypress/cypress.env.local.json +++ b/spec/cypress/cypress.env.local.json @@ -2,6 +2,23 @@ { "baseUrl": "http://localhost:3000", "env": { - + "MEDIA_OBJECT_ID": "11111111", + "MEDIA_OBJECT_TITLE":"Beginning Responsibility: Lunchroom Manners", + "MEDIA_OBJECT_ID_2": "12345679", + "MEDIA_OBJECT_TITLE_2":"Cypress automation test media object", + "MEDIA_OBJECT_CAPTION_2":"sample.vtt", + "SEARCH_COLLECTION":"_Cypress automation collection", + "USERS_ADMINISTRATOR_USERNAME":"admin username", + "USERS_ADMINISTRATOR_EMAIL": "admin email", + "USERS_ADMINISTRATOR_PASSWORD": "admin pass", + "USERS_USER_USERNAME":"some basic user's username", + "USERS_USER_EMAIL":"user email", + "USERS_USER_PASSWORD": "user password", + "USER_MANAGER_USERNAME": "placeholder manager name - must be manager of SEARCH_COLLECTION", + "USER_MANAGER_EMAIL": "manager email", + "USER_MANAGER_PASSWORD": "manager password", + "MEDIA_OBJECT_FIELD_MAIN_CONTRIBUTOR": "Coronet Films", + "MEDIA_OBJECT_FIELD_GENRE": "Automation genre", + "MEDIA_OBJECT_FIELD_LANGUAGE": "Spanish" } } \ No newline at end of file diff --git a/spec/cypress/cypress.env.staging.json b/spec/cypress/cypress.env.staging.json index b44745ac1d..c69cd2152d 100644 --- a/spec/cypress/cypress.env.staging.json +++ b/spec/cypress/cypress.env.staging.json @@ -1,10 +1,23 @@ { "baseUrl": "https://avalon-staging.dlib.indiana.edu/", "env": { - "MEDIA_OBJECT_TITLE":"Beginning Responsibility: Lunchroom Manners", - "USERS_ADMINISTRATOR_EMAIL": "admin_email", - "USERS_ADMINISTRATOR_PASSWORD": "placeholder_password", - "USERS_USER_EMAIL":"user_email", - "USERS_USER_PASSWORD": "placeholder_password" - } + "MEDIA_OBJECT_ID": "n009w228g", + "MEDIA_OBJECT_TITLE":"Beginning Responsibility: Lunchroom Manners", + "MEDIA_OBJECT_ID_2": "2r36tx569", + "MEDIA_OBJECT_TITLE_2":"Cypress automation test media object", + "MEDIA_OBJECT_CAPTION_2":"sample.vtt", + "SEARCH_COLLECTION":"_Cypress automation collection", + "USERS_ADMINISTRATOR_USERNAME":"admin username", + "USERS_ADMINISTRATOR_EMAIL": "admin email", + "USERS_ADMINISTRATOR_PASSWORD": "admin pass", + "USERS_USER_USERNAME":"some basic user's username", + "USERS_USER_EMAIL":"user email", + "USERS_USER_PASSWORD": "user password", + "USER_MANAGER_USERNAME": "placeholder manager name - must be manager of SEARCH_COLLECTION", + "USER_MANAGER_EMAIL": "manager email", + "USER_MANAGER_PASSWORD": "manager password", + "MEDIA_OBJECT_FIELD_MAIN_CONTRIBUTOR": "Coronet Films", + "MEDIA_OBJECT_FIELD_GENRE": "Automation genre", + "MEDIA_OBJECT_FIELD_LANGUAGE": "Spanish" + } } \ No newline at end of file diff --git a/spec/cypress/fixtures/captions-example.srt b/spec/cypress/fixtures/captions-example.srt new file mode 100644 index 0000000000..83cfdb7c4e --- /dev/null +++ b/spec/cypress/fixtures/captions-example.srt @@ -0,0 +1,84 @@ +1 +00:00:01,420 --> 00:00:05,120 +Hiring a transcriber saves time and resources. + +2 +00:00:05,460 --> 00:00:08,340 +Professional transcribers will ensure + +3 +00:00:08,520 --> 00:00:11,600 +that your audio file is translated into text + +4 +00:00:11,760 --> 00:00:12,660 +accurately + +5 +00:00:12,720 --> 00:00:13,880 +and efficiently. + +6 +00:00:14,200 --> 00:00:17,600 +Transcribers are trained and tested in certain niches + +7 +00:00:17,860 --> 00:00:19,600 +from legal and medical + +8 +00:00:19,700 --> 00:00:20,920 +to academic. + +9 +00:00:21,100 --> 00:00:22,160 +Here's how it works. + +10 +00:00:22,400 --> 00:00:24,700 +First, an audio file is received. + +11 +00:00:25,200 --> 00:00:28,000 +Next, the file is pre-screened + +12 +00:00:28,000 --> 00:00:30,520 +to be matched with the perfect transcriber + +13 +00:00:30,520 --> 00:00:33,960 +who is then assigned the task of creating the transcript. + +14 +00:00:34,220 --> 00:00:36,180 +Once the transcript is created, + +15 +00:00:36,420 --> 00:00:39,800 +the document goes through rigorous quality-control channels + +16 +00:00:39,880 --> 00:00:42,200 +before being submitted to the client. + +17 +00:00:42,540 --> 00:00:45,420 +We provide uncompromising quality, + +18 +00:00:45,800 --> 00:00:47,460 +rates within your budget, + +19 +00:00:47,460 --> 00:00:49,460 +timely and convenient delivery. + +20 +00:00:49,600 --> 00:00:51,160 +Upload your file now. + +21 +00:00:51,240 --> 00:00:53,160 +We do the rest. + diff --git a/spec/cypress/fixtures/image.png b/spec/cypress/fixtures/image.png new file mode 100644 index 0000000000..e436c51ac1 Binary files /dev/null and b/spec/cypress/fixtures/image.png differ diff --git a/spec/cypress/fixtures/test_sample.mp4 b/spec/cypress/fixtures/test_sample.mp4 new file mode 100644 index 0000000000..9706102199 Binary files /dev/null and b/spec/cypress/fixtures/test_sample.mp4 differ diff --git a/spec/cypress/fixtures/transcript-example.vtt b/spec/cypress/fixtures/transcript-example.vtt new file mode 100644 index 0000000000..cf6bf48e91 --- /dev/null +++ b/spec/cypress/fixtures/transcript-example.vtt @@ -0,0 +1,928 @@ +WEBVTT + +00:00:02.340 --> 00:00:13.739 +RAFAL SWIATKOWSKI: My name is Rafal Swiatkowski. Today’s date is January 3, 2018. To start, can you please tell me your full name, the year that you graduated, and your major? + + +00:00:13.740 --> 00:00:21.239 +ABIGAIL HARTER: My name is Abbie Harter. I graduated in 2014, and I got a Bachelor of Arts in psychology. + + +00:00:21.240 --> 00:00:27.220 +RS: Cool. Where were you born? + + +00:00:28.000 --> 00:00:32.100 +AH: I was born in Indianapolis, Indiana. + + +00:00:32.630 --> 00:00:36.420 +RS: Okay, and tell me a little bit about your family background. + + +00:00:37.780 --> 00:01:02.869 +AH: Well, my . . . we moved to Fort Wayne when I was four, and there was a lot of marital discord [laughs], so that was like a broken home thing. So my parents divorced when I was like seven, and I lived primarily with my mom. + + +00:01:02.870 --> 00:01:31.489 +My dad was a lawyer for a while and then was not a lawyer because of some things that happened. And my mom was in school, like in college, the majority of the time when I was a kid, so I had kind of an atypical childhood. I have two older sisters, or like full sisters, and I have five younger half siblings that I’m related to through my dad. + + +00:01:31.490 --> 00:01:35.470 +RS: And so both of your parents went to some sort of college? + + +00:01:36.050 --> 00:02:01.180 +AH: Yeah. My dad has his Juris Doctorate. And he also has another master’s degree in something else; I think it’s education related. My mom has a bachelor’s degree in sociology, and she’s actually currently in graduate school for counseling. And my—I know my maternal grandmother was an art teacher. So I’m like third-generation college. + + +00:02:01.580 --> 00:02:06.979 +RS: So what ended up bringing you to IU? + + +00:02:06.980 --> 00:02:23.539 +AH: Well, I got really good grades in high school and so I was like, “This is my chance to get out and try something new.” So at first I was looking at colleges really far away. Really, you know, ‘prestigious’ colleges. + + +00:02:23.540 --> 00:02:42.679 +And then I found out that I could get an automatic scholarship through IU. And it really required almost no effort to get the money to go there. And it was just closer to my family, and I am pretty close to my family. So that’s why I decided to go. + + +00:02:42.680 --> 00:02:44.860 +RS: What scholarship was it? + + +00:02:45.220 --> 00:02:57.889 +AH: I got . . . I definitely got an automatic scholarship. So I think it was something about excellence? I know that— + + +00:02:57.890 --> 00:03:01.909 +RS: —Yeah, it was like the presidential, the excellence, and yeah. + + +00:03:01.910 --> 00:03:24.379 +AH: Yeah, I got scarf for it [laughs]. That’s the most notable to me. I also got—I was a 21st century scholar, which is an Indiana thing that’s like partially based on your grades. But those standards are pretty like average to low. And the other thing is it’s income based. + + +00:03:24.380 --> 00:03:34.939 +So it’s when you apply, which I think is like seventh grade, if your family is low enough income then that’s when you get that scholarship, and you just have to maintain certain criteria. + + +00:03:34.940 --> 00:03:54.869 +And then I think the scholarship is for paying . . . it’s definitely tuition. It might be also room and board. It pays for quite a lot. So actually, through those two scholarships, ended up getting like— + + +00:03:54.870 --> 00:04:06.850 +RS: So we’re back from a phone interruption. And so we’ll just go on to the next question. So when you did come to IU, where did you live? + + +00:04:07.160 --> 00:04:34.700 +AH: I lived in Foster Quad. See, I was part of a learning-living community. Living-learning community? Called the Global Village, which I think has since combined with the international one as well. But that was a fun place to live [laughs]. It’s hard to say that with a straight face because that’s only half true. + + +00:04:34.720 --> 00:05:03.679 +There was . . . all the sororities and the fraternities are like right behind it. And so a lot of people moved from the northwest neighborhood into those. So that’s not really my crowd. It wasn’t really what I was into, but it was all around me. So it was very interesting, and it definitely contributed to culture shock when I got there. + + +00:05:03.680 --> 00:05:05.140 +RS: Yeah, like what kind? + + +00:05:05.600 --> 00:05:29.959 +AH: Well, in part because my family was poor growing up, and I went to an inner-city school in Fort Wayne. So I was used to, you know, just I think at least half of the student body population at Northside was on free or reduced lunch. So when I went to IU, and especially in that neighborhood, I was like, “Oh my gosh, everyone is so wealthy.” + + +00:05:29.960 --> 00:05:48.630 +And also just the way that people would network with each other and talk to each other about what their parents did for a living and what area of Indy they lived in and who, people they knew—like they lived to other people that were really rich, and they would just start talking about the connections that they had. + + +00:05:49.020 --> 00:06:01.999 +That was so different and overwhelming to me. I didn’t—it made me question if I, you know, if I belonged. Which is weird to me now because that really went away after a while. But it was definitely culture shock when I first got there. + + +00:06:02.000 --> 00:06:06.829 +RS: Like belonged in the housing community or belong at IU or college? + + +00:06:06.830 --> 00:06:21.739 +AH: IU as a whole. During my orientation, I started crying. I was planning on spending the day or the night there. I think you can spend the night in the dorms. And I’m pretty sure I had been planning on doing that. + + +00:06:21.740 --> 00:06:34.199 +And then I was just so—and I know it definitely was just partially I ended up in a weird group, it was just particularly the small group that I was in had been full of people who were really into the networking thing. + + +00:06:34.200 --> 00:06:48.300 +It was a huge shock to me, and I was like, “I don’t know if I belong.” So I just ended up spending the night at my uncle’s house because he lived in Bloomington instead. But yeah, it was a huge change, very different. + + +00:06:48.750 --> 00:07:01.669 +RS: So going back to Foster and the Global Village, do you have any particular memories of your time there? + + +00:07:01.670 --> 00:07:24.469 +AH: Yeah that’s where I met my best friend all throughout college. His name’s John. And I really went to the Global Village because I was—well, I think I started out a global . . . was it global studies major? + + +00:07:24.470 --> 00:07:24.469 +RS: International studies? + + +00:07:24.470 --> 00:07:41.989 +AH: International studies, yeah. And I also, I think I had a dual major in Chinese language, like Mandarin. So I was expecting to like fit in there, and then that situation was really weird too, particularly because people go there because they want to study abroad. + + +00:07:41.990 --> 00:08:04.830 +A lot of those people had traveled extensively, so they did come from wealthier families, so that was definitely a part of that. So I guess the memories I have from there didn’t have anything to do with the fact that it was the Global Village, but more just from I found not only my best friend, but my best friend from high school got into that learning community as well. + + +00:08:04.900 --> 00:08:41.279 +And she met a guy on her floor and the four of us just hung out all the time. So that’s probably the most memorable time I have from living in the dorms just hanging out with them, avoiding doing homework, smoking lots of cigarettes, staying up really late. I think we call ourselves the Hoosier Melancholy Club because we felt so distinctly depressed in comparison to the people around us. It was pretty silly. + + +00:08:41.280 --> 00:08:46.909 +RS: And then where did you live after Foster? + + +00:08:46.910 --> 00:09:16.939 +AH: After? So my sophomore year I lived in an apartment with some mutual friend that I had, and then some girl that she knew. So it was two girls, and that was an interesting experience, because it’s over by close to the Villas, but not the Villas. So it was like in the party area of town, although, you know, it’s all pretty much a party area. + + +00:09:16.940 --> 00:09:20.509 +RS: Yeah, it’s hard to miss that really. + + +00:09:20.510 --> 00:09:47.409 +AH: Yeah. But I know that are neighbors, like, the walls were paper thin because it’s super cheap housing thing, and our neighbors were drug dealers, and would talk about—like you can hear everything they’re saying through the vents, and like the smell of their drugs would waft through the vents into our apartment, and you could like hear all of the really loud music, and that would happen at all hours of the night. + + +00:09:47.410 --> 00:10:08.050 +So that was pretty fun because like, quintessentially college. Can’t sleep, but can hear all of the drug activity going on around you. And then after that, my junior and senior year I rented an apartment by myself because I was pretty much over having roommates at that point. + + +00:10:08.480 --> 00:10:41.499 +Every single roommate I ever had, I ended up not being friends with afterwards [laughs]. So I lived in a one-bedroom apartment that had a lot. It was extremely cheap, very . . . there’s not a good politically correct term for it, but it was in what people would probably call like the bad part of Bloomington, which doesn’t seem as bad in comparison to other places, other cities. + + +00:10:41.500 --> 00:10:43.369 +RS: What part of town would that have been? + + +00:10:43.370 --> 00:11:09.899 +AH: That was the west side of town. But like before—like not as far west as like where it’s like to be like family neighborhoods much. It was right off Rogers Street, if you know where that’s at. I think there’s actually some sort of Section 8 apartments right over in that area, and that’s why people say that it’s one of the rougher parts of town. + + +00:11:09.900 --> 00:11:22.810 +We actually had a cop pounding on people’s doors one time with a shotgun, like they just had guns pulled because they’d heard gunshots. They were looking for the person that it was, but that was a pretty heavy handed thing. + + +00:11:23.230 --> 00:11:32.189 +RS: Yeah, you said the rent was really cheap, so can I ask what that was? + + +00:11:32.190 --> 00:11:37.159 +AH: I believe it was for $475. Yeah, $475 a month. It was under 500 square feet. + + +00:11:37.160 --> 00:11:39.880 +RS: Pretty decent for 2012 Bloomington, I guess. + + +00:11:40.440 --> 00:11:50.620 +AH: Yeah, yeah, it was pretty decent. I didn’t move even though it sucked because I couldn’t find a better deal. + + +00:11:50.690 --> 00:12:03.850 +RS: Well, then I guess moving into academics a little bit, did you have any favorite classes or your favorite professors that you remember? + + +00:12:03.870 --> 00:12:25.170 +AH: Yeah, definitely. I had a class that was based in Collins, and it was taught by a person named Melinda Quinn Brennan I think is her full name. She was a grad student at the time, I think. But it was called Queer Migrations, and it was about the diaspora of queer people basically. + + +00:12:25.280 --> 00:12:42.619 +That was one of my favorite classes because I was a sophomore. It’s probably one of the first tiny seminar classes I had where you just read stuff and then everyone sits around and argues about it. And I love classes like that. So that was a good experience. + + +00:12:42.620 --> 00:12:53.269 +She was also, that professor was just great at leading discussions. Like I had some classes where the professor was so biased that I dropped the class because I just couldn’t—like I didn’t want to discuss anything. + + +00:12:53.270 --> 00:13:03.139 +That professor was particularly good at like letting everyone talk, no matter how out there their opinions were, but then directing it back to the topic. So she was a great teacher. + + +00:13:03.140 --> 00:13:27.100 +And I think that was the first time I’d ever . . . I mean, just like the structure of that class having such a specific topic and, you know, sort of like from the broader perspective of queer or whatever, but then to take something from that subject and really just examine this tiny part of it. It just made it really interesting. + + +00:13:28.810 --> 00:13:30.729 +RS: Any other ones? + + +00:13:30.730 --> 00:13:51.369 +AH: Well, one thing that I tried to do because I had a really bad social anxiety – I still do, but I did especially in college – and so through my psychology degree I learned about exposure therapy for anxiety in general, and that’s where you make yourself do the thing that you’re afraid of in tiny increments. + + +00:13:51.370 --> 00:14:13.510 +So I started signing up for all these classes that were like, just made you put yourself out there in a public way. So that was like guitar. I took an acting class, took a public speaking class, took a . . . oh, a belly dancing class. That was really fun. I also took a contemporary dance class. + + +00:14:13.590 --> 00:14:30.349 +A lot of those were things I’d never done before. And I also took a self-defense class. That was awesome. So a lot of the performance or physical classes that I did were some of my favorites, and it really helped me come out of my shell. + + +00:14:30.350 --> 00:14:37.880 +RS: Did you have an advisor who particularly impacted you? + + +00:14:38.320 --> 00:14:43.229 +AH: No [laughs]. Yeah, I can’t even think of a name. + + +00:14:43.230 --> 00:14:50.270 +RS: What about, so where was your favorite student hangout? + + +00:14:50.400 --> 00:15:00.029 +AH: Favorite student hangout. I mean, when I—well, let’s see. There were periods of time where I would go to the Union to sleep/study all the time because I’m a very routine-based person. + + +00:15:00.030 --> 00:15:13.439 +So I would basically structure my days around like, “Okay, I go to these classes, and then while I’m on campus, I’ll go to this place to study and/or take a nap, and then finish out my day.” Because I didn’t like doing homework at home. So the Union. + + +00:15:13.440 --> 00:15:34.069 +There was also this little alcove right by a door in the psychological and brain sciences building. That was a really good place because it was super convenient. But really my favorite place to be was home, especially when I wasn’t living at the dorms anymore. I would go hide in my apartment. + + +00:15:34.070 --> 00:15:47.150 +RS: What about spots where you would hang out with other people? Where would you and your friends go? + + +00:15:48.750 --> 00:15:50.869 +AH: Me and my friends [laughs]. + + +00:15:50.870 --> 00:15:56.019 +RS: Oh well, yeah [laughs]. Sorry for leading you. + + +00:15:56.020 --> 00:16:07.239 +AH: Well, I really . . . I was in a relationship almost all, like starting sophomore year. It was a really serious relationship. I think in some ways that made it harder to make friends because I was just hanging out with the same person all the time. + + +00:16:07.240 --> 00:16:20.959 +And then I also had the aforementioned best friend John, who I hung out with all the time. I would hang out with those people at home though. So like as far as going out, I mean I know like, the Laughing Planet, you know, that’s the burrito place, right? + + +00:16:20.960 --> 00:16:22.289 +RS: Mmhmm. + + +00:16:22.290 --> 00:16:40.679 +AH: Yeah. And especially I think the first couple of years I was in college is really when I would go out more, but I went out to the restaurants a lot, especially the ones on Fourth Street. And that’s when I acquired my taste for really spicy food. + + +00:16:40.680 --> 00:16:45.810 +RS: Did you have a favorite Fourth Street place? + + +00:16:45.910 --> 00:16:50.379 +AH: Oh man, what is that? I believe it was Burmese food. + + +00:16:50.380 --> 00:16:50.379 +RS: Mandalay? + + +00:16:50.380 --> 00:17:17.088 +AH: Yes, Mandalay. That was great. I had to stop going there though because the roommate that I had freshman year got a job there, and then we had a huge falling out and she literally asked me not to go [laughs]. We’re friends again now, but yeah, too late to keep on going to that restaurant. + + +00:17:17.089 --> 00:17:24.460 +RS: What about clubs or organizations? Did you belong to any? + + +00:17:24.730 --> 00:17:40.399 +AH: I don’t think so. I mean, there are little things that I did here or there, but. Like I was a part of a protest. I was a teaching assistant, an undergraduate teaching assistant for psychology. But no clubs or anything. + + +00:17:40.400 --> 00:17:59.349 +RS: What did you do for fun as a student? You’ve mentioned hanging out at home a little bit with the significant other and a very close friend. + + +00:17:59.350 --> 00:18:31.700 +AH: Yeah, I guess for fun, my memory is kind of hazy for some reason. I’m kind of a loner, so I guess . . . college is also when I started exercising, which I do all the time now. I ended up getting certified and teaching yoga. But it was through that whole like using classes to come out of my shell thing that I discovered how much I loved using my body to do things. So I started exercising a lot in college. + + +00:18:31.840 --> 00:18:57.860 +I also played like 200 hours of Skyrim. So yeah, played videogames. Talked a lot because that’s probably . . . my favorite thing to do with my friends is probably just sit around and talk. So yeah, not necessarily historically exciting but, you know, just hanging out. + + +00:18:58.170 --> 00:19:02.630 +RS: So you mentioned that you were part of a protest. + + +00:19:03.900 --> 00:19:02.630 +AH: Yeah. + + +00:19:03.900 --> 00:19:12.200 +RS: Yeah, so you were involved in some student activism? + + +00:19:12.360 --> 00:19:30.290 +AH: Yeah, I was. That one was . . . I know that it was a strike against rising tuition prices. Rising tuition I guess is probably just the best way to phrase that [laughs]. We were mad at the Board of Trustees. + + +00:19:30.570 --> 00:19:52.600 +An interesting thing that I do is I’ll sometimes protest things that I haven’t totally bought into, just to sort of be there and see what it’s about and to see each side’s perspective better. So I really was active in that for a few days even if I didn’t necessarily fully understand what the problems were. + + +00:19:52.690 --> 00:20:05.269 +It was pretty interesting though because I know at some point we were right outside a building. I don’t remember what the building’s called, but it’s where the Board of Trustees were having their meeting and everyone was protesting and stuff. + + +00:20:05.270 --> 00:20:29.229 +And one member of the board was standing in the window and laughing and stuff, and people were getting absolutely fucking enraged [laughs]. So it was really interesting to see students trying to fight back and getting super fired up and angry and then, you know, the people they were protesting against not really care anyway. + + +00:20:29.230 --> 00:20:40.169 +RS: Yeah. So there was that protest of the meeting, I guess. But do you remember any other activities that the students’ groups would? + + +00:20:40.170 --> 00:20:40.169 +AH: Like related to that protest? + + +00:20:40.170 --> 00:20:40.169 +RS: Yeah. + + +00:20:40.170 --> 00:20:55.349 +AH: Well, I mean, honestly what I remember from it was, it was super disorganized. Like there was a scramble to come up with a list of demands almost of things that they wanted it. I remember it being a really long, unfocused list. + + +00:20:55.350 --> 00:21:08.720 +I don’t remember what else was—I know there were meet ups, like I remember being a part of a huge group of people outside of like Woodburn or something everyone—I’m pretty sure we were eating apples. + + +00:21:09.360 --> 00:21:25.019 +I don’t remember what—I mean I guess really what stands out to me the most was that to me it seemed like there wasn’t much of an organized point to things, but people were definitely angry. + + +00:21:25.020 --> 00:21:27.800 +RS: Do you remember any other things from before maybe you got involved or after? + + +00:21:31.560 --> 00:21:48.870 +AH: No, I really don’t. I got extra credit to write a paper about what it was like to protest for it for my public speaking. Yeah, but maybe that explains why I don’t remember where it popped up from. + + +00:21:49.380 --> 00:21:57.000 +RS: Okay, yeah. That’s kind of cool that you got extra credit for that though. + + +00:21:58.770 --> 00:21:57.000 +AH: Yeah, that was a fun class. + + +00:21:58.770 --> 00:22:06.490 +RS: So do you remember any events, like IU or national, that happened while you were at IU? + + +00:22:06.850 --> 00:22:40.789 +AH: I remember Occupy Wall Street. Occupy Bloomington. Occupy IU. And so on and so forth. Yeah, I was really into that and went to a meeting for Occupy Bloomington. Same sort of thing happened though where it was like the organization was so scattered and just, you know, you have several people trying to take control of the movement in that particular place. + + +00:22:40.790 --> 00:23:04.739 +They have different agendas, and so I didn’t end up carrying on with that at all. I think I went to two meetings and then stopped going. Also because there was . . . at times it was like it was almost like they were trying to do an ideological shift where it’s like, it was almost like we need to have community based things, like everyone needs to come together to work towards a common goal and the people and all that. + + +00:23:04.740 --> 00:23:24.679 +And then there were other people that were really focused on just the economic thing or whatever, like, “Down with capitalism,” and stuff. It made it so hard to have a constructive conversation about anything because some people, like their tactics to get . . . what is the best tactic to protest? + + +00:23:24.680 --> 00:23:38.729 +Well, other people would think that you can only use tactics as long as it does not prop up capitalism in any way. So you can’t use anything that you buy basically. So it was crazy fucking ideological arguments like that that just led to nothing happening. + + +00:23:38.730 --> 00:23:50.930 +RS: So with Occupy Bloomington . . . do you remember how many were students and how many were like community members? + + +00:23:51.450 --> 00:24:11.739 +AH: I was at the first meeting, I believe. So it was pretty much all students. Now what I think it turned into is actually like a homeless shelter effort. But it was outside, so I think there were tents and they were bringing in food and stuff where there’s like a little square or blank space downtown essentially where— + + +00:24:11.740 --> 00:24:13.679 +RS: —Yeah, Peoples Park. + + +00:24:13.680 --> 00:24:30.549 +AH: Yeah. And I’m pretty sure that’s where they were headquartered. And they were trying to, I guess, just support the people living there. I believe that’s what it turned into for the most part. + + +00:24:30.550 --> 00:24:39.909 +RS: Were a lot of the students who were involved in Occupy Bloomington also involved in the tuition protest that you were involved in? + + +00:24:39.910 --> 00:24:56.580 +AH: You know, those were like two years apart. And I know the person who was organizing it, I believe—like the person who had organized IU Bloomington I believe had graduated and moved on at that point. So I don’t remember any of the same people. + + +00:24:58.010 --> 00:25:06.120 +RS: And so you also said that you remember Occupy Wall Street happening. So what do you remember about that? + + +00:25:07.510 --> 00:25:12.889 +AH: Occupy Wall Street was a huge movement that started out in New York on Wall Street, predictably [laughs]. + + +00:25:12.890 --> 00:25:12.889 +RS: It’s in the name. + + +00:25:12.890 --> 00:25:45.240 +AH: That was basically, man, “We are the 99 percent,” I believable was the chant, and it was about how 1 percent of the people—was it just the United States? I think the statistic is 1 percent in the United States own like 90 percent of the world’s wealth or something like that, the majority of the world’s wealth. And so it was trying to protest the people who control the funds essentially. + + +00:25:45.310 --> 00:25:57.409 +RS: Do you remember anything about what student opinion of that was like? Was this something you talked a lot about with your friends, or do you have any sense of how many people knew about it even? + + +00:25:57.410 --> 00:26:11.110 +AH: Yeah, well, all of my friends were really into it. And from what I remember, it was huge. Now, it could have just been because everyone that I knew was really into it because everyone that I knew was pretty into socialism and really liberal. + + +00:26:11.450 --> 00:26:38.359 +I remember hearing—I feel like at the time I got—I ostracized some family members because of my involvement in the Occupy Wall Street. So I know that there were people who disagreed with it. But as far as I can remember, I think a lot of the students supported the movement. Seems like a very supportable thing from a college student’s perspective. + + +00:26:38.360 --> 00:26:53.610 +RS: Yeah, and then going back to kind of the tuition protest and then maybe some of the Occupy Bloomington stuff, like how many students would you say were involved? + + +00:26:55.190 --> 00:27:17.570 +AH: Well, Occupy Bloomington was pretty small when I was involved. I’m not sure how big it grew. But the strike I remember there were over 100 people there for sure if not multiple hundreds. It was pretty big, and I know there was a march and everything through campus, which was supported by the campus. I believe we had police support and everything. + + +00:27:18.200 --> 00:27:26.579 +RS: And so this would have been—so this is the student strike, which is something different than the tuition protest, the Board of Trustees protest you talked about. + + +00:27:26.580 --> 00:27:43.689 +AH: No, I think those are the same thing. Yeah, that was all just one—well, no one really knows exactly what was the focus of the protest, but there were several things that were going on that people were unhappy about. + + +00:27:43.690 --> 00:27:58.789 +But yeah, I guess the common denominator there, throughout my college experience, was that people were pissed off because no one had any money and didn’t foresee that once they got out of college they were going to have money, despite having lots and lots of student loans. + + +00:27:58.790 --> 00:28:02.419 +RS: And then the strike specifically, like what was the action that the students took? + + +00:28:02.420 --> 00:28:29.200 +AH: Well, I know not attending classes for a day was a thing. I think, oh, harassing the Board of Trustees in the least illegal way possible. So you know, writing letters, all of that stuff. I really just remember the part of not attending classes because I think I ended up attending a class that day because I didn’t want to miss. + + +00:28:30.070 --> 00:28:37.729 +RS: Okay, cool. Yeah, were there any other events that you remember nationally? + + +00:28:37.730 --> 00:28:56.059 +AH: I remember the second election for Obama. I remember not voting for him. I voted for Jill Stein. I thought he was going to win. So I guess that made it pretty easy to not vote for him because I wasn’t really concerned about it. + + +00:28:56.060 --> 00:29:05.899 +RS: Do you remember like how involved students were in the election process? Was it something people were talking about a lot? + + +00:29:05.900 --> 00:29:12.120 +AH: I think they—I mean . . . I don’t remember who his opponent was. + + +00:29:12.160 --> 00:29:12.950 +RS: Romney. Mitt Romney. + + +00:29:13.030 --> 00:29:32.919 +AH: Romney, yeah. I don’t remember anyone being particularly concerned. So I mean, I guess when you compare it to the election that just happened with Hillary Clinton and Donald Trump, not nearly as much buzz as there was, you know, because it was incumbent. He was probably going to get it. + + +00:29:32.920 --> 00:29:32.919 +RS: Any other events or things? + + +00:29:32.920 --> 00:30:00.189 +AH: Oh yeah, you know, I remember Lauren Spierer got kidnapped. I remember that. That was a big deal. I’m pretty sure the entire time I was in college, there were billboards up for her. + + +00:30:00.190 --> 00:30:01.800 +RS: Yeah. Would that have happened your freshman or sophomore year? + + +00:30:02.920 --> 00:30:08.889 +AH: I think it happened in the summer after my freshman year. I think it happened in the summer. + + +00:30:08.890 --> 00:30:11.640 +RS: Do you remember anything in particular about that? + + +00:30:12.580 --> 00:30:42.420 +AH: I remember everything about that. I think we had a cat named after her because it was such a big deal. But I mean, I remember hearing things about, you know, speculation about who did it, and even though I’m so far removed from that person, I never met anyone who knew her directly. I definitely heard stories about how it supposedly happened, which I think . . . I don’t know. Should I share? + + +00:30:42.700 --> 00:30:43.740 +RS: Yeah, sure. + + +00:30:45.090 --> 00:31:07.799 +AH: Yeah, I think the dominant theory was that there was cocaine involved and she overdosed, and they hid the body. That’s always what I heard. Who knows? I’m sure the police have been tipped to that. Based on the fact that I know about it. + + +00:31:07.800 --> 00:31:07.799 +RS: Any other events? + + +00:31:07.800 --> 00:31:15.220 +AH: No. I don’t think so. + + +00:31:16.350 --> 00:31:18.050 +RS: Okay. I mean, that was quite a few. + + +00:31:20.160 --> 00:31:18.050 +AH: Busy years. + + +00:31:20.160 --> 00:31:25.610 +RS: What do you remember about the city of Bloomington from when you were in school? + + +00:31:25.770 --> 00:31:42.939 +AH: The city of Bloomington. I remember there being—there’s the IU bubble. There’s Kirkwood and downtown and then the campus, and it’s all beautiful and wonderful. And I actually worked on the south side of town for a summer. + + +00:31:42.940 --> 00:31:54.730 +And so part of when I think of Bloomington, I also think of this like surrounding area of typical southern Indiana, which is pretty interesting, like the juxtaposition between the two groups of people. + + +00:31:58.030 --> 00:32:27.720 +I remember it being very expensive. Very . . . nice, like a nice place to be for a liberal. Yeah, I mean it’s—I got along there better than Fort Wayne, I think, in some ways. But again, also very wealthy when you’re in the bubble. So that’s a little bit weird and stuck out to me. + + +00:32:28.680 --> 00:32:31.020 +RS: And you mentioned you worked a job. What was that? + + +00:32:32.640 --> 00:32:40.569 +AH: I was a car hop at Sonic drive in. So a roller-skating waitress. + + +00:32:40.570 --> 00:32:42.330 +RS: That’s pretty cool. + + +00:32:43.390 --> 00:32:58.080 +AH: Yeah. That was a very interesting job because that was really when I got to know people who lived in Bloomington but weren’t affiliated with the school. And how different it is, how different their lives are from the people who go to school there. + + +00:32:59.740 --> 00:33:04.810 +RS: Do you have any examples of those differences I guess? + + +00:33:07.150 --> 00:33:20.079 +AH: The socioeconomic factor is one. So the lack of disposable income. Kind of when I was in college, I was used to being around people who would just throw around their money and stuff. + + +00:33:20.080 --> 00:33:35.919 +And then when I worked there one of my managers was probably 25 at the time or something and was a manager at Sonic, you know, and watching him sort of try to build up to something to having a career, but not doing that via college. + + +00:33:35.920 --> 00:34:01.839 +But also like, drugs being sold out of that parking lot and drugs being done inside of that restaurant. And sort of, I had someone show me around one time who I worked with, and they took me to Cascades Park but showed me these different back ways to go and stuff. + + +00:34:01.840 --> 00:34:12.729 +Oh, and showed me how to go through the woods to the quarry or whatever so you could end up going into one of the quarries without getting in trouble. It’s one of the active ones too. So that was interesting, different. + + +00:34:12.730 --> 00:34:17.919 +RS: Was that the only job you had while you were a student? + + +00:34:17.920 --> 00:34:39.218 +AH: Other than being the undergraduate teaching assistant, which you can get paid for, but I only did it for one semester because it was my last semester, so I didn’t get paid for that. Yeah, that was the only job I had the whole time, because sort of back to the scholarships that I got. + + +00:34:39.219 --> 00:34:55.749 +I actually ended up getting $8,000 back a semester, I believe, from those, so I did not have to work at all, which was extremely nice because I was definitely struggling with mental health stuff at the time. + + +00:34:55.750 --> 00:35:12.420 +Because I think like one of the—I definitely had people who resented me for it, which I understood, you know, because there are some people who had to take out a bunch of loans to go to school and had to work and all that. And it was a lot harder for them. + + +00:35:12.790 --> 00:35:27.069 +But I think one of the things that people may not understand is that when you’re in certain situations and being not only just low income, but coming from certain family situations, can be really hard to learn how to function as an adult. + + +00:35:27.070 --> 00:35:51.999 +And I think that having that extra money during college made it possible for me to get through college actually. Because I don’t know if I would have been able to balance having a job and going to school at the same time with the way that my mental health was at the time. So those scholarships really not only paid for school but also just made it possible for me to sort of be upwardly mobile socially. + + +00:35:52.000 --> 00:35:56.730 +RS: Switching over more to like campus, do you remember anything about the buildings or any particularly buildings that you remember? + + +00:35:56.770 --> 00:36:19.199 +AH: I remember the Union because I used that building a lot and the extremely comfortable leather couches that I would wait for and scope out and very aggressively snatch once they were open. + + +00:36:19.200 --> 00:36:23.169 +RS: Would this be in the fireplace room? + + +00:36:23.170 --> 00:36:36.410 +AH: Yes, and there were also ones right above the hotel lobby. Now that I think about it, I did have another job because I worked for two weeks as a temporary bookseller for the IU bookstore. + + +00:36:36.700 --> 00:37:10.229 +Any other buildings? Let’s see. Oh, Ballantine and the stairs. That sticks out to me because that was extremely uncomfortable. Also I don’t know why that amount of stairs leaves you so breathless, more so than even running it seems? Although I’ve since heard that it’s because you stop breathing when you climb stairs because you’re thinking about the destination that you have to get to. + + +00:37:10.230 --> 00:37:12.059 +RS: Do you remember any parts of campus? + + +00:37:12.060 --> 00:37:36.070 +AH: You know, back to the buildings thing, one other thing, I do remember taking some African American studies classes, and their building being really shitty. And I know in women’s studies, they were getting notices, that there was asbestos in the ceiling. So that was weird. + + +00:37:36.370 --> 00:37:58.969 +I also remember there being rivalry between—like psychological and brain sciences had gotten some upgrades, but Kelley School of Business was getting an amazing renovation, my last year there it was just starting or something. I remember hearing staff and stuff talking about, you know, sort of like, “Those people get the best buildings,” and blah blah blah. + + +00:37:58.970 --> 00:38:08.879 +RS: Yeah, that’s kind of interesting. So one of the studies in African studies, this would have been like annex buildings, like in houses slightly off campus or? + + +00:38:08.880 --> 00:38:24.830 +AH: You know, I think, at least the class, they weren’t in houses I don’t think because I remember them being sort of by Chemistry uilding, I think. I think Third Street. That’s what that is. + + +00:38:25.290 --> 00:38:43.349 +I don’t know if I ever had a class in one of the annex buildings, but they were just some of the smaller older buildings, and those might have even been in the same building. If they weren’t, they were like right next to each other. + + +00:38:43.350 --> 00:38:48.659 +RS: How diverse was the campus when you attended? + + +00:38:48.660 --> 00:39:15.170 +AH: From where I was coming from, it felt not diverse at all really because it was, you know, most people were at least middle class if not upper middle class, I think. The majority of people were white. I feel like the most, like the largest minority was probably Asian, although that’s a pretty broad category of people, you know. + + +00:39:15.270 --> 00:39:38.199 +But to me it didn’t feel diverse. Now I’ve been other places since then where I’m like, “Oh, okay.” There is some diversity, especially I think through programs like 21st century scholars and some of the scholarships that IU offers. They manage to make it a little more diverse. + + +00:39:38.200 --> 00:39:45.309 +RS: But you kind of immediately had a sense that it was less diverse than where you’d come from? + + +00:39:45.310 --> 00:40:01.130 +AH: Yeah, it really freaked me out. And I mean, also I was just used to a certain type of culture, you know. So it’s like . . . and maybe inherently in that culture there’s just diversity, you know. But yeah, it was interesting. + + +00:40:01.340 --> 00:40:23.199 +I can even think of herds of people who were literally dressed exactly the same. And it’s like having massive amounts of people who are all doing the same thing. I can think of clothes that people would wear, like Sperry’s and like those rain boots, like the long rain boots that people in sororities really like to wear. + + +00:40:23.200 --> 00:40:27.360 +RS: Oh yeah. Not Uggs, but actual rainboots. + + +00:40:27.850 --> 00:40:57.039 +AH: Yeah, I think they might come from like American Apparel or something, and that’s another—like seeing a lot of people wearing American Apparel, which I’d never seen before in my life or whatever, but you just get used to it. And it’s like everyone is wearing the same type of stuff because it’s like what—I even bought some of that stuff when I first got there because I’m like, “Woah, everyone’s wearing it. I don’t want to be left out.” + + +00:40:57.040 --> 00:40:58.989 +RS: I can remember like everyone with a North Face parka. + + +00:40:58.990 --> 00:41:01.019 +AH: Yeah, yeah. That’s another brand too. + + +00:41:01.020 --> 00:41:02.979 +RS: It’s now switching to Canada Goose. + + +00:41:02.980 --> 00:41:05.040 +AH: [Laughs] Okay, it’s different now. You got to stay up with the times. + + +00:41:05.100 --> 00:41:09.009 +RS: When was the last time you visited campus? + + +00:41:09.010 --> 00:41:27.309 +AH: The last time I was at campus was the day that I moved away, which was in 2014 because that’s when I graduated probably like a month after my last final. Or a week after my last final. + + +00:41:27.310 --> 00:41:27.309 +RS: So almost four years now. + + +00:41:27.310 --> 00:41:56.589 +AH: Yeah. A long time. I miss Mother Bear’s the most. Oh, that’s probably something that I should have mentioned when I was talking about what I liked to do with my friends. The Munchie Madness special, I think you get a pizza and breadsticks and a two liter and two brownies for like $10.99. You cannot beat it. So delicious. + + +00:41:56.590 --> 00:41:58.659 +RS: Do you have a favorite Mother Bear’s pizza? + + +00:41:58.660 --> 00:42:07.230 +AH: Their meatballs are amazing. You can get their meatballs on their pizza. I think we would always get half meatball and half green olives. + + +00:42:07.330 --> 00:42:12.429 +RS: Any other restaurants or bars or places that you remember? + + +00:42:12.430 --> 00:42:31.749 +AH: I am sure that this no longer exists. It’s called HouseBar. That was right by my apartment that I lived at the last two years, so I went there a lot because it was really chill. They had picnic tables in the back and Christmas lights and a patio. + + +00:42:31.750 --> 00:42:55.749 +I smoked a lot of cigarettes in college, so I was always looking for bars where there was a nice place to sit down. Oh also, I think this also no longer exists. It was called Uncle E’s. It was a gay bar, and that was a really fun place. They had karaoke and stuff, and it was pretty big, and a lot of the people went there when I was there. + + +00:42:55.750 --> 00:42:57.519 +RS: Do you remember where that was? + + +00:42:57.520 --> 00:43:14.370 +AH: It was going on the west—I think if you took Third Street all the way towards like Walmart, it was like on the west side of town. So it was actually really, for a bar/club in Bloomington, it was pretty far away from the hub of what was going on. + + +00:43:14.460 --> 00:43:31.400 +RS: Any other ones? I remember HouseBar too. It wasn’t long ago that that kind of closed, but yeah, it was on Walnut, right? Next to the railroad tracks. + + +00:43:31.430 --> 00:43:31.400 +AH: Mmhmm. + + +00:43:31.430 --> 00:43:37.479 +RS: Because that restaurant too, The Rail, was there, and that also shut down. + + +00:43:37.480 --> 00:43:44.839 +AH: That does not surprise me because I went there once, and it was really overpriced and not that great [laughs]. + + +00:43:44.840 --> 00:44:02.899 +RS: They have a belated one-star review from you [laughs]. So tell me briefly about what you’ve done since leaving IU those four years ago almost. + + +00:44:02.900 --> 00:44:31.900 +AH: Well, the first job—I had a job before I graduated, like had a job lined up. I was going to be . . . I was going to work in a group home for people with learning disabilities, which I got through the orientation for that, was there on the first day, witnessed some pretty abusive practices, spoke up about it, and they basically told me that I just didn’t know what I was talking about. So I quit that job. + + +00:44:31.970 --> 00:44:44.670 +And then for a while I worked as a health navigator helping people sign up for Obamacare. That was through a nonprofit called Aspen and that’s based out of Indianapolis, but I could be based out of Fort Wayne because I moved back to Fort Wayne immediately after. + + +00:44:45.030 --> 00:45:05.799 +And I would just like travel around to different places like the Bowen Center, which is a mental health facility. And I would just sort of set up shop and then people would come, and I would help them fill out the healthcare.gov application. And then right after that, oh, I got a job at Starbucks. + + +00:45:05.800 --> 00:45:26.530 +So I did that for a year, sort of because partially, when I worked at Sonic, I actually like working in fast food because it’s fast paced and there’s lots to pay attention to. And you also get to make food. So I did that. I loved being a barista. Starbucks is awesome. + + +00:45:26.900 --> 00:45:47.549 +And then what did I do? Oh yeah, I went to Fort Wayne Center for Learning from there where I tutored kids with learning disabilities, and that, I think when I immediately got out of college and then quit that first job, I really freaked out. + + +00:45:47.550 --> 00:46:02.530 +I was like, “Oh my gosh. My degree does not do anything. I don’t know what I’m going to do. I don’t really have a plan.” And after having been in school for such a long time, it was just a really big change. + + +00:46:02.680 --> 00:46:20.749 +So once I started working though, my psychology degree has been really helpful, and I think some of the stuff that I learned just about critically thinking and even some of the stuff I have learned about cognitive distortions and not thinking logically, those things haven’t really come in handy. + + +00:46:20.750 --> 00:46:33.439 +And sometimes I watch people solve problems, and I just can point out the cognitive distortion they’re using. I’m like, “Man, thank you IU and psychological and brain sciences for teaching me how to think logically.” + + +00:46:33.440 --> 00:46:54.919 +And then especially at the Fort Wayne Center for Learning, being a tutor, sort of having a background of mental disorders and all that stuff made it a lot easier to approach that job, and they were really thankful that I had that background because no one else really did. + + +00:46:54.920 --> 00:47:16.579 +And so I was able to explain a lot of the stuff that was going on or at least what I thought was going on from my perspective. And then I just recently got a job at Lincoln Financial Group as a customer service representative, which is another place where the psychology degree has been really helpful. + + +00:47:16.580 --> 00:47:45.169 +I also think like IU . . . I had a required class for making a resume and how to network briefly and just sort of a rundown of all the jobs that you could do with a psychology degree, and that class was actually immensely helpful. So yeah, that kind of led me down a pretty good path. I’m pretty happy with what I’ve been able to turn the degree and my work experience into. + + +00:47:45.170 --> 00:48:19.230 +RS: I only have a few more questions left. Two, to be specific. I guess a couple would be more accurate to say. You know, having graduated fairly recently and navigated a couple of work experiences, what sort of advice would you give to a student who’s either about to start college or in college or getting toward the end of that experience? + + +00:48:19.840 --> 00:48:47.079 +AH: I would say unless someone is paying you to go to college, if you don’t know what you want to do, don’t go to college [laughs]. Because there is even—now that I’m older, there are some things where I’m like, “Wow, that’s really interesting to me.” But I’ve already used a lot of money to go to college. And so I’m not going to go back and, you know, start from the ground up again and study those things. + + +00:48:47.080 --> 00:49:16.279 +I think there is some merit to waiting until you’re older and sort of figure out what you enjoy doing before you decide what to spend a bunch of money studying. I also would say . . . I mean, pick something that—let’s say you’re in my position, and you are going to go to college or someone paying for you to go, pick something that is really personally interesting to you. + + +00:49:16.280 --> 00:49:35.029 +I don’t know, because I mean, a lot of people, I heard a statistic that 50 percent of doctors wish they had chosen a different job. So just because you do pick something that is going to lead directly to a job doesn’t mean that you’re going to be pleased with that choice. + + +00:49:35.030 --> 00:49:55.429 +So I was really—even when there were times when I didn’t think that my degree had really done anything for me, I was really happy that I chose something that was really interesting to me because I ended up—because I was interested in it, there was a reason I was. And it helped me with a lot of different areas of my life for just sort of figuring things out. + + +00:49:55.430 --> 00:49:57.319 +RS: And then final, official question: what does IU mean to you? + + +00:49:57.320 --> 00:50:40.840 +AH: What does IU mean to me? IU was a great steppingstone for really experiencing something different. I know I’ve said a lot that it freaked me out. I was shocked when I got there. But it was all a part of a big learning, growing experience and sort of getting exposed to a way of living or like—I don’t want to say like a class, but kind of, you know, that I have never seen before. So I guess what it means to me is just change and growth and opportunity. + + +00:50:40.880 --> 00:50:47.790 +RS: Do you have anything else you want to add? Other than your like Queen Elizabeth wave right there? + + +00:50:50.100 --> 00:50:59.290 +AH: [Laughs] Miss America. You’re welcome. Thank you. No, I don’t think so. + + +00:51:00.030 --> 00:51:03.190 +RS: All right, thank you very much. + + +00:51:03.710 --> 00:51:03.190 +AH: Thank you. + + +00:51:03.710 --> 00:51:14.660 +RS: So we actually have one final question. What was the academic environment like for women on campus while you were there? + + +00:51:15.760 --> 00:51:35.899 +AH: Aggressively supportive. I don’t know which wave of feminism we’re on at this point, but I know that the internet has made it a lot easier to talk about, made it more visible. And I definitely took a lot of women’s studies classes. + + +00:51:35.900 --> 00:51:57.239 +I don’t . . . some of the women’s studies classes I definitely felt were almost biased in the other direction. You know, sort of using Freudian theory to prop up what was happening in the media. + + +00:51:57.240 --> 00:52:15.689 +Which for me is kind of a stretch, but you know, once you bring up Freud, having studied psychology makes it sort of a weird thing, but I don’t recall ever feeling left out of anything for being a woman. So I would say barring the classes where that was literally the topic that was being discussed, it seemed pretty equal. + + +00:52:15.690 --> 00:52:24.419 +RS: And did you ever have any experiences of sexism or heard about any? + + +00:52:24.420 --> 00:53:04.959 +AH: I remembered like—I was never personally, nothing ever happened to me. But I remember people talking about fraternities not being safe places basically and just sort of . . . I mean, I don’t think some of the stuff—I don’t know if it really had anything to do with IU, or if it’s just so much like the culture of everyone, you know, of people binge drinking and then making really bad decisions. + + +00:53:04.960 --> 00:53:46.600 +And in case anyone ever listens to this, that’s not just me talking about people who were victimized. It’s not like that, you know. But I mean people, date rape. I think I brought that—I made an off color joke one time in my public speaking class where someone was like, “Okay, we’re going to do word association. Fraternities. What does that make you think of?” And I was like, “Date rape.” And that everyone in the room was like, “Oh!” And people started laughing and stuff so that definitely seemed like it was a dominant rhetoric. + + +00:53:47.290 --> 00:53:48.840 +RS: Mmhmm. Anything else to add to that or anything else? + + +00:53:52.720 --> 00:53:54.549 +AH: No. + + +00:53:54.550 --> 00:53:58.230 +RS: Do you want to do your wave again? + + +00:54:00.750 --> 00:53:58.230 +AH: [Laughs] Yeah. Thank you, thank you. + + +00:54:00.750 --> 00:54:01.600 +RS: All right. Thank you so much. \ No newline at end of file diff --git a/spec/cypress/integration/browse_spec.js b/spec/cypress/integration/browse_spec.js index 4bc3967575..a752ce0940 100644 --- a/spec/cypress/integration/browse_spec.js +++ b/spec/cypress/integration/browse_spec.js @@ -13,8 +13,11 @@ * specific language governing permissions and limitations under the License. * --- END LICENSE_HEADER BLOCK --- */ +import HomePage from '../pageObjects/homePage'; context('Browse', () => { + const homePage = new HomePage(); + it('should use the base URL', () => { cy.visit('/'); // This will navigate to CYPRESS_BASE_URL cy.screenshot() @@ -24,12 +27,12 @@ context('Browse', () => { it('.browse_navigation()', () => { cy.login('administrator') cy.visit('/') - cy.contains('Browse').click() + homePage.getBrowseNavButton().click() }) it('Verify searching for an item by keyword - @T9c1158fb', () => { cy.visit('/') - cy.get("li[class='nav-item'] a[class='nav-link']").click() + homePage.getBrowseNavButton().click() //create a dynamic item here and use a portion of it as a search keyword const media_object_title = Cypress.env('MEDIA_OBJECT_TITLE') cy.get("input.global-search-input[placeholder='Search this site']").first().type(media_object_title).should('have.value', media_object_title) // Only yield inputs within form @@ -41,7 +44,7 @@ context('Browse', () => { it('Verify browsing items by a format - @Tb477685f', () => { cy.visit('/') - cy.get("li[class='nav-item'] a[class='nav-link']").click() + homePage.getBrowseNavButton().click() cy.contains('button', 'Format').click() cy.contains('a', 'Moving Image').click() cy.get('.constraint-value').within(() => { diff --git a/spec/cypress/integration/collections_spec.js b/spec/cypress/integration/collections_spec.js index bc3820e8f1..8b438dc249 100644 --- a/spec/cypress/integration/collections_spec.js +++ b/spec/cypress/integration/collections_spec.js @@ -18,13 +18,15 @@ context('Collections', () => { //Since it takes a while for a newly created collection to reflect in search, we are using static search data var search_collection = Cypress.env('SEARCH_COLLECTION') var collection_title = `Automation collection title ${Math.floor(Math.random() * 10000) + 1}` - + Cypress.on('uncaught:exception', (err, runnable) => { // Prevents Cypress from failing the test due to uncaught exceptions in the application code - TypeError: Cannot read properties of undefined (reading 'scrollDown') if (err.message.includes('Cannot read properties of undefined (reading \'success\')')) { return false; } }); + + // checks navigation to Browse it('Verify whether an admin user is able to create a collection - @T553cda51', () => { cy.login('administrator') @@ -59,12 +61,13 @@ context('Collections', () => { cy.visit('/') cy.get('a[href="/collections"]').click() //Using an existing collection for this test case for now, since it takes a while for the newly created test case to get reflected - // Generate a random index to slice the title - const startIndex = Math.floor(Math.random() * (search_collection.length-3)); - const sliceLength = Math.floor(Math.random() * (search_collection.length - startIndex)) + 1; // Random slice length - //slice a random portion of the collection title as the search keyword to ensure variablitity in testing - const search_keyword = search_collection.slice(startIndex, startIndex + sliceLength) - cy.get('input[placeholder="Search collections..."]').type(search_keyword).should('have.value', search_keyword) + //The below code to generate random slice of the collection name is failing. hence, we are using the full colelction name for now + // Generate a random index to slice the title + // const startIndex = Math.floor(Math.random() * (search_collection.length-3)); + // const sliceLength = Math.floor(Math.random() * (search_collection.length - startIndex)) + 1; // Random slice length + // //slice a random portion of the collection title as the search keyword to ensure variablitity in testing + // const search_keyword = search_collection.slice(startIndex, startIndex + sliceLength) + cy.get('input[placeholder="Search collections..."]').type(search_collection).should('have.value', search_collection) cy.get('.card-body').contains('a', search_collection); }) @@ -75,7 +78,7 @@ it('Verify whether an admin/manager is able assign other users as managers to th cy.get('#manageDropdown').click() cy.contains('Manage Content').click() cy.contains('a', collection_title).click(); - const user_manager = Cypress.env('USER_MANAGER') + const user_manager = Cypress.env('USER_MANAGER_USERNAME') cy.get("#add_manager_display").type(user_manager).should('have.value', user_manager) // Verify that the correct suggestions appear in the dropdown and click it cy.get('.tt-menu .tt-suggestion') @@ -178,6 +181,19 @@ it('Verify whether a user is able to update Collection information - @Ta1b2fef8' }) +it('Verify whether a user is able to update poster image - @T26526b2e', () => { + cy.login('administrator') + cy.visit('/') + cy.get('#manageDropdown').click() + cy.contains('Manage Content').click() + cy.contains('a', collection_title).click(); + cy.get('#poster_input').selectFile('spec/cypress/fixtures/image.png', { force: true }); + cy.wait(5000) + cy.screenshot() + cy.get('button#crop').click() + cy.get('.alert-success').should('be.visible').and('contain', 'Poster file successfully added.'); + +}) //Teardown code : delete the created collection it('Verify deleting a collection - @T959a56df', () => { @@ -194,4 +210,7 @@ it('Verify whether a user is able to update Collection information - @Ta1b2fef8' }) + + + }) diff --git a/spec/cypress/integration/item_spec.js b/spec/cypress/integration/item_spec.js new file mode 100644 index 0000000000..1a4b1554b6 --- /dev/null +++ b/spec/cypress/integration/item_spec.js @@ -0,0 +1,350 @@ +/* + * Copyright 2011-2024, The Trustees of Indiana University and Northwestern + * University. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * --- END LICENSE_HEADER BLOCK --- + */ + +context('Item', () => { + //Create dynamic items here + const collection_title = Cypress.env('SEARCH_COLLECTION'); + var item_title = `Automation Item title ${Math.floor(Math.random() * 100000) + 1}` + let item_id; + + Cypress.on('uncaught:exception', (err, runnable) => { + // Prevents Cypress from failing the test due to uncaught exceptions in the application code - TypeError: Cannot read properties of undefined (reading 'scrollDown') + if ( + err.message.includes( + "Cannot read properties of undefined (reading 'success')" + ) + ) { + return false; + } + }); + + + + it('Verify creating an item under a collection - @T139381a0', () => { + // Log in as an administrator + cy.login('administrator'); + + // Visit the home page + cy.visit('/'); + + // Go to an existing collection to create an item + cy.get('#manageDropdown').click(); + cy.contains('Manage Content').click(); + cy.contains('a', collection_title).click(); + cy.contains('a', 'Create An Item').click(); + + // Upload a video from fixtures and continue + // cy.get('li.nav-item.nav-success').contains('a.nav-link', 'Manage files').click(); + const videoName = 'test_sample.mp4'; + cy.get('div#file-upload input[type="file"][name="Filedata[]"]').selectFile( + `spec/cypress/fixtures/${videoName}`, + { force: true } + ); + cy.wait(5000); + + // Click the Upload button to submit the form, force the click action + cy.get('div#file-upload a.fileinput-submit').click({ force: true }); + + // Wait for the upload process to complete (you might need to wait for a success message or network request) + cy.wait(5000); + + // Verify that the file appears in the list of uploaded files and save and continue + cy.get('#associated_files .card-body').should('contain', videoName); // Adjust the selector as needed + cy.get('input[name="save_and_continue"][value="Continue"]').click(); + + // Fill the mandatory fields in the resource description and save and continue + cy.get('input#media_object_title') + .type(item_title) + .should('have.value', item_title); + const publicationYear = String( + Math.floor(Math.random() * (2020 - 1900 + 1)) + 1900 + ); + cy.get('input#media_object_date_issued') + .type(publicationYear) + .should('have.value', publicationYear); + cy.get( + 'input[name="save_and_continue"][value="Save and continue"]' + ).click(); + + // Navigate to the preview page by passing through structure and access control page + //structure page + cy.get( + 'input[name="save_and_continue"][value="Continue"]' + ).click() + //Access control page + cy.get( + 'input[name="save_and_continue"][value="Save and continue"]' + ).click() + + + // Validate the item title, collection, and publication date + cy.get('.page-title-wrapper h2').should('contain.text', item_title); + + cy.get('div.ramp--tabs-panel').within(() => { + cy.get('div.tab-content dt') + .contains('Date') + .next('dd') + .should('have.text', publicationYear); + cy.get('div.tab-content dt') + .contains('Collection') + .next('dd') + .contains(collection_title); + }); + + //Extract the item id to run the rest of the tests + cy.url().then((url) => { + item_id = url.split('/').pop(); // Extract the media object ID from the URL + }); + }); + + it('Verify whether a user can publish an item - @T1faa36d2', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + item_id); + cy.get('#administrative_options a').contains('Publish').click(); + + //validate success message + cy.get('div.alert p').contains('1 media object successfully published.'); + cy.get('#administrative_options a').contains('Unpublish'); + + //reload the page to ensure that the data is updated in the backend + cy.reload(); + cy.get('#administrative_options a').contains('Unpublish'); + }); + + it('Verify setting Item access to “Collections staff only” for a published item - @T13b097f8', () => { + cy.login('administrator'); + cy.visit('/'); + cy.visit('/media_objects/' + item_id+'/edit?step=access-control'); + cy.get('.item-access').within(() => { + cy.contains('label', 'Collection staff only') + .find('input[type="radio"]') + .click() + .should('be.checked'); + }); + cy.get('input[type="submit"][name="save"]').click(); +//reload the page to ensure that the data is updated in the backend +cy.reload() +cy.contains('label', 'Collection staff only') +.find('input[type="radio"]').should('be.checked'); + + //Login as a user who is not a staff to collection to validate the result + //login as a user who is a staff to the collection and verify that the item is accessible + }); + + it('Verify setting Item access to “Logged in users only” for a published item - @T0cc6ee02', () => { + cy.login('administrator'); + cy.visit('/'); + cy.visit('/media_objects/' + item_id+'/edit?step=access-control'); + cy.get('.item-access').within(() => { + cy.contains('label', 'Logged in users only') + .find('input[type="radio"]') + .click() + .should('be.checked'); + }); + cy.get('input[type="submit"][name="save"]').click(); + //reload the page to ensure that the data is updated in the backend + cy.reload() + cy.contains('label', 'Logged in users only') + .find('input[type="radio"]').should('be.checked'); + + //Additional assertions:: + //Logout of the application and verify that the item is not visible + //login as any non collection staff user and validate the result + }); + + it('Verify setting Item access to “Available to general public” for a published item - @T593dc580', () => { + cy.login('administrator'); + cy.visit('/'); + cy.visit('/media_objects/' + item_id+'/edit?step=access-control'); + cy.get('.item-access').within(() => { + cy.contains('label', 'Available to the general public') + .find('input[type="radio"]') + .click() + .should('be.checked'); + }); + cy.get('input[type="submit"][name="save"]').click(); + //reload the page to ensure that the data is updated in the backend + cy.reload() + cy.contains('label', 'Available to the general public') + .find('input[type="radio"]').should('be.checked'); + + //Additional assertion:: Verify item access without logging in + }); + + it('Verify setting Special access for an Avalon user - published item - @Ta15294e5', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + item_id+'/edit?step=access-control'); + const user_username = Cypress.env('USERS_USER_USERNAME'); + //Assign special access - Avalon user (who is not associated with the collection) + cy.get('.card.special-access') + .find('input#add_user_display') + .type(user_username) + .should('have.value', user_username); + cy.screenshot() + cy.get('input[id="add_user_display"]') + .closest('.form-group') // Find the closest form-group div that contains this input + .find('button[name="submit_add_user"]') + .click(); + //reload the page to ensure that the data is updated in the backend + // Additional assertion:: Login as the special access user and validate the result + }); + + + it('Verify that modifying the resource metadata fields are reflected properly in the preview section- @T16bc91af', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + item_id); + cy.get('#administrative_options').find('a.btn').contains('Edit').click(); + cy.get('li.nav-item.nav-success') + .contains('a.nav-link', 'Resource description') + .click(); + + //Add some resource metadata fields in the resource description section + //More fields can be added if required. + const main_contributor = Cypress.env('MEDIA_OBJECT_FIELD_MAIN_CONTRIBUTOR'); + const language = Cypress.env('MEDIA_OBJECT_FIELD_LANGUAGE'); + const summary = + "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."; + + cy.get('input#media_object_creator_0') + .clear() + .type(main_contributor) + .should('have.value', main_contributor); + cy.get('input#display_media_object_language_0') + .clear() + .type(language) + .should('have.value', language); + cy.get('textarea#abstract_0') + .clear() + .type(summary) + .should('have.value', summary); + cy.get( + 'input[name="save_and_continue"][value="Save and continue"]' + ).click(); + + // Navigate to the preview page + cy.get('li.nav-item.nav-success').contains('a.nav-link', 'Preview').click(); + + //Validate the fields + cy.get('div.ramp--tabs-panel').within(() => { + cy.get('div.tab-content dt') + .contains('Summary') + .next('dd') + .should('have.text', summary); + + // Validate the "Language" field + cy.get('div.tab-content dt') + .contains('Language') + .next('dd') + .should('have.text', language); + + // Validate the "Main contributor" field + cy.get('div.tab-content dt') + .contains('Main contributor') + .next('dd') + .should('have.text', main_contributor); + }); + }); + + it('Verify modifying the resource metadata of an item reflects in the index- @Tec49689f', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + item_id); + cy.get('#administrative_options').find('a.btn').contains('Edit').click(); + cy.get('li.nav-item.nav-success') + .contains('a.nav-link', 'Resource description') + .click(); + + //Add some resource metadata fields in the resource description section to search via index + const genre = Cypress.env('MEDIA_OBJECT_FIELD_GENRE'); + + cy.get('input#media_object_genre_0') + .clear() + .type(genre) + .should('have.value', genre); + cy.get('input[name="save"][value="Save"]').click(); + cy.get( + 'input[name="save_and_continue"][value="Save and continue"]' + ).click(); + + //Navigate to the browse section and search for the item_title + cy.contains('a.nav-link', 'Browse').click(); + cy.get("input.global-search-input[placeholder='Search this site']") + .first() + .type(item_title) + .should('have.value', item_title); // Only yield inputs within form + cy.get('button.global-search-submit').first().click(); + + //Filter using the added resource meta data ie: GENRE + cy.contains('button', 'Genres').click(); + cy.get('span.facet-label').contains('a', genre).click(); + + //Validate that the item is indexed in the search and is shown under the correct series facet + cy.get('div#documents').within(() => { + cy.get('h3.index_title.document-title-heading').contains(item_title); + }); + }); + + //This case and thus the following case may fail intermittently since the item sometimes takes too long to load, + //and the timeline button is disabled + it('Verify if a user is able to create timelines under an item - @T9972f970', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + item_id); + cy.wait(3000) //wait for timeline button to load + cy.get('#timelineBtn').click(); + cy.get('#timelineModalSave').click() + //validate the timeline page elements + cy.wait(3000) //wait for timeline page to load + cy.contains('div.app') + cy.contains('h6',"Timeline information") + cy.contains('h3',item_title) + //Validate the "Add to playlist options" + }); + + it('Verify deleting a timeline - @T89215320', () => { + cy.login('administrator'); + cy.visit('/timelines'); + cy.get('#Timelines_filter input[type="search"]') + .type(item_title) + .should('have.value', item_title); + cy.get('tr') + .contains('td', item_title) + .parent('tr') + .find('.btn-danger') + .click(); + cy.contains('Yes, Delete').click(); + cy.get('div.alert').contains('Timeline was successfully destroyed.') + }); + + //teardown code: delete the created item + // Final test to run at the end + it('Verify deleting an item - @Tf46071b7', () => { + cy.login('administrator'); + cy.visit('/media_objects/' + item_id); + cy.get('#administrative_options').find('a.btn').contains('Edit').click(); + cy.get('a#special_button_color').contains('Delete this item').click(); + cy.get('a#deleteLink').contains('Yes, I am sure').click(); + cy.get('div.alert').contains('1 media object deleted.'); + }); +}); diff --git a/spec/cypress/integration/homepage_spec.js b/spec/cypress/integration/loginPage_spec.js similarity index 60% rename from spec/cypress/integration/homepage_spec.js rename to spec/cypress/integration/loginPage_spec.js index 8c7745b81c..5d6379f74c 100644 --- a/spec/cypress/integration/homepage_spec.js +++ b/spec/cypress/integration/loginPage_spec.js @@ -13,33 +13,61 @@ * specific language governing permissions and limitations under the License. * --- END LICENSE_HEADER BLOCK --- */ +import LoginPage from '../pageObjects/loginPage'; +import HomePage from '../pageObjects/homePage'; -context('Homepage', () => { +context('Login page', () => { + const loginPage = new LoginPage(); + const homePage = new HomePage(); - // validates presence of header and footer on homepage for logged-in user - it('.sign_in_feature_testing()', () => { + it('Verify if a user is able to log in', () => { + loginPage.visit(); + loginPage.fillEmail(Cypress.env('USERS_USER_EMAIL')); + loginPage.fillPassword(Cypress.env('USERS_USER_PASSWORD')); + loginPage.submit(); + + // Assert that user is signed in successfully + homePage.getLoginSuccessAlert(); + }) + + it('should log out successfully', () => { + cy.login('user') + cy.visit('/') + // Logout + homePage.logout(); + // Assert that the login page is visible + homePage.getLogoutSuccessAlert(); + //assert user can visit the login page from here + loginPage.visit(); + }); + + + // validates presence of header and footer on homepage for logged-in user + it('.sign_in_feature_testing()', () => { cy.login('user') cy.visit('/') cy.get('#playlists_nav') - }) + }) - // validates absence of features when not logged in - it('.public_user_feature_testing()', () => { + // validates absence of features when not logged in + it('.public_user_feature_testing()', () => { cy.visit('/') cy.get('#timelines_nav').should('not.exist'); cy.get('#playlists_nav').should('not.exist'); cy.get('#bookmarks_nav').should('not.exist'); cy.get('#manageDropdown').should('not.exist'); - }) + cy.get('a[href="/users/sign_in"]').should('exist') + }) - // checks navigation to external links - it('.external_links()', () => { + + // checks navigation to external links + it('.external_links()', () => { cy.visit('/') cy.get(' a[href*="/"] ').first().click() - }) + }) - // checks navigation to Contact us page - it('.Contact_us()', () => { + // checks navigation to Contact us page + it('.Contact_us()', () => { cy.visit('/') cy.contains('Contact Us').click() cy.url().should('include', '/comments') @@ -49,10 +77,10 @@ context('Homepage', () => { cy.contains('Subject') cy.contains('Comment') cy.contains('Submit comments') - }) + }) - // verifies presence of features after login - it('.feature_verfication_login()', () => { + // verifies presence of features after login + it('.feature_verfication_login()', () => { cy.login('administrator') cy.visit('/') cy.contains('Playlists') @@ -60,10 +88,10 @@ context('Homepage', () => { cy.contains('Manage Groups') cy.contains('Manage Worker Jobs') cy.contains('Sign out') - }) + }) - // Sign in page - it('.describe_sign_in_page() - click on a DOM element', () => { + // Sign in page + it('.describe_sign_in_page() - click on a DOM element', () => { cy.visit('/') cy.get('a[href*="/users/sign_in"] ').first().click() cy.contains('Username or email').click() @@ -71,27 +99,28 @@ context('Homepage', () => { cy.contains('Password') cy.contains('Sign up') cy.contains('Connect') - }) + }) - // validates presence of items on register page - it('.validate_register_page()', () => { + // validates presence of items on register page + it('.validate_register_page()', () => { cy.visit('/users/sign_up') cy.contains('Username') cy.contains('Email') cy.contains('Password') cy.contains('Password confirmation') cy.contains('Sign up') - }) + }) - // is able to create new account - it('.create_new_account()', () => { + // is able to create new account + it('.create_new_account()', () => { cy.visit('/users/sign_up') cy.get('form.new_user').within(() => { cy.get('#user_username').type('Sumith').should('have.value', 'Sumith') // Only yield inputs within form cy.get('#user_email').type('sumith3@example.com').should('have.value', 'sumith3@example.com') // Only yield inputs within form cy.get('#user_password').type('sumith3') // Only yield textareas within form cy.get('#user_password_confirmation').type('sumith3') // Only yield textareas within form - }) + }) cy.get('input[name=commit]').last().click() - }) + }) + }) diff --git a/spec/cypress/integration/media_object_spec.js b/spec/cypress/integration/media_object_spec.js index e2b168c21f..8c36674cfb 100644 --- a/spec/cypress/integration/media_object_spec.js +++ b/spec/cypress/integration/media_object_spec.js @@ -1,60 +1,119 @@ -/* +/* * Copyright 2011-2024, The Trustees of Indiana University and Northwestern * University. Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. - * + * * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software distributed * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * --- END LICENSE_HEADER BLOCK --- -*/ + */ context('Media objects', () => { + const media_object_id = Cypress.env('MEDIA_OBJECT_ID_2'); + const media_object_title = Cypress.env('MEDIA_OBJECT_TITLE_2'); + const caption = Cypress.env('MEDIA_OBJECT_CAPTION_2'); - const media_object_id = Cypress.env('MEDIA_OBJECT_ID') - const media_object_title = Cypress.env('MEDIA_OBJECT_TITLE') + beforeEach(() => { + cy.login("administrator") + cy.visit('/media_objects/' + media_object_id); + }); // can visit a media object it('.visit_media_object()', () => { - cy.login('administrator') - // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. - cy.visit('/media_objects/' + media_object_id) - cy.contains('Unknown item').should('not.exist') - cy.contains(media_object_title) - cy.contains('Main contributor') - cy.contains('Date') - // This below line is to play the video. If the video is not playable, this might return error. In that case, comment the below code. - cy.get('button[title="Play"]').click() - }) + cy.login('administrator'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + media_object_id); + cy.contains('Unknown item').should('not.exist'); + cy.contains(media_object_title); + cy.contains('Date'); + // This below line is to play the video. If the video is not playable, this might return error. In that case, comment the below code. + cy.get('button[title="Play"]').click(); + }); // Open multiple media objects in different tabs and play it. it.skip('.play_media_objects()', () => { - cy.login('administrator') - cy.visit('/') - cy.get('a[href*="catalog"] ').first().click() - //cy.get(' a[href*="/media_objects/"] ').first().click() - cy.get('a[href*="media_objects').then((media_objects) => { - function printObject(o) { - var out = ''; - for (var p in o) { - out += p + ': ' + o[p] + '\n'; - } - alert(out); - } - var i; - for (i = 0; i < 3; i += 2) { - //media_objects[i].click() - //cy.get('div').should('have.class', 'mejs__overlay-play').first().click() - window.open(media_objects[i]) - cy.visit(String(media_objects[i])) - // Below code is to make media play - cy.window().get('div').should('have.class', 'mejs__overlay-play').first().click({ force: true }) - } - }) - }) -}) + cy.login('administrator'); + cy.visit('/'); + cy.get('a[href*="catalog"] ').first().click(); + //cy.get(' a[href*="/media_objects/"] ').first().click() + cy.get('a[href*="media_objects').then((media_objects) => { + function printObject(o) { + var out = ''; + for (var p in o) { + out += p + ': ' + o[p] + '\n'; + } + alert(out); + } + var i; + for (i = 0; i < 3; i += 2) { + //media_objects[i].click() + //cy.get('div').should('have.class', 'mejs__overlay-play').first().click() + window.open(media_objects[i]); + cy.visit(String(media_objects[i])); + // Below code is to make media play + cy.window() + .get('div') + .should('have.class', 'mejs__overlay-play') + .first() + .click({ force: true }); + } + }); + }); + + it('Verify the icons in a video player - @Tb155c718', () => { + cy.get('.vjs-big-play-button[title="Play Video"]').should('exist'); //validates the centre play button + cy.get('.vjs-play-control[title="Play"]').should('exist'); //validates the play button in the control bar + cy.get('#slider-range'); //validates the slider + cy.get('.vjs-subs-caps-button[title="Captions"]').should('exist'); //validates the captions button + cy.get('.vjs-mute-control[title="Mute"]').should('exist'); //validates the Audio button + cy.get('button[title="Open quality selector menu"]').should('exist'); //validates the quality selector button + cy.get('button[title="Playback Rate"]').should('exist'); //validates the playback rate button + cy.get('button[title="Fullscreen"]').should('exist'); //validates the playback rate button + }); + + it('Verify whether the user is able to adjust volume in the audio player - @T2e46961f', () => { + // Assume the video player is already loaded and accessible + cy.get('.vjs-mute-control').as('muteButton'); + cy.get('.vjs-volume-bar').as('volumeBar'); + + // Check initial state if needed + cy.get('@volumeBar').invoke('attr', 'aria-valuenow').should('eq', '100'); // Checking initial volume level, adjust as needed + + // Click to mute and verify + cy.get('@muteButton').click(); + cy.get('@muteButton').should('have.class', 'vjs-vol-0'); // Checking if the mute button reflects the muted state + + + //This part is failing - need to fix this + + // Adjust volume using the volume control slider + cy.get('@volumeBar') + .invoke('val', 50) + .trigger('input', { force: true }) + .trigger('change', { force: true }); // Adjust the slider to a midpoint value + + // Verify the volume has been adjusted + cy.get('@volumeBar').invoke('attr', 'aria-valuenow').should('eq', '50'); // Confirm the slider reflects the new volume level + + + + }); + + it('Verify turning on closed captions - @T4ceb4111', () => { + // Access the closed captions button + cy.get('.vjs-subs-caps-button').as('ccButton'); + cy.get('@ccButton').click(); + // Select the caption + cy.contains('li.vjs-subtitles-menu-item', caption).click(); + // Assert that the captions are enabled - the class name should change to captions-on + cy.get('@ccButton').should('have.class', 'captions-on'); // Change 'captions-on' to the actual class or attribute that indicates active captions + + //Add more assertions here to verefy captions on the screen + }); +}); diff --git a/spec/cypress/integration/navigation_spec.js b/spec/cypress/integration/navigation_spec.js index 763a6176e4..72e62f395d 100644 --- a/spec/cypress/integration/navigation_spec.js +++ b/spec/cypress/integration/navigation_spec.js @@ -55,15 +55,6 @@ context('Navigations', () => { cy.contains('manager') }) - // checks naviagtion to Playlist - it('.playlists()', () => { - cy.login('administrator') - cy.visit('/') - cy.contains('Playlists').click() - cy.contains('Playlists') - cy.contains('Create New Playlist') - }) - // is able to sign out it('.signout()', () => { cy.login('administrator') diff --git a/spec/cypress/integration/playlist_spec.js b/spec/cypress/integration/playlist_spec.js index 074237a14d..dd9fd07ce6 100644 --- a/spec/cypress/integration/playlist_spec.js +++ b/spec/cypress/integration/playlist_spec.js @@ -15,234 +15,294 @@ */ context('Playlists', () => { - //Playlist names start with '_' character for easy navigation without pagination - var playlist_title = `_Automation playlist title ${Math.floor(Math.random() * 10000) + 1 - }`; - var playlist_description = `${playlist_title} description`; - var playlist_title_public = `_Automation public playlist title ${Math.floor(Math.random() * 10000) + 1 - }`; - var playlist_description_public = `${playlist_title_public} description`; - - Cypress.on('uncaught:exception', (err, runnable) => { - // Prevents Cypress from failing the test due to uncaught exceptions in the application code - TypeError: Cannot read properties of undefined (reading 'scrollDown') - if ( - err.message.includes( - "Cannot read properties of undefined (reading 'success')" - ) - ) { - return false; - } - }); - - //checks navigation when create new playlist is accessed - it('.create_playlists()', () => { - cy.login('administrator'); - cy.visit('/playlists/new'); - }); - - //is able to create a new playlist - it('Verify creating a Playlist - @Tf1b9413d', () => { - cy.login('administrator'); - cy.visit('/'); - cy.get('#playlists_nav').click(); - cy.get('a[href="/playlists/new"]').click(); - - cy.get('#playlist_title').type(playlist_title); - cy.get('#playlist_comment').type(playlist_description); - cy.get('#submit-playlist-form').click(); - - //Validate play list creation success message - cy.get('.alert.alert-info') - .should('be.visible') - .within(() => { - cy.get('p').should('contain', 'Playlist was successfully created.'); - }); - - //Validate the newly created playlist page - // Validate the presence of the video.js element - cy.get('video[data-testid="videojs-audio-element"]') - .should('exist') - .and('have.class', 'video-js') - .and('have.class', 'vjs-big-play-centered'); - - // Validate the presence of the text "This playlist currently has no playable items." - cy.get('div[data-testid="inaccessible-message-display"] p') - .should('be.visible') - .and('contain.text', 'This playlist currently has no playable items.'); - - //validate the playlist details - title, description, buttons , etc - cy.get('div.playlist-title').get('h1').contains(playlist_title); - //verify that the playlist created by default is private - cy.get('div.playlist-title') - .find('span[title="This playlist can only be viewed by you."]') - .should('be.visible'); - cy.contains('h4', 'Description') - .should('be.visible') - .next('p') - .should('have.text', playlist_description); - cy.get('button.copy-playlist-button').should('be.visible'); - cy.get('div.ramp--auto-advance').should('be.visible'); - cy.get('#share-button').should('be.visible'); - cy.get('#edit-playlist-button').should('be.visible'); - }); - - it('.validate_playlist_table()', () => { - cy.login('administrator'); - cy.visit('/'); - cy.get('#playlists_nav').click(); - cy.visit('/playlists'); - cy.contains('Name'); - cy.contains('Visibility'); - cy.contains('Created'); - cy.contains('Updated'); - cy.contains('Actions'); - cy.contains('Private'); - cy.contains('Size'); - cy.contains('Delete'); - cy.contains('Edit'); - }); - - - // deletes playlist permanently from playlists page - it('Verify Deleting a Playlist - playlist table - @T53c3887a', () => { - cy.login('administrator'); - cy.visit('/'); - var playlist_title_1 = `__Automation playlist title ${Math.floor(Math.random() * 10000) + 1 - }`; - var playlist_description_1 = `${playlist_title} description`; - - cy.get('#playlists_nav').click(); - cy.get('a[href="/playlists/new"]').click(); - cy.get('#playlist_title').type(playlist_title_1); - cy.get('#playlist_comment').type(playlist_description_1); - cy.get('#submit-playlist-form').click(); - - cy.visit('/playlists'); - cy.get('tr') - .contains('td', playlist_title_1) - .parent('tr') - .find('.btn-danger') - .click(); - cy.contains('Yes, Delete').click(); - - cy.visit('/playlists'); - - //Handle pagination case - search for the playlist. Add API validation - cy.contains(playlist_title).should('not.exist'); - }); - - // is able to delete playlist from edit playlist page - it('Verify Deleting a Playlist - playlist page - @T49ac05b8', () => { - cy.login('user'); - cy.visit('/'); - var playlist_title = `__Automation playlist title ${Math.floor(Math.random() * 10000) + 1 - }`; - var playlist_description = `${playlist_title} description`; - - cy.get('#playlists_nav').click(); - cy.get('a[href="/playlists/new"]').click(); - cy.get('#playlist_title').type(playlist_title); - cy.get('#playlist_comment').type(playlist_description); - cy.get('#submit-playlist-form').click(); - - cy.visit('/playlists'); - cy.contains(playlist_title).click(); - cy.contains('Edit Playlist').click(); - - cy.contains('Delete Playlist').click(); - cy.contains('Yes, Delete').click(); - cy.contains('Playlist was successfully destroyed.'); - cy.visit('/playlists'); - cy.contains(playlist_title).should('not.exist'); - }); - - // is able to create public playlist - it('.create_public_playlist()', () => { - cy.login('administrator'); - cy.visit('/'); - - cy.get('#playlists_nav').click(); - cy.get('a[href="/playlists/new"]').click(); - // cy.visit('/playlists/new') - - cy.get('#playlist_title').type(playlist_title_public); - cy.get('#playlist_comment').type(playlist_description_public); - cy.contains('Public').click(); - cy.get('#submit-playlist-form').click(); - - cy.visit('/playlists'); - cy.contains(playlist_title_public); - cy.contains(playlist_description_public); - cy.contains('Public'); - cy.get('div.playlist-title') - .find('span[title="This playlist can be viewed by anyone on the web."]') - .should('be.visible'); - }); - - //is able to share a public playlist - it('Verify sharing a public playlist - @c89c89d0', () => { - cy.login('administrator'); - cy.visit('/'); - cy.get('#playlists_nav').click(); - cy.contains(playlist_title_public).click(); - cy.get('#share-button').click() - cy.get('#share-list').within(()=>{ - cy.url().then((currentUrl) => { - cy.get('#link-object') - .should('have.value', currentUrl); - }); - }) - }); - - // is able to change public playlist to private - it('Verify editing a playlist from playlist table (Access control) - @T7fa4cea5', () => { - cy.login('administrator') - cy.visit('/') - // cy.visit('/playlists/new') - cy.get('#playlists_nav').click() - cy.get('tr') - .contains('td', playlist_title_public) - .parent('tr') - .contains('Edit') - .click(); - cy.screenshot() - cy.get('#playlist_edit_button').click() - cy.contains('Private').click() - cy.contains('Save Changes').click() - cy.contains('Playlist was successfully updated') - cy.contains('Private') - }) - - // is able to edit playlist name and description - it('Verify editing a Playlist from playlist page - @T5055855c', () => { - cy.login('administrator') - cy.visit('/playlists') - - cy.contains(playlist_title_public).click() - cy.contains('Edit Playlist').click() - - cy.get('#playlist_edit_button').click() - - var updated_title = "_Edited" + playlist_title_public - var updatedDescription = "_Edited" + playlist_description_public - - cy.get('#playlist_title').clear().type(updated_title) - cy.get('#playlist_comment').clear().type(updatedDescription) - cy.contains('Save Changes').click() - cy.contains('Playlist was successfully updated') - cy.get('#playlist_view_div').within(() => { - cy.contains('dd',updated_title) - cy.contains('dd', updatedDescription) - }).then(() => { - // If assertions pass, update the playlist_title_public - playlist_title_public = updated_title; - playlist_description_public = updatedDescription - cy.log(`Playlist title updated to: ${playlist_title_public}`); // Log the updated value - }); - }) - - - //Add teardown code here to delete playlist_title and playlist_title_public - - + //Playlist names start with '_' character for easy navigation without pagination + // var playlist_title = `_Automation playlist title ${Math.floor(Math.random() * 10000) + 1 + // }`; + var playlist_title = '_Automation playlist title 2086'; + var playlist_description = `${playlist_title} description`; + var playlist_title_public = `_Automation public playlist title ${ + Math.floor(Math.random() * 10000) + 1 + }`; + var playlist_description_public = `${playlist_title_public} description`; + const media_object_id = Cypress.env('MEDIA_OBJECT_ID_2'); + const media_object_title = Cypress.env('MEDIA_OBJECT_TITLE_2'); + + Cypress.on('uncaught:exception', (err, runnable) => { + // Prevents Cypress from failing the test due to uncaught exceptions in the application code - TypeError: Cannot read properties of undefined (reading 'scrollDown') + if ( + err.message.includes( + "Cannot read properties of undefined (reading 'success')" + ) + ) { + return false; + } + }); + + + //is able to create a new playlist + it('Verify creating a Playlist - @Tf1b9413d', () => { + cy.login('administrator'); + cy.visit('/'); + cy.get('#playlists_nav').click(); + cy.get('a[href="/playlists/new"]').click(); + + cy.get('#playlist_title').type(playlist_title); + cy.get('#playlist_comment').type(playlist_description); + cy.get('#submit-playlist-form').click(); + + //Validate play list creation success message + cy.get('.alert.alert-info') + .should('be.visible') + .within(() => { + cy.get('p').should('contain', 'Playlist was successfully created.'); + }); + + //Validate the newly created playlist page + // Validate the presence of the video.js element + cy.get('video[data-testid="videojs-audio-element"]') + .should('exist') + .and('have.class', 'video-js') + .and('have.class', 'vjs-big-play-centered'); + + // Validate the presence of the text "This playlist currently has no playable items." + cy.get('div[data-testid="inaccessible-message-display"] p') + .should('be.visible') + .and('contain.text', 'This playlist currently has no playable items.'); + + //validate the playlist details - title, description, buttons , etc + cy.get('div.playlist-title').get('h1').contains(playlist_title); + //verify that the playlist created by default is private + cy.get('div.playlist-title') + .find('span[title="This playlist can only be viewed by you."]') + .should('be.visible'); + cy.get('div.ramp--playlist-description') + .contains(playlist_description); + cy.get('button.copy-playlist-button').should('be.visible'); + cy.get('div.ramp--auto-advance').should('be.visible'); + cy.get('#share-button').should('be.visible'); + cy.get('#edit-playlist-button').should('be.visible'); + }); + + it('.validate_playlist_table()', () => { + cy.login('administrator'); + cy.visit('/'); + cy.get('#playlists_nav').click(); + cy.visit('/playlists'); + cy.contains('Name'); + cy.contains('Visibility'); + cy.contains('Created'); + cy.contains('Updated'); + cy.contains('Actions'); + cy.contains('Private'); + cy.contains('Size'); + cy.contains('Delete'); + cy.contains('Edit'); + }); + + // is able to create public playlist + it('.create_public_playlist()', () => { + cy.login('administrator'); + cy.visit('/'); + + cy.get('#playlists_nav').click(); + cy.get('a[href="/playlists/new"]').click(); + // cy.visit('/playlists/new') + + cy.get('#playlist_title').type(playlist_title_public); + cy.get('#playlist_comment').type(playlist_description_public); + cy.contains('Public').click(); + cy.get('#submit-playlist-form').click(); + + cy.contains(playlist_title_public); + cy.contains('Public'); + cy.get('div.playlist-title') + .find('span[title="This playlist can be viewed by anyone on the web."]') + .should('be.visible'); + }); + + //is able to share a public playlist + it('Verify sharing a public playlist - @c89c89d0', () => { + cy.login('administrator'); + cy.visit('/'); + cy.get('#playlists_nav').click(); + cy.contains(playlist_title_public).click(); + cy.get('#share-button').click(); + cy.get('#share-list').within(() => { + cy.url().then((currentUrl) => { + cy.get('#link-object').should('have.value', currentUrl); + }); + }); + }); + + // is able to change public playlist to private + it('Verify editing a playlist from playlist table (Access control) - @T7fa4cea5', () => { + cy.login('administrator'); + cy.visit('/'); + // cy.visit('/playlists/new') + cy.get('#playlists_nav').click(); + cy.get('tr') + .contains('td', playlist_title_public) + .parent('tr') + .contains('Edit') + .click(); + cy.get('#playlist_edit_button').click(); + cy.contains('Private').click(); + cy.contains('Save Changes').click(); + cy.contains('Playlist was successfully updated'); + cy.contains('Private'); + }); + + // is able to edit playlist name and description + it('Verify editing a Playlist from playlist page - @T5055855c', () => { + cy.login('administrator'); + cy.visit('/playlists'); + + cy.contains(playlist_title_public).click(); + cy.contains('Edit Playlist').click(); + + cy.get('#playlist_edit_button').click(); + + var updated_title = '_Edited' + playlist_title_public; + var updatedDescription = '_Edited' + playlist_description_public; + + cy.get('#playlist_title').clear().type(updated_title); + cy.get('#playlist_comment').clear().type(updatedDescription); + cy.contains('Save Changes').click(); + cy.contains('Playlist was successfully updated'); + cy.get('#playlist_view_div') + .within(() => { + cy.contains('dd', updated_title); + cy.contains('dd', updatedDescription); + }) + .then(() => { + // If assertions pass, update the playlist_title_public + playlist_title_public = updated_title; + playlist_description_public = updatedDescription; + cy.log(`Playlist title updated to: ${playlist_title_public}`); // Log the updated value + }); + }); + + it('Verify the "add to playlist" button behavior - @Tcdb5ac47', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + media_object_id); + cy.contains(media_object_title); + cy.get('#addToPlaylistBtn').click(); + //Validate the "Add to playlist options" + cy.get('#add-to-playlist-form-group').within(() => { + cy.contains('label.form-check-label', 'Custom Timespan').get( + 'input[type="radio"]' + ); + cy.contains('label.form-check-label', 'Current Track ()').get( + 'input[type="radio"]' + ); + cy.contains('label.form-check-label', 'Current Section ').get( + 'input[type="radio"]' + ); + cy.contains('label.form-check-label', 'All Sections').get( + 'input[type="radio"]' + ); + }); + + //Validate Playlist dropdown + cy.get('#select2-post_playlist_id-container').click(); + + cy.get('span.select2-dropdown').within(() => { + cy.get('ul.select2-results__options li') + .contains('Add new playlist') + .should('be.visible'); + //Validate search for playlist within the playlist dropdown + cy.get('span.select2-search input.select2-search__field').type( + playlist_title + ); + cy.get('span.select2-results') + .contains('b', playlist_title) + .should('be.visible'); + }); + }); + + it('Verify adding the current section of an item to a playlist - Create playlist items for each track/subsection - @T3e614dbc', () => { + cy.login('administrator'); + cy.visit('/'); + // The below code is hard-coded for a media object url. This needs to be changed with a valid object URL later for each website. + cy.visit('/media_objects/' + media_object_id); + cy.contains(media_object_title); + cy.get('#addToPlaylistBtn').click(); + + //Click on the "Current section" radio button + cy.get('#playlistitem_scope_section').should('be.visible').click(); + + //Open Playlist dropdown + cy.get('#select2-post_playlist_id-container').click(); + + //Validate search for playlist within the playlist dropdown + cy.get('span.select2-search input.select2-search__field').type( + playlist_title + ); + cy.get('span.select2-results') + .contains('b', playlist_title) + .should('be.visible'); + + // This part is failing - need to fix this + //Click on the playlist_title from search + cy.get('ul#select2-post_playlist_id-results').within(() => { + cy.contains( + 'li.select2-results__option', + playlist_title + ) + .eq(1) + .click(); + }); + cy.get('#addToPlaylistSave').click(); + + //verify playlist created success message + cy.get('#add_to_playlist_result_message') + .should('be.visible') + .should('contain.text', 'Playlist items created successfully.'); + cy.screenshot(); + }); + + // Teardown codes to delete playlist_title and playlist_title_public + + // deletes playlist permanently from playlists table + //The "playlist_title" playlist gets deleted here + it('Verify Deleting a Playlist - playlist table - @T53c3887a', () => { + cy.login('administrator'); + cy.visit('/'); + + cy.visit('/playlists'); + cy.get('tr') + .contains('td', playlist_title) + .parent('tr') + .find('.btn-danger') + .click(); + cy.contains('Yes, Delete').click(); + + cy.visit('/playlists'); + + //Add more assertions here + //Handle pagination case - search for the playlist - it should not appear. Add API validation + cy.contains(playlist_title).should('not.exist'); + }); + + // is able to delete playlist from edit playlist page + //The "playlist_title_public" playlist gets deleted here + it('Verify Deleting a Playlist - playlist page - @T49ac05b8', () => { + cy.login('administrator'); + cy.visit('/'); + + cy.visit('/playlists'); + cy.contains(playlist_title_public).click(); + cy.contains('Edit Playlist').click(); + + cy.contains('Delete Playlist').click(); + cy.contains('Yes, Delete').click(); + cy.contains('Playlist was successfully destroyed.'); + cy.visit('/playlists'); + + //Add more assertions here + //Handle pagination case - search for the playlist - it should not appear. Add API validation + cy.contains(playlist_title_public).should('not.exist'); + }); }); diff --git a/spec/cypress/pageObjects/homePage.js b/spec/cypress/pageObjects/homePage.js new file mode 100644 index 0000000000..cac84d743d --- /dev/null +++ b/spec/cypress/pageObjects/homePage.js @@ -0,0 +1,37 @@ +/* + * Copyright 2011-2024, The Trustees of Indiana University and Northwestern + * University. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * --- END LICENSE_HEADER BLOCK --- +*/ + +class HomePage { + + getBrowseNavButton() { + return cy.contains('a.nav-link', 'Browse'); + } + + getLoginSuccessAlert() { + return cy.get('div.alert.alert-info').contains('p', 'Signed in successfully.'); + } + + logout() { + cy.get('a[href="/users/sign_out"]').first().click(); + } + + getLogoutSuccessAlert(){ + return cy.get('div.alert.alert-success').contains('p', 'Signed out successfully.'); + } +} + + export default HomePage; + \ No newline at end of file diff --git a/spec/cypress/pageObjects/loginPage.js b/spec/cypress/pageObjects/loginPage.js new file mode 100644 index 0000000000..41710dd54d --- /dev/null +++ b/spec/cypress/pageObjects/loginPage.js @@ -0,0 +1,36 @@ +/* + * Copyright 2011-2024, The Trustees of Indiana University and Northwestern + * University. Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed + * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + * CONDITIONS OF ANY KIND, either express or implied. See the License for the + * specific language governing permissions and limitations under the License. + * --- END LICENSE_HEADER BLOCK --- +*/ + +class LoginPage { + visit() { + cy.visit('/users/sign_in'); + } + + fillEmail(email) { + cy.get('input[name="user[login]"]').type(email); + } + + fillPassword(password) { + cy.get('input[name="user[password]"]').type(password); + } + + submit() { + cy.get('input[type="submit"][value="Connect"]').click(); + } + } + + export default LoginPage; + \ No newline at end of file diff --git a/spec/cypress/support/commands.js b/spec/cypress/support/commands.js index b4e2315a99..94783de849 100644 --- a/spec/cypress/support/commands.js +++ b/spec/cypress/support/commands.js @@ -26,6 +26,7 @@ // // // -- This is a parent command -- +import 'cypress-file-upload'; Cypress.Commands.add("login", (role) => { const email = Cypress.env('USERS_' + role.toUpperCase() + '_EMAIL') const password = Cypress.env('USERS_' + role.toUpperCase() + '_PASSWORD') @@ -65,3 +66,43 @@ Cypress.Commands.add("login", (role) => { // // -- This will overwrite an existing command -- // Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... }) +// support/commands.js + +Cypress.Commands.add('createItemUnderCollectionUI',(collectionTitle, itemTitle ) => { + const videoName = "test_sample.mp4"; + const publicationYear = String(Math.floor(Math.random() * (2020 - 1900 + 1)) + 1900); + + return cy.wrap(new Promise((resolve, reject) => { + cy.login('administrator'); + cy.visit('/'); + cy.get('#manageDropdown').click(); + cy.contains('Manage Content').click(); + cy.contains('a', collectionTitle).click(); + cy.contains('a', 'Create An Item').click(); + + cy.get('div#file-upload input[type="file"][name="Filedata[]"]').selectFile(`spec/cypress/fixtures/${videoName}`, { force: true }); + cy.wait(5000); + cy.get('div#file-upload a.fileinput-submit').click({ force: true }); + cy.wait(5000); + cy.get('#associated_files .card-body').should('contain', videoName); + cy.get('input[name="save_and_continue"][value="Continue"]').click(); + + cy.get('input#media_object_title').type(itemTitle).should('have.value', itemTitle); + cy.get('input#media_object_date_issued').type(publicationYear).should('have.value', publicationYear); + cy.get('input[name="save_and_continue"][value="Save and continue"]').click(); + + cy.get('li.nav-item.nav-success').contains('a.nav-link', 'Preview').click(); + + cy.get('.page-title-wrapper h2').should('contain.text', itemTitle); + + cy.get('div.ramp--tabs-panel').within(() => { + cy.get('div.tab-content dt').contains('Date').next('dd').should('have.text', publicationYear); + cy.get('div.tab-content dt').contains('Collection').next('dd').contains(collectionTitle); + }); + + cy.url().then(url => { + const itemId = url.split('/').pop(); + resolve(itemId); // Resolve the promise with the item ID + }); + })); +});