Skip to content

Commit

Permalink
Merge branch 'main' into n21-2357-extend-copying-of-boards-for-board-…
Browse files Browse the repository at this point in the history
…card-links
  • Loading branch information
sdinkov authored Feb 10, 2025
2 parents 282b008 + c2e5338 commit 265182c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Feature: Room - Add, edit and delete board in room

# post-condition: teacher deletes room
When I click on three dot menu in room page
When I click on delete option in room menu
When I select the three dot menu action 'delete'
Then I see confirmation modal for deleting the room
When I click on delete button in confirmation modal
Then I do not see '<room_name>' on room overview page
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/room_board/shareBoardCardLinkInRoom.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Feature: Room Board - To share a board card link
When I enter the room name '<room_name>'
When I click on the button to save the room
When I click on three dot menu in room page
When I click on participants option in room menu
When I select the three dot menu action 'edit-members'
When I click on FAB to add participants
Then I see add participants modal
Then I see school '<school_name>' in school dropdown
Expand Down Expand Up @@ -61,7 +61,7 @@ Feature: Room Board - To share a board card link
When I go to room '<room_name>'
Then I see the detail page of room '<room_name>'
When I click on three dot menu in room page
When I click on delete option in room menu
When I select the three dot menu action 'delete'
Then I see confirmation modal for deleting the room
When I click on delete button in confirmation modal
Then I do not see '<room_name>' on room overview page
Expand Down
6 changes: 3 additions & 3 deletions cypress/e2e/rooms/addDeleteParticipants.feature
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Feature: Room - Add and delete participants
# first teacher is able to add participants
Then I see the detail page of room '<room_name>'
When I click on three dot menu in room page
When I click on participants option in room menu
When I select the three dot menu action 'edit-members'
Then I see the edit participants page of room '<room_name>'
When I click on FAB to add participants
Then I see add participants modal
Expand All @@ -41,7 +41,7 @@ Feature: Room - Add and delete participants
When I go to room '<room_name>'
Then I see the detail page of room '<room_name>'
When I click on three dot menu in room page
When I click on participants option in room menu
When I select the three dot menu action 'edit-members'
Then I see the edit participants page of room '<room_name>'
Then I see '<participant_name>' in the room participants list
When I click on 'remove-member' button in the participant list for participant '<participant_name>'
Expand All @@ -59,7 +59,7 @@ Feature: Room - Add and delete participants
When I go to room '<room_name>'
Then I see the detail page of room '<room_name>'
When I click on three dot menu in room page
When I click on delete option in room menu
When I select the three dot menu action 'delete'
Then I see confirmation modal for deleting the room
When I click on delete button in confirmation modal
Then I do not see '<room_name>' on room overview page
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/rooms/createEditDeleteRoom.feature
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature: Room - To create, edit and delete room
When I go to room '<room_name>'
Then I see the detail page of room '<room_name>'
When I click on three dot menu in room page
When I click on edit option in room menu
When I select the three dot menu action 'edit'
Then I see edit page of room '<room_name>'
When I enter the room name '<room_name_new>'
When I click on the button to save the room
Expand All @@ -37,7 +37,7 @@ Feature: Room - To create, edit and delete room
When I go to room '<room_name_new>'
Then I see the detail page of room '<room_name_new>'
When I click on three dot menu in room page
When I click on delete option in room menu
When I select the three dot menu action 'delete'
Then I see confirmation modal for deleting the room
When I click on delete button in confirmation modal
Then I do not see '<room_name_new>' on room overview page
Expand Down
21 changes: 7 additions & 14 deletions cypress/support/pages/rooms/pageRooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ class Rooms {
static #roomNameInput = '[data-testid="room-name-input"]';
static #roomOverviewNavigationButton = '[data-testid="sidebar-rooms"]';
static #roomDetailFAB = '[data-testid="room-menu"]';
static #roomDetailFABEdit = '[data-testid="room-action-edit"]';
static #roomDetailFABParticipants = '[data-testid="room-action-manage-members"]';
static #roomDetailFABDelete = '[data-testid="room-action-delete"]';
static #addContentButton = '[data-testid="add-content-button"]';
static #fabButtonAddBoard = '[data-testid="fab_button_add_board"]';
static #confirmDeletionModalTitle = '[data-testid="delete-dialog-item"]';
Expand Down Expand Up @@ -102,16 +99,10 @@ class Rooms {
cy.get(Rooms.#roomDetailFAB).click();
}

openEditInThreeDotMenuForRoom() {
cy.get(Rooms.#roomDetailFABEdit).click();
}

openParticipantsInThreeDotMenuForRoom() {
cy.get(Rooms.#roomDetailFABParticipants).click();
}

openDeleteInThreeDotMenuForRoom() {
cy.get(Rooms.#roomDetailFABDelete).click();
clickOnKebabMenuAction(kebabMenuAction) {
cy.get(
`[data-testid="kebab-menu-action-${kebabMenuAction.toLowerCase()}"]`
).click();
}

seeConfirmationModalForRoomDeletion() {
Expand Down Expand Up @@ -182,7 +173,9 @@ class Rooms {
.within(() => {
cy.get(Rooms.#memberRowInRoomMembershipTable).click();
});
cy.get(`[data-testid="kebab-menu-action-${kebabMenuAction.toLowerCase()}"]`).click();
cy.get(
`[data-testid="kebab-menu-action-${kebabMenuAction.toLowerCase()}"]`
).click();
}

seeParticipantInList(participantName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Given("admin enables video conference for the school in the school settings page

Given("the room named {string} is deleted", (room_name) => {
rooms.openThreeDotMenuForRoom();
rooms.openDeleteInThreeDotMenuForRoom();
rooms.clickOnKebabMenuAction("delete");
rooms.seeConfirmationModalForRoomDeletion();
rooms.clickDeleteInConfirmationModal();
rooms.roomIsNotVisibleOnOverviewPage(room_name);
Expand Down
13 changes: 0 additions & 13 deletions cypress/support/step_definition/rooms/roomSteps.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import Rooms from "../../pages/rooms/pageRooms";
import RoomBoards from "../../pages/room_board/pageRoomBoards";

const rooms = new Rooms();
const roomBoards = new RoomBoards();

When("I select the colour for the room", () => {
rooms.selectRoomColour();
Expand Down Expand Up @@ -60,18 +59,6 @@ When("I click on three dot menu in room page", () => {
rooms.openThreeDotMenuForRoom();
});

When("I click on edit option in room menu", () => {
rooms.openEditInThreeDotMenuForRoom();
});

When("I click on participants option in room menu", () => {
rooms.openParticipantsInThreeDotMenuForRoom();
});

When("I click on delete option in room menu", () => {
rooms.openDeleteInThreeDotMenuForRoom();
});

Then("I see confirmation modal for deleting the room", () => {
rooms.seeConfirmationModalForRoomDeletion();
});
Expand Down

0 comments on commit 265182c

Please sign in to comment.