Update cypress test

This commit is contained in:
Ramon Wenger 2019-01-31 16:47:27 +01:00
parent 050f700760
commit 10841a69be
2 changed files with 3 additions and 3 deletions

View File

@ -4,13 +4,13 @@ describe('The Rooms Page', () => {
cy.visit('/rooms');
cy.get('.add-room').should('exist');
cy.get('[data-cy=add-room]').should('exist');
});
it('add room should not exist for student', () => {
cy.login('rahel.cueni', 'test');
cy.visit('/rooms');
cy.get('.add-room').should('not.exist');
cy.get('[data-cy=add-room]').should('not.exist');
});
});

View File

@ -1,7 +1,7 @@
<template>
<div class="rooms-page">
<room-widget v-for="room in filteredRooms" v-bind="room" :key="room.name"></room-widget>
<add-room v-if="canAddRoom"></add-room>
<add-room v-if="canAddRoom" data-cy="add-room"></add-room>
</div>
</template>