Skip to content

Commit

Permalink
cypress tests
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabeth-tang committed Dec 4, 2023
1 parent cef72ce commit 04d7f45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cypress/integration/test.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,10 @@ it('Minimize a semester', () => {
it('Multiple plans dropdown open/close', () => {
// dropdown initially closed
cy.get('[data-cyId=multiplePlans-dropdown-content]').should('not.exist');
cy.get('[data-cyId=multiplePlans-dropdown]').click();
cy.get('[data-cyId=multiplePlans-dropdown-open]').click();
// dropdown opens
cy.get('[data-cyId=multiplePlans-dropdown-content]').should('be.visible');
cy.get('[data-cyId=multiplePlans-dropdown]').click();
cy.get('[data-cyId=multiplePlans-dropdown-close]').click();
// dropdown closed again
cy.get('[data-cyId=multiplePlans-dropdown-content]').should('not.exist');
});
4 changes: 3 additions & 1 deletion src/components/Requirements/MultiplePlansDropdown.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<div class="multiplePlans-dropdown">
<div class="multiplePlans-dropdown-placeholder wrapper" data-cyId="multiplePlans-dropdown">
<div class="multiplePlans-dropdown-placeholder wrapper">
<button>
<img
:src="editPlan"
Expand All @@ -15,12 +15,14 @@
class="multiplePlans-dropdown-placeholder up-arrow"
v-if="shown"
alt="close dropdown"
data-cyId="multiplePlans-dropdown-close"
@click="closeDropdownIfOpen()"
/>
<img
class="multiplePlans-dropdown-placeholder down-arrow"
v-else
alt="open dropdown"
data-cyId="multiplePlans-dropdown-open"
@click="closeDropdownIfOpen()"
/>
</div>
Expand Down

0 comments on commit 04d7f45

Please sign in to comment.