From fca3f4189407720625d86f4605ee22f07198cf1e Mon Sep 17 00:00:00 2001 From: atlldwp Date: Thu, 16 Jan 2025 09:08:59 +0100 Subject: [PATCH 01/15] copy board in room test --- .../copyColumnAndListBoardInRoom.feature | 30 +++++++ .../prePostConditionSteps.spec.js | 78 ++++++++++++++++--- 2 files changed, 98 insertions(+), 10 deletions(-) create mode 100644 cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature diff --git a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature new file mode 100644 index 00000000..14600345 --- /dev/null +++ b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature @@ -0,0 +1,30 @@ +@regression_test +@stable_test +Feature: Room - Add, remove BBB tool in the room board + + As a teacher I want to add and remove BBB tool in the room board so that I can manage video confernce. + + Scenario: Teacher add and remove BBB tool in the room board, including pre-conditions + Given I am logged in as a '' at '' + Given a room with name '' exist + Given a multicolumn board with the name '' exists in the room + Given a list board with the name '' exists in the room + + # teacher copies column board + + # teacher copies list board + + # post-condition: teacher deletes room + Given room with name '' is deleted + + + + @school_api_test + Examples: + | teacher | namespace | room_name | board_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | + + @staging_test + Examples: + | teacher | namespace | room_name | board_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 50f3b139..da0f7b4f 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -1,21 +1,79 @@ import { Given, Then, When } from "@badeball/cypress-cucumber-preprocessor"; import Board from "../../pages/course_board/pageBoard"; import Courses from "../../pages/course/pageCourses"; +import RoomBoards from "../../pages/room_board/pageRoomBoards"; +import Rooms from "../../pages/room/pageRooms"; +const roomBoards = new RoomBoards(); +const rooms = new Rooms(); const courses = new Courses(); const board = new Board(); -Given("a course with name {string} exists with {string} as teacher and {string} as student", (courseName, teacherName, studentName) => { - courses.navigateToCoursesOverview(); - courses.clickOnCreateCourseFAB(); - courses.fillCourseCreationForm(courseName); - courses.selectCourseColour(); - courses.selectTeacherInCourseCreatePage(teacherName); - courses.clickOnNextStepsBtnAfterEnteringCourseDetails(); - courses.selectStudentInCourseCreatePage(studentName); - courses.clickOnNextStepButtonOnCourseParticipationDetail(); +Given("room with name {string} is deleted", (room_name) => { + rooms.openThreeDotMenuForRoom(); + rooms.openDeleteInThreeDotMenuForRoom(); + rooms.seeConfirmationModalForRoomDeletion(); + rooms.clickDeleteInConfirmationModal(); + rooms.roomIsNotVisibleOnOverviewPage(room_name); +}); + +Given("a room with name {string} exist", (room_name) => { + rooms.navigateToRoomsOverview(); + rooms.clickOnCreateRoomFAB(); + rooms.showRoomCreationPage(); + rooms.fillRoomFormName(room_name); + rooms.selectRoomColour(); + rooms.selectTodayStartDateForRoom(); + rooms.selectEndDateForRoom(); + rooms.submitRoom(); + rooms.seeRoomDetailPage(newRoomName); +}); + +Given( + "a multicolumn board with the name {string} exists in the room", + (edited_board_title) => { + rooms.clickOnAddContentButton(); + rooms.seeFabButtonToAddBoard(); + rooms.clickOnFabButtonToAddBoard(); + roomBoards.seeColumnBoardDialogBox(); + roomBoards.clickOnButtonToAddMultiColumnBoard(); + roomBoards.seeNewRoomBoardCreatePage(); + roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); + roomBoards.clickOnEditInBoardMenu(); + roomBoards.enterRoomBoardTitle(edited_board_title); + roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); + roomBoards.seeGivenRoomBoardTitle(edited_board_title); + } +); + +Given("a list board with the name {string} exists in the room", (edited_board_title) => { + rooms.clickOnAddContentButton(); + rooms.seeFabButtonToAddBoard(); + rooms.clickOnFabButtonToAddBoard(); + roomBoards.seeColumnBoardDialogBox(); + roomBoards.clickOnButtonToAddSingleColumnBoard(); + roomBoards.seeNewRoomBoardCreatePage(); + roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); + roomBoards.clickOnEditInBoardMenu(); + roomBoards.enterRoomBoardTitle(edited_board_title); + roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); + roomBoards.seeGivenRoomBoardTitle(edited_board_title); }); +Given( + "a course with name {string} exists with {string} as teacher and {string} as student", + (courseName, teacherName, studentName) => { + courses.navigateToCoursesOverview(); + courses.clickOnCreateCourseFAB(); + courses.fillCourseCreationForm(courseName); + courses.selectCourseColour(); + courses.selectTeacherInCourseCreatePage(teacherName); + courses.clickOnNextStepsBtnAfterEnteringCourseDetails(); + courses.selectStudentInCourseCreatePage(studentName); + courses.clickOnNextStepButtonOnCourseParticipationDetail(); + } +); + Given("a board exists in course {string}", (courseName) => { courses.navigateToCoursesOverview(); courses.navigateToCoursePage(courseName); @@ -40,4 +98,4 @@ Given("course with name {string} is deleted", (courseName) => { courses.confirmCourseDeletionOnModal(); courses.navigateToCoursesOverview(); courses.courseIsNotVisiblOnOverviewPage(courseName); -}); \ No newline at end of file +}); From 47db6c1833c8e38a630a7ded3124135baf4134fd Mon Sep 17 00:00:00 2001 From: atlldwp Date: Fri, 17 Jan 2025 16:17:16 +0100 Subject: [PATCH 02/15] updated test --- .../createEditDeleteSingleColumnBoard.feature | 2 +- .../copyColumnAndListBoardInRoom.feature | 14 +++--- ...eteMultiAndSingleColumnBoardInRoom.feature | 16 +++---- cypress/support/pages/course/pageCourses.js | 47 ++++++++++--------- .../support/pages/course_board/pageBoard.js | 8 ++-- .../pages/mediashelf/pageMediaShelf.js | 2 +- cypress/support/pages/room/pageRooms.js | 8 +--- .../pages/room_board/pageRoomBoards.js | 10 ++-- .../prePostConditionSteps.spec.js | 2 +- .../course/commonCourseSteps.spec.js | 4 +- .../room_boards/roomBoardSteps.spec.js | 3 +- 11 files changed, 58 insertions(+), 58 deletions(-) diff --git a/cypress/e2e/course_board/createEditDeleteSingleColumnBoard.feature b/cypress/e2e/course_board/createEditDeleteSingleColumnBoard.feature index c1685566..2b3dd5b6 100644 --- a/cypress/e2e/course_board/createEditDeleteSingleColumnBoard.feature +++ b/cypress/e2e/course_board/createEditDeleteSingleColumnBoard.feature @@ -81,7 +81,7 @@ Feature: Course Board - To create, edit and delete a single column course board Given I am logged in as a '' at '' When I go to courses overview When I go to course '' - Then I can see board '' on course page + Then I can see board on course page When I click on card Course Board Then I see a whiteboard on the board Then I see '' in board card text element diff --git a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature index 14600345..82565700 100644 --- a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature +++ b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature @@ -1,5 +1,5 @@ -@regression_test -@stable_test +#@regression_test +#@stable_test Feature: Room - Add, remove BBB tool in the room board As a teacher I want to add and remove BBB tool in the room board so that I can manage video confernce. @@ -10,7 +10,7 @@ Feature: Room - Add, remove BBB tool in the room board Given a multicolumn board with the name '' exists in the room Given a list board with the name '' exists in the room - # teacher copies column board + # teacher copies multi column board # teacher copies list board @@ -21,10 +21,10 @@ Feature: Room - Add, remove BBB tool in the room board @school_api_test Examples: - | teacher | namespace | room_name | board_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | + | teacher | namespace | room_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | @staging_test Examples: - | teacher | namespace | room_name | board_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | + | teacher | namespace | room_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | diff --git a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature index a29a33ce..8728fca8 100644 --- a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature +++ b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature @@ -26,10 +26,10 @@ Feature: Room - Add, edit and delete board in room When I click on button to add multi column board Then I see the page board details - # teacher edits title of the new multi column board + # teacher edits the default title of the new multi column board When I click on the three dot menu in room board When I click on edit in board menu - Then I change the room board title to '' + Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' @@ -59,10 +59,10 @@ Feature: Room - Add, edit and delete board in room When I click on button to add single column board Then I see the page board details - # teacher edits title of the new single column board + # teacher edits the default title of the new single column board When I click on the three dot menu in room board When I click on edit in board menu - Then I change the room board title to '' + Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' @@ -83,10 +83,10 @@ Feature: Room - Add, edit and delete board in room @school_api_test Examples: - | teacher | namespace | room_name | board_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | + | teacher | namespace | room_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | @staging_test Examples: - | teacher | namespace | room_name | board_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Cypress Board Name | Board Cy Title | + | teacher | namespace | room_name | edited_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | diff --git a/cypress/support/pages/course/pageCourses.js b/cypress/support/pages/course/pageCourses.js index 09fd1e1d..c4ac1bfd 100644 --- a/cypress/support/pages/course/pageCourses.js +++ b/cypress/support/pages/course/pageCourses.js @@ -27,13 +27,14 @@ class Courses { '[data-testid="lesson-card-menu-action-remove-0"]'; static #editButtonInDotMenu = '[data-testid="room-task-card-menu-edit-0"]'; static #editButtonInDotMenuOfTopic = '[data-testid="lesson-card-menu-action-edit-0"]'; - static #backToDraftButtonInDotMenuOfTopic = '[data-testid="lesson-card-menu-action-revert-0"]'; + static #backToDraftButtonInDotMenuOfTopic = + '[data-testid="lesson-card-menu-action-revert-0"]'; static #taskCardTitleInCoursePageWithIndex = '[data-testid="task-title-0"]'; - static #boardCardTitleInCoursePageWithIndex = '[data-testid="board-title-0"]'; + static #boardCardTitleInCoursePageWithIndex = '[data-testid="board-card-title-0"]'; static #taskCardThreeDotMenuInCoursePageWithIndex = '[data-testid="task-card-menu-0"]'; static #taskCardInCoursePageWithIndex = '[data-testid="room-task-card-0"]'; - static #topicCardPublishBtn = '[data-testid="lesson-card-action-publish-0"]' + static #topicCardPublishBtn = '[data-testid="lesson-card-action-publish-0"]'; static #dropDownCourse = '[data-testid="room-menu"]'; static #btnCourseEdit = '[data-testid="room-menu-edit-delete"]'; static #pageTitle = '[id="page-title"]'; @@ -103,12 +104,13 @@ class Courses { static #studentGroupNameOnStudentGroupPage = '[data-testid="group-name-entry"]'; static #editGroupButton = '[data-testid="edit-group"]'; static #deleteCourseGroupButton = '[data-testid="delete-course-group"]'; - static #deleteCourseGroupConfirmationButton = '[data-testid="delete-course-group-btn"]'; + static #deleteCourseGroupConfirmationButton = + '[data-testid="delete-course-group-btn"]'; static #videoConferenceCheckBoxCourse = '[data-testid="videoconf_checkbox"]'; static #toolsTabInCourseDetail = '[data-testid="tools-tab"]'; static #bbbToolIconInToolsTabCourse = '[data-testid="vc-card-logo"]'; static #bbbVideoStartDialogBoxCourse = - '[data-testid="videoconference-config-dialog-title"]'; + '[data-testid="video-conference-config-dialog"]'; static #bbbDialogBoxCancelButtonCourse = '[data-testid="dialog-cancel"]'; static #bbbDisabledCheckBoxCourse = '[data-testid="videoconf_checkbox"]'; static #addBBBButton = '[data-testid="submit-btn-add-bbb-tool-modal"]'; @@ -395,7 +397,7 @@ class Courses { clickOnAddNewToolFAB() { cy.get(Courses.#addToolButton) - .invoke('css', 'transform', 'translateY(5px)') // remove this invoke after the bug is fixed - Ticket: + .invoke("css", "transform", "translateY(5px)") // remove this invoke after the bug is fixed - Ticket: .click(); } @@ -462,12 +464,10 @@ class Courses { .should("be.visible"); } - seeBoardOnCoursePage(boardTitle) { + seeBoardOnCoursePage() { // no cy.wait('@rooms_api') here as the reload takes care of this cy.reload(); // Reload is necessary because after deletion of a content element a message window with its title stays hidden in the DOM - cy.get(Courses.#boardCardTitleInCoursePageWithIndex) - .contains(boardTitle) - .should("be.visible"); + cy.get(Courses.#boardCardTitleInCoursePageWithIndex).should("be.visible"); } contentIsNotVisibleOnCoursePage(contentTitle) { @@ -658,7 +658,8 @@ class Courses { deleteCoursesByName(courseLabel, courseName) { cy.get(`[class="rooms-container"]`).then(($coursesContainer) => { if ( - $coursesContainer.find(`[aria-label="${courseLabel} ${courseName}"]`).length + $coursesContainer.find(`[aria-label="${courseLabel} ${courseName}"]`) + .length ) { cy.get(`[aria-label="${courseLabel} ${courseName}"]`).then(($courses) => { if ($courses) { @@ -855,7 +856,9 @@ class Courses { } seeNumberOfTools(count) { - cy.get(Courses.#courseExternalToolSection).children().should("have.length", count); + cy.get(Courses.#courseExternalToolSection) + .children() + .should("have.length", count); } seeToolIsMarkedAsDeactivated(toolName) { @@ -1167,25 +1170,25 @@ class Courses { } launchTool(toolName, toolURL) { - const launchedTool = { toolName: toolName, isLaunched: false }; + const launchedTool = { toolName: toolName, isLaunched: false }; cy.window().then((win) => { - cy.stub(win, "open").as("openStub").callsFake((url) => { - expect(url).to.contain(toolURL); - launchedTool.isLaunched = true; - }); + cy.stub(win, "open") + .as("openStub") + .callsFake((url) => { + expect(url).to.contain(toolURL); + launchedTool.isLaunched = true; + }); }); cy.wrap(launchedTool).as("launchedTool"); - cy.get(Courses.#courseExternalToolSection) - .contains(toolName) - .click(); + cy.get(Courses.#courseExternalToolSection).contains(toolName).click(); - cy.get("@openStub").invoke("restore") + cy.get("@openStub").invoke("restore"); } - toolWasLaunched(toolName){ + toolWasLaunched(toolName) { cy.get("@launchedTool").then((launchedTool) => { expect(launchedTool.toolName).to.equal(toolName); expect(launchedTool.isLaunched).to.be.true; diff --git a/cypress/support/pages/course_board/pageBoard.js b/cypress/support/pages/course_board/pageBoard.js index 9939541b..0054061d 100644 --- a/cypress/support/pages/course_board/pageBoard.js +++ b/cypress/support/pages/course_board/pageBoard.js @@ -9,11 +9,11 @@ class Board { static #addColumnTitleInput = '[data-testid="column-title-0"]'; static #addNewCardButtonInColumn = '[data-testid="column-0-add-card-btn"]'; static #mainPageArea = '[id="main-content"]'; - static #editOptionThreeDot = '[data-testid="board-menu-action-edit"]'; + static #editOptionThreeDot = '[data-testid="kebab-menu-action-rename"]'; static #threeDotMenuInColumn = '[data-testid="column-menu-btn-0"]'; static #threeDotMenuInCard = '[data-testid="card-menu-btn-0-0"]'; static #threeDotMenuOnDeletedElement = '[data-testid="deleted-element-menu-btn"]'; - static #deleteOptionThreeDot = '[data-testid="board-menu-action-delete"]'; + static #deleteOptionThreeDot = '[data-testid="kebab-menu-action-delete"]'; static #confirmButtonInModal = '[data-testid="dialog-confirm"]'; static #deleteDialogBox = '[data-testid="dialog-title"]'; static #drawingElement = '[data-testid="drawing-element"]'; @@ -22,7 +22,7 @@ class Board { static #newColumnBoardFABInCourseDetail = '[data-testid="fab_button_add_board"]'; static #threeDotInCourseBoardTitle = '[data-testid="board-menu-icon"]'; static #editOptionInThreeDotCourseBoardTitle = - '[data-testid="board-menu-action-edit"]'; + '[data-testid="kebab-menu-action-rename"]'; static #draftChipInCourseBoardName = '[data-testid="board-draft-chip"]'; static #addCardInColumnButton = '[data-testid="column-0-add-card-btn"]'; static #addContentIntoCardButton = '[data-testid="add-element-btn"]'; @@ -31,7 +31,7 @@ class Board { '[data-testid="create-element-external-tool-container"]'; static #externalToolElement = '[data-testid="board-external-tool-element"]'; static #deletedElement = '[data-testid="board-deleted-element"]'; - static #boardMenuActionPublish = '[data-testid="board-menu-action-publish"]'; + static #boardMenuActionPublish = '[data-testid="kebab-menu-action-publish"]'; static #boardLayoutDialogBoxTitle = '[data-testid="board-layout-dialog-title"]'; static #multiColumnBoardOptionInDialogBox = '[data-testid="dialog-add-multi-column-board"]'; diff --git a/cypress/support/pages/mediashelf/pageMediaShelf.js b/cypress/support/pages/mediashelf/pageMediaShelf.js index 5df75696..cab78b5d 100644 --- a/cypress/support/pages/mediashelf/pageMediaShelf.js +++ b/cypress/support/pages/mediashelf/pageMediaShelf.js @@ -29,7 +29,7 @@ class MediaShelf { static #mediaElementNoLongerAvailableChip = '[data-testid="warning-chip-no-longer-available"]'; static #threeDotMenuOnMediaElement = '[data-testid="board-menu-icon"]'; - static #deleteMediaElementButton = '[data-testid="board-menu-action-delete"]'; + static #deleteMediaElementButton = '[data-testid="kebab-menu-action-delete"]'; static #createLineButton = '[data-testid="create-line-button"]'; static #emptyStateSign = '[data-testid="empty-state"]'; static #emptyStateInfoText = '[data-testid="emptyTaskMessage"]'; diff --git a/cypress/support/pages/room/pageRooms.js b/cypress/support/pages/room/pageRooms.js index c5ea82b2..797c5bcf 100644 --- a/cypress/support/pages/room/pageRooms.js +++ b/cypress/support/pages/room/pageRooms.js @@ -8,7 +8,7 @@ class Rooms { // static #goToRoomOverviewButton = '[data-testid="Rooms"]'; static #roomDetailFAB = '[data-testid="room-menu"]'; static #roomDetailFABEdit = '[data-testid="room-action-edit"]'; - static #roomDetailFABParticipants = '[data-testid="room-action-manage-participants"]'; + 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"]'; @@ -28,8 +28,6 @@ class Rooms { static #inputSatrtdateForRoom = '[data-testid="room-start-date-input"]'; static #inputEndtdateForRoom = '[data-testid="room-end-date-input"]'; - - selectEndDateForRoom() { const currentDate = new Date(); //set the date which is two days later than the current day @@ -94,7 +92,7 @@ class Rooms { } seeRoomEditParticipantsPage() { - cy.get(Rooms.#roomTitle).contains("Raum-Teilnehmende"); + cy.get(Rooms.#roomTitle).should("be.visible"); } navigateToRoom(roomName) { @@ -181,7 +179,5 @@ class Rooms { clickOnFabButtonToAddBoard() { cy.get(Rooms.#fabButtonAddBoard).click(); } - - } export default Rooms; diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 2c14dd3d..6ae3fe73 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -3,11 +3,11 @@ class RoomBoards { static #btnDialogCancel = '[data-testid="dialog-cancel"]'; static #btnDialogConfirm = '[data-testid="dialog-confirm"]'; - static #boardMenuActionDelete = '[data-testid="board-menu-action-delete"]'; + static #boardMenuActionDelete = '[data-testid="kebab-menu-action-delete"]'; static #mainPageArea = '[id="main-content"]'; static #roomBoardTitleOnPage = '[data-testid="board-title"]'; static #boardMenuIcon = '[data-testid="board-menu-icon"]'; - static #btnBoardMenuActionEdit = '[data-testid="board-menu-action-edit"]'; + static #btnBoardMenuActionEdit = '[data-testid="kebab-menu-action-rename"]'; static #dialogAddMultiColumnBoard = '[data-testid="dialog-add-multi-column-board"]'; static #dialogAddSingleColumnBoard = '[data-testid="dialog-add-single-column-board"]'; static #boardLayoutDialogTitle = '[data-testid="board-layout-dialog-title"]'; @@ -44,7 +44,9 @@ class RoomBoards { }); } seeGivenRoomBoardTitle(boardTitle) { - cy.get(RoomBoards.#roomBoardTitleOnPage).find('input').should('have.value', boardTitle); + cy.get(RoomBoards.#roomBoardTitleOnPage) + .find("input") + .should("have.value", boardTitle); } clickOutsideTheTitleToSaveTheModifiedTitle() { cy.get(RoomBoards.#mainPageArea).click("bottom"); @@ -78,4 +80,4 @@ class RoomBoards { } } -export default RoomBoards; \ No newline at end of file +export default RoomBoards; diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index da0f7b4f..1d265ec1 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -1,4 +1,4 @@ -import { Given, Then, When } from "@badeball/cypress-cucumber-preprocessor"; +import { Given } from "@badeball/cypress-cucumber-preprocessor"; import Board from "../../pages/course_board/pageBoard"; import Courses from "../../pages/course/pageCourses"; import RoomBoards from "../../pages/room_board/pageRoomBoards"; diff --git a/cypress/support/step_definition/course/commonCourseSteps.spec.js b/cypress/support/step_definition/course/commonCourseSteps.spec.js index a7587878..94e73ec8 100644 --- a/cypress/support/step_definition/course/commonCourseSteps.spec.js +++ b/cypress/support/step_definition/course/commonCourseSteps.spec.js @@ -89,8 +89,8 @@ When("I can see task {string} on course page", (taskTitle) => { courses.seeTaskOnCoursePage(taskTitle); }); -When("I can see board {string} on course page", (contentTitle) => { - courses.seeBoardOnCoursePage(contentTitle); +When("I can see board on course page", () => { + courses.seeBoardOnCoursePage(); }); When("I can not see content {string}", (contentTitle) => { diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index 582ee490..d994df47 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -31,7 +31,7 @@ When("I click on edit in board menu", () => { roomBoards.clickOnEditInBoardMenu(); }); -Then("I change the room board title to {string}", (boardTitle) => { +Then("I change the default room board title to {string}", (boardTitle) => { roomBoards.enterRoomBoardTitle(boardTitle); }); @@ -62,4 +62,3 @@ When("I click on the button to confirm the deletion", () => { Then("I do not see the board {string} in the room", (boardTitle) => { roomBoards.doNotSeeBoardOnRoomDetailPage(boardTitle); }); - From eaa4fde1cb2ebff70c65dd1f94f164ab8bb038e2 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Mon, 20 Jan 2025 17:33:54 +0100 Subject: [PATCH 03/15] test updated --- .../copyColumnAndListBoardInRoom.feature | 55 +++++++++++++------ .../pages/room_board/pageRoomBoards.js | 32 ++++++++++- .../prePostConditionSteps.spec.js | 37 ++++++------- .../room_boards/roomBoardSteps.spec.js | 24 ++++++++ 4 files changed, 111 insertions(+), 37 deletions(-) diff --git a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature index 82565700..68b90dcf 100644 --- a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature +++ b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature @@ -1,23 +1,43 @@ -#@regression_test -#@stable_test -Feature: Room - Add, remove BBB tool in the room board +@regression_test +@stable_test +Feature: Room - Add and Remove BBB Tool in Room Boards - As a teacher I want to add and remove BBB tool in the room board so that I can manage video confernce. + As a teacher, I want to add and remove the BBB tool in the room board so that I can manage video conferences in the room. - Scenario: Teacher add and remove BBB tool in the room board, including pre-conditions + Scenario: Add and Remove BBB Tool from Room Board Given I am logged in as a '' at '' - Given a room with name '' exist - Given a multicolumn board with the name '' exists in the room - Given a list board with the name '' exists in the room - - # teacher copies multi column board - - # teacher copies list board - - # post-condition: teacher deletes room - Given room with name '' is deleted - - + Given a room named '' exists + Given a multicolumn board named '' exists in the room + #Given a list board named '' exists in the room + + # Teacher copies the multicolumn board + When I click on the multicolumn board in the room detail page + Then I see the page board details + Then I see the chip Draft + When I click on the three dot menu in room board + When I click on the menu Publish + Then I do not see the chip Draft + When I click on the three dot menu in room board + When I click on the option Copy + Then I see the chip Draft + When I click on the breadcrumb to navigate to the room detail page + Then I see the detail page of room '' + + # Teacher copies the list board + When I click on the single-column board in the room detail page + Then I see the page board details + Then I see the chip Draft + When I click on the three dot menu in room board + When I click on the menu Publish + Then I do not see the chip Draft + When I click on the three dot menu in room board + When I click on the option Copy + Then I see the chip Draft + When I click on the breadcrumb to navigate to the room detail page + Then I see the detail page of room '' + + # Post-condition: Delete the room + Given the room named '' is deleted @school_api_test Examples: @@ -28,3 +48,4 @@ Feature: Room - Add, remove BBB tool in the room board Examples: | teacher | namespace | room_name | edited_board_title | | teacher1_brb | brb | Cypress Room Name | Board Cy Title | + diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 6ae3fe73..c97bdd31 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -11,6 +11,36 @@ class RoomBoards { static #dialogAddMultiColumnBoard = '[data-testid="dialog-add-multi-column-board"]'; static #dialogAddSingleColumnBoard = '[data-testid="dialog-add-single-column-board"]'; static #boardLayoutDialogTitle = '[data-testid="board-layout-dialog-title"]'; + static #breadCrumbToRoomNavigationFromBoard = '[data-testid="breadcrumb-1"]'; + + static #multicolumnBoardSelector = '[data-testid="board-tile-subtitle-0"]'; + static #copyOptionSelector = '[data-testid="kebab-menu-action-copy"]'; + static #chipDraftSelector = '[data-testid="board-draft-chip"]'; + static #publishMenuSelector = '[data-testid="kebab-menu-action-publish"]'; + + clickMenuPublish() { + cy.get(RoomBoards.#publishMenuSelector).click(); + } + + verifyDraftChipNotVisible() { + cy.get(RoomBoards.#chipDraftSelector).should("not.be.visible"); + } + + clickMulticolumnBoardInRoomDetailPage() { + cy.get(RoomBoards.#multicolumnBoardSelector).click(); + } + + clickOptionCopy() { + cy.get(RoomBoards.#copyOptionSelector).click(); + } + + verifyChipDraftVisible() { + cy.get(RoomBoards.#chipDraftSelector).should("be.visible"); + } + + clickOnBreadcrumbToNavigateToRoomDetail() { + cy.get(RoomBoards.#breadCrumbToRoomNavigationFromBoard).click(); + } clearAndType(selector, newTitle) { cy.get(selector) @@ -49,7 +79,7 @@ class RoomBoards { .should("have.value", boardTitle); } clickOutsideTheTitleToSaveTheModifiedTitle() { - cy.get(RoomBoards.#mainPageArea).click("bottom"); + cy.get(RoomBoards.#mainPageArea).click("bottom").wait(500); } clickOnDeleteInBoardMenu() { cy.get(RoomBoards.#boardMenuActionDelete).click(); diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 1d265ec1..20cd6384 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -17,7 +17,7 @@ Given("room with name {string} is deleted", (room_name) => { rooms.roomIsNotVisibleOnOverviewPage(room_name); }); -Given("a room with name {string} exist", (room_name) => { +Given("a room named {string} exists", (room_name) => { rooms.navigateToRoomsOverview(); rooms.clickOnCreateRoomFAB(); rooms.showRoomCreationPage(); @@ -26,27 +26,25 @@ Given("a room with name {string} exist", (room_name) => { rooms.selectTodayStartDateForRoom(); rooms.selectEndDateForRoom(); rooms.submitRoom(); - rooms.seeRoomDetailPage(newRoomName); + rooms.seeRoomDetailPage(room_name); }); -Given( - "a multicolumn board with the name {string} exists in the room", - (edited_board_title) => { - rooms.clickOnAddContentButton(); - rooms.seeFabButtonToAddBoard(); - rooms.clickOnFabButtonToAddBoard(); - roomBoards.seeColumnBoardDialogBox(); - roomBoards.clickOnButtonToAddMultiColumnBoard(); - roomBoards.seeNewRoomBoardCreatePage(); - roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); - roomBoards.clickOnEditInBoardMenu(); - roomBoards.enterRoomBoardTitle(edited_board_title); - roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); - roomBoards.seeGivenRoomBoardTitle(edited_board_title); - } -); +Given("a multicolumn board named {string} exists in the room", (edited_board_title) => { + rooms.clickOnAddContentButton(); + rooms.seeFabButtonToAddBoard(); + rooms.clickOnFabButtonToAddBoard(); + roomBoards.seeColumnBoardDialogBox(); + roomBoards.clickOnButtonToAddMultiColumnBoard(); + roomBoards.seeNewRoomBoardCreatePage(); + roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); + roomBoards.clickOnEditInBoardMenu(); + roomBoards.enterRoomBoardTitle(edited_board_title); + roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); + roomBoards.seeGivenRoomBoardTitle(edited_board_title); + roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); +}); -Given("a list board with the name {string} exists in the room", (edited_board_title) => { +Given("a list board named {string} exists in the room", (edited_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); @@ -58,6 +56,7 @@ Given("a list board with the name {string} exists in the room", (edited_board_ti roomBoards.enterRoomBoardTitle(edited_board_title); roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); roomBoards.seeGivenRoomBoardTitle(edited_board_title); + roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); Given( diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index d994df47..9a95e481 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -3,6 +3,30 @@ import RoomBoards from "../../pages/room_board/pageRoomBoards"; const roomBoards = new RoomBoards(); +When("I click on the multicolumn board in the room detail page", () => { + roomBoards.clickMulticolumnBoardInRoomDetailPage(); +}); + +When("I click on the option Copy", () => { + roomBoards.clickOptionCopy(); +}); + +When("I click on the menu Publish", () => { + roomBoards.clickMenuPublish(); // Method to click on the Publish menu +}); + +Then("I do not see the chip Draft", () => { + roomBoards.verifyDraftChipNotVisible(); // Method to verify the Draft chip is not visible +}); + +Then("I see the chip Draft", () => { + roomBoards.verifyChipDraftVisible(); +}); + +When("I click on the breadcrumb to navigate to the room detail page", () => { + roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); +}); + Then("I see the dialog box to select the Board type", () => { roomBoards.seeColumnBoardDialogBox(); }); From 6a7d297c119fe5f025da291cfb356a15f118a419 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 08:48:43 +0100 Subject: [PATCH 04/15] added test copy board --- .../e2e/room_board/copyColumnAndListBoardInRoom.feature | 4 ++-- cypress/support/pages/room_board/pageRoomBoards.js | 7 ++++++- .../common_helper/prePostConditionSteps.spec.js | 2 +- .../step_definition/room_boards/roomBoardSteps.spec.js | 4 ++++ 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature index 68b90dcf..093eccf2 100644 --- a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature +++ b/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature @@ -8,7 +8,7 @@ Feature: Room - Add and Remove BBB Tool in Room Boards Given I am logged in as a '' at '' Given a room named '' exists Given a multicolumn board named '' exists in the room - #Given a list board named '' exists in the room + Given a list board named '' exists in the room # Teacher copies the multicolumn board When I click on the multicolumn board in the room detail page @@ -42,7 +42,7 @@ Feature: Room - Add and Remove BBB Tool in Room Boards @school_api_test Examples: | teacher | namespace | room_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Board Cy Title | + | teacher1_nbc | nbc | Cypress Room Name | Board Cy Title | @staging_test Examples: diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index c97bdd31..51612ef3 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -17,13 +17,18 @@ class RoomBoards { static #copyOptionSelector = '[data-testid="kebab-menu-action-copy"]'; static #chipDraftSelector = '[data-testid="board-draft-chip"]'; static #publishMenuSelector = '[data-testid="kebab-menu-action-publish"]'; + static #singleColumnBoardSelector = '[data-testid="board-tile-title-1"]'; + + clickSingleColumnBoardInRoomDetailPage() { + cy.get(RoomBoards.#singleColumnBoardSelector).click(); + } clickMenuPublish() { cy.get(RoomBoards.#publishMenuSelector).click(); } verifyDraftChipNotVisible() { - cy.get(RoomBoards.#chipDraftSelector).should("not.be.visible"); + cy.get(RoomBoards.#chipDraftSelector).should("not.exist"); } clickMulticolumnBoardInRoomDetailPage() { diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 20cd6384..021ee7d8 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -9,7 +9,7 @@ const rooms = new Rooms(); const courses = new Courses(); const board = new Board(); -Given("room with name {string} is deleted", (room_name) => { +Given("the room named {string} is deleted", (room_name) => { rooms.openThreeDotMenuForRoom(); rooms.openDeleteInThreeDotMenuForRoom(); rooms.seeConfirmationModalForRoomDeletion(); diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index 9a95e481..71f3582d 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -3,6 +3,10 @@ import RoomBoards from "../../pages/room_board/pageRoomBoards"; const roomBoards = new RoomBoards(); +When("I click on the single-column board in the room detail page", () => { + roomBoards.clickSingleColumnBoardInRoomDetailPage(); +}); + When("I click on the multicolumn board in the room detail page", () => { roomBoards.clickMulticolumnBoardInRoomDetailPage(); }); From 6d51ca9b8ab965acf9cd470dd0a9f829831f4e07 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 11:26:29 +0100 Subject: [PATCH 05/15] updated tests --- .../e2e/login_management/cloudLogin.feature | 3 +++ ...copyMultiSingleColumnBoardsInRoom.feature} | 23 +++++++++++-------- .../pages/room_board/pageRoomBoards.js | 11 ++++++++- .../prePostConditionSteps.spec.js | 4 ++-- .../room_boards/roomBoardSteps.spec.js | 10 +++++++- 5 files changed, 37 insertions(+), 14 deletions(-) rename cypress/e2e/room_board/{copyColumnAndListBoardInRoom.feature => copyMultiSingleColumnBoardsInRoom.feature} (62%) diff --git a/cypress/e2e/login_management/cloudLogin.feature b/cypress/e2e/login_management/cloudLogin.feature index 9e213cc8..c8680600 100644 --- a/cypress/e2e/login_management/cloudLogin.feature +++ b/cypress/e2e/login_management/cloudLogin.feature @@ -7,8 +7,11 @@ Feature: Login Management - Login of users managed by SVS Scenario Outline: User makes a direct login with username and password Given I am logged in as a '' at '' + Then I log out Given I am logged in as a '' at '' + Then I log out Given I am logged in as a '' at '' + Then I log out @staging_test Examples: diff --git a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature similarity index 62% rename from cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature rename to cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 093eccf2..6013a0b0 100644 --- a/cypress/e2e/room_board/copyColumnAndListBoardInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -1,17 +1,17 @@ @regression_test @stable_test -Feature: Room - Add and Remove BBB Tool in Room Boards +Feature: Room - Copy multi-column and single-column boards in the room - As a teacher, I want to add and remove the BBB tool in the room board so that I can manage video conferences in the room. + As a teacher, I want to copy both multi-column and single-column boards in the room so that I can effectively manage its contents. - Scenario: Add and Remove BBB Tool from Room Board + Scenario: Copy multi-column and single-column board in the room, including pre & post conditions Given I am logged in as a '' at '' Given a room named '' exists - Given a multicolumn board named '' exists in the room - Given a list board named '' exists in the room + Given a multi-column board named '' exists in the room + Given a sinlge-column board named '' exists in the room - # Teacher copies the multicolumn board - When I click on the multicolumn board in the room detail page + # Teacher copies the multi column board + When I click on the multi-column board in the room detail page Then I see the page board details Then I see the chip Draft When I click on the three dot menu in room board @@ -22,8 +22,9 @@ Feature: Room - Add and Remove BBB Tool in Room Boards Then I see the chip Draft When I click on the breadcrumb to navigate to the room detail page Then I see the detail page of room '' + Then I see multi-column copied board v-card on the room detail page - # Teacher copies the list board + # Teacher copies the single board When I click on the single-column board in the room detail page Then I see the page board details Then I see the chip Draft @@ -35,6 +36,8 @@ Feature: Room - Add and Remove BBB Tool in Room Boards Then I see the chip Draft When I click on the breadcrumb to navigate to the room detail page Then I see the detail page of room '' + Then I see single-column copied board v-card on the room detail page + # Post-condition: Delete the room Given the room named '' is deleted @@ -42,10 +45,10 @@ Feature: Room - Add and Remove BBB Tool in Room Boards @school_api_test Examples: | teacher | namespace | room_name | edited_board_title | - | teacher1_nbc | nbc | Cypress Room Name | Board Cy Title | + | teacher1_dbc | dbc | Cypress Room Name | Board Cy Title | @staging_test Examples: | teacher | namespace | room_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Board Cy Title | + | teacher1_dbc | dbc | Cypress Room Name | Board Cy Title | diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 51612ef3..07489c5e 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -12,12 +12,21 @@ class RoomBoards { static #dialogAddSingleColumnBoard = '[data-testid="dialog-add-single-column-board"]'; static #boardLayoutDialogTitle = '[data-testid="board-layout-dialog-title"]'; static #breadCrumbToRoomNavigationFromBoard = '[data-testid="breadcrumb-1"]'; - static #multicolumnBoardSelector = '[data-testid="board-tile-subtitle-0"]'; static #copyOptionSelector = '[data-testid="kebab-menu-action-copy"]'; static #chipDraftSelector = '[data-testid="board-draft-chip"]'; static #publishMenuSelector = '[data-testid="kebab-menu-action-publish"]'; static #singleColumnBoardSelector = '[data-testid="board-tile-title-1"]'; + static #multiColumnCopiedBoardSelector = '[data-testid="board-tile-title-2"]'; + static #singleColumnCopiedBoardSelector = '[data-testid="board-tile-title-3"]'; + + verifyMultiColumnCopiedBoardVCardVisibleOnRoomDetailPage() { + cy.get(RoomBoards.#multiColumnCopiedBoardSelector).should("be.visible"); + } + + verifyListColumnCopiedBoardVCardVisibleOnRoomDetailPage() { + cy.get(RoomBoards.#singleColumnCopiedBoardSelector).should("be.visible"); + } clickSingleColumnBoardInRoomDetailPage() { cy.get(RoomBoards.#singleColumnBoardSelector).click(); diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 021ee7d8..4e907cb3 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -29,7 +29,7 @@ Given("a room named {string} exists", (room_name) => { rooms.seeRoomDetailPage(room_name); }); -Given("a multicolumn board named {string} exists in the room", (edited_board_title) => { +Given("a multi-column board named {string} exists in the room", (edited_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); @@ -44,7 +44,7 @@ Given("a multicolumn board named {string} exists in the room", (edited_board_tit roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); -Given("a list board named {string} exists in the room", (edited_board_title) => { +Given("a sinlge-column board named {string} exists in the room", (edited_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index 71f3582d..8c8a5f5a 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -3,11 +3,19 @@ import RoomBoards from "../../pages/room_board/pageRoomBoards"; const roomBoards = new RoomBoards(); +Then("I see multi-column copied board v-card on the room detail page", () => { + roomBoards.verifyMultiColumnCopiedBoardVCardVisibleOnRoomDetailPage(); +}); + +Then("I see single-column copied board v-card on the room detail page", () => { + roomBoards.verifyListColumnCopiedBoardVCardVisibleOnRoomDetailPage(); +}); + When("I click on the single-column board in the room detail page", () => { roomBoards.clickSingleColumnBoardInRoomDetailPage(); }); -When("I click on the multicolumn board in the room detail page", () => { +When("I click on the multi-column board in the room detail page", () => { roomBoards.clickMulticolumnBoardInRoomDetailPage(); }); From f23335292936de7f16a70372f0ec0307ff8cdfa0 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 11:27:43 +0100 Subject: [PATCH 06/15] updated tess --- .../e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 6013a0b0..2e52f406 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -10,7 +10,7 @@ Feature: Room - Copy multi-column and single-column boards in the room Given a multi-column board named '' exists in the room Given a sinlge-column board named '' exists in the room - # Teacher copies the multi column board + # Teacher copies the multi-column board When I click on the multi-column board in the room detail page Then I see the page board details Then I see the chip Draft @@ -24,7 +24,7 @@ Feature: Room - Copy multi-column and single-column boards in the room Then I see the detail page of room '' Then I see multi-column copied board v-card on the room detail page - # Teacher copies the single board + # Teacher copies the single-column board When I click on the single-column board in the room detail page Then I see the page board details Then I see the chip Draft From 93bedccb04a0beee68b5c5b02cd1f4ff52835071 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 13:33:18 +0100 Subject: [PATCH 07/15] updated tests --- .../admin/forcePasswordChangeTeacher.feature | 2 +- .../copyMultiSingleColumnBoardsInRoom.feature | 12 +++++------ ...eteMultiAndSingleColumnBoardInRoom.feature | 20 +++++++++---------- .../pages/room_board/pageRoomBoards.js | 4 +++- .../prePostConditionSteps.spec.js | 12 +++++------ 5 files changed, 26 insertions(+), 24 deletions(-) diff --git a/cypress/e2e/admin/forcePasswordChangeTeacher.feature b/cypress/e2e/admin/forcePasswordChangeTeacher.feature index c3893eb0..716e6664 100644 --- a/cypress/e2e/admin/forcePasswordChangeTeacher.feature +++ b/cypress/e2e/admin/forcePasswordChangeTeacher.feature @@ -77,7 +77,7 @@ Feature: Admin - user must set a new password during login Given I am logged in as a '' at '' When I click on administration in menu When I go to '' administration - When I enter '' email '' in search input field + When I enter '' email '' in search input field When I click edit '' button for '' When I click delete user button to delete user with lastname '' When I click on delete button in pop up diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 2e52f406..261d4497 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -7,8 +7,8 @@ Feature: Room - Copy multi-column and single-column boards in the room Scenario: Copy multi-column and single-column board in the room, including pre & post conditions Given I am logged in as a '' at '' Given a room named '' exists - Given a multi-column board named '' exists in the room - Given a sinlge-column board named '' exists in the room + Given a multi-column board named '' exists in the room + Given a sinlge-column board named '' exists in the room # Teacher copies the multi-column board When I click on the multi-column board in the room detail page @@ -44,11 +44,11 @@ Feature: Room - Copy multi-column and single-column boards in the room @school_api_test Examples: - | teacher | namespace | room_name | edited_board_title | - | teacher1_dbc | dbc | Cypress Room Name | Board Cy Title | + | teacher | namespace | room_name | new_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | @staging_test Examples: - | teacher | namespace | room_name | edited_board_title | - | teacher1_dbc | dbc | Cypress Room Name | Board Cy Title | + | teacher | namespace | room_name | new_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | diff --git a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature index 8728fca8..65a22e00 100644 --- a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature +++ b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature @@ -29,9 +29,9 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new multi column board When I click on the three dot menu in room board When I click on edit in board menu - Then I change the default room board title to '' + Then I change the default room board title to '' When I click on the page outside of the title of the board - Then I see my room board is named '' + Then I see my room board is named '' # cancel delete-process of the new multi column board When I click on the three dot menu in room board @@ -39,14 +39,14 @@ Feature: Room - Add, edit and delete board in room Then I see the button to cancel the dialog When I click on the button to cancel the deletion Then I see the page board details - Then I see the board '' on the room overview page + Then I see the board '' on the room overview page # confirm delete-process of the new multi column board When I click on the three dot menu in room board When I click on delete in board menu Then I see the button to confirm the dialog Then I click on the button to confirm the deletion - Then I do not see the board '' in the room + Then I do not see the board '' in the room # teacher creates a new single column board in the room Given I am logged in as a '' at '' @@ -62,9 +62,9 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new single column board When I click on the three dot menu in room board When I click on edit in board menu - Then I change the default room board title to '' + Then I change the default room board title to '' When I click on the page outside of the title of the board - Then I see my room board is named '' + Then I see my room board is named '' # confirm delete-process of single column board When I click on the three dot menu in room board @@ -83,10 +83,10 @@ Feature: Room - Add, edit and delete board in room @school_api_test Examples: - | teacher | namespace | room_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Board Cy Title | + | teacher | namespace | room_name | new_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | @staging_test Examples: - | teacher | namespace | room_name | edited_board_title | - | teacher1_brb | brb | Cypress Room Name | Board Cy Title | + | teacher | namespace | room_name | new_board_title | + | teacher1_brb | brb | Cypress Room Name | Board Cy Title | diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 07489c5e..a962880b 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -84,9 +84,11 @@ class RoomBoards { } enterRoomBoardTitle(boardTitle) { cy.get(RoomBoards.#roomBoardTitleOnPage).within(() => { - this.clearAndType("input", boardTitle); + this.clearAndType("input", boardTitle); // Clear and type the new title + cy.get("input").type("{esc}"); // Press Esc after typing, it works this way to save the title in a stable way. }); } + seeGivenRoomBoardTitle(boardTitle) { cy.get(RoomBoards.#roomBoardTitleOnPage) .find("input") diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index 4e907cb3..d699d708 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -29,7 +29,7 @@ Given("a room named {string} exists", (room_name) => { rooms.seeRoomDetailPage(room_name); }); -Given("a multi-column board named {string} exists in the room", (edited_board_title) => { +Given("a multi-column board named {string} exists in the room", (new_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); @@ -38,13 +38,13 @@ Given("a multi-column board named {string} exists in the room", (edited_board_ti roomBoards.seeNewRoomBoardCreatePage(); roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); roomBoards.clickOnEditInBoardMenu(); - roomBoards.enterRoomBoardTitle(edited_board_title); + roomBoards.enterRoomBoardTitle(new_board_title); roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); - roomBoards.seeGivenRoomBoardTitle(edited_board_title); + roomBoards.seeGivenRoomBoardTitle(new_board_title); roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); -Given("a sinlge-column board named {string} exists in the room", (edited_board_title) => { +Given("a sinlge-column board named {string} exists in the room", (new_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); @@ -53,9 +53,9 @@ Given("a sinlge-column board named {string} exists in the room", (edited_board_t roomBoards.seeNewRoomBoardCreatePage(); roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); roomBoards.clickOnEditInBoardMenu(); - roomBoards.enterRoomBoardTitle(edited_board_title); + roomBoards.enterRoomBoardTitle(new_board_title); roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); - roomBoards.seeGivenRoomBoardTitle(edited_board_title); + roomBoards.seeGivenRoomBoardTitle(new_board_title); roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); From df4d3cadf8f9c3c33b6a7abea49931b369d1df26 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 13:38:39 +0100 Subject: [PATCH 08/15] updated test --- .../room_board/copyMultiSingleColumnBoardsInRoom.feature | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 261d4497..936b4942 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -5,12 +5,14 @@ Feature: Room - Copy multi-column and single-column boards in the room As a teacher, I want to copy both multi-column and single-column boards in the room so that I can effectively manage its contents. Scenario: Copy multi-column and single-column board in the room, including pre & post conditions + + # pre-condition: room and boards are existing Given I am logged in as a '' at '' Given a room named '' exists Given a multi-column board named '' exists in the room Given a sinlge-column board named '' exists in the room - # Teacher copies the multi-column board + # teacher copies the multi-column board When I click on the multi-column board in the room detail page Then I see the page board details Then I see the chip Draft @@ -24,7 +26,7 @@ Feature: Room - Copy multi-column and single-column boards in the room Then I see the detail page of room '' Then I see multi-column copied board v-card on the room detail page - # Teacher copies the single-column board + # teacher copies the single-column board When I click on the single-column board in the room detail page Then I see the page board details Then I see the chip Draft @@ -39,7 +41,7 @@ Feature: Room - Copy multi-column and single-column boards in the room Then I see single-column copied board v-card on the room detail page - # Post-condition: Delete the room + # post-condition: Delete the room Given the room named '' is deleted @school_api_test From a6a8e1bc630cb5a06ef923da5620174a7242dee1 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 13:39:10 +0100 Subject: [PATCH 09/15] update spaces --- cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature | 1 - 1 file changed, 1 deletion(-) diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 936b4942..a4f91922 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -40,7 +40,6 @@ Feature: Room - Copy multi-column and single-column boards in the room Then I see the detail page of room '' Then I see single-column copied board v-card on the room detail page - # post-condition: Delete the room Given the room named '' is deleted From 2028707c44c4589fca505903b556013ed4c08a5a Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 13:56:02 +0100 Subject: [PATCH 10/15] text update --- .../e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index a4f91922..5587c494 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -40,7 +40,7 @@ Feature: Room - Copy multi-column and single-column boards in the room Then I see the detail page of room '' Then I see single-column copied board v-card on the room detail page - # post-condition: Delete the room + # post-condition: delete the room Given the room named '' is deleted @school_api_test From 6408c525c504f358ea89b9d83f00d57965f05f21 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Tue, 21 Jan 2025 15:45:35 +0100 Subject: [PATCH 11/15] updated tests --- .../createEditDeleteMultiAndSingleColumnBoardInRoom.feature | 4 ++-- cypress/support/pages/course_board/pageBoard.js | 4 ++-- cypress/support/pages/room_board/pageRoomBoards.js | 4 ++-- .../step_definition/room_boards/roomBoardSteps.spec.js | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature index 65a22e00..e6840045 100644 --- a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature +++ b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature @@ -28,7 +28,7 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new multi column board When I click on the three dot menu in room board - When I click on edit in board menu + When I click on the option Rename in board three dot menu Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' @@ -61,7 +61,7 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new single column board When I click on the three dot menu in room board - When I click on edit in board menu + When I click on the option Rename in board three dot menu Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' diff --git a/cypress/support/pages/course_board/pageBoard.js b/cypress/support/pages/course_board/pageBoard.js index 0054061d..10d3c35c 100644 --- a/cypress/support/pages/course_board/pageBoard.js +++ b/cypress/support/pages/course_board/pageBoard.js @@ -21,7 +21,7 @@ class Board { static #columnPlaceholder = '[placeholder="Spalte 1"]'; static #newColumnBoardFABInCourseDetail = '[data-testid="fab_button_add_board"]'; static #threeDotInCourseBoardTitle = '[data-testid="board-menu-icon"]'; - static #editOptionInThreeDotCourseBoardTitle = + static #renameOptionInThreeDotCourseBoardTitle = '[data-testid="kebab-menu-action-rename"]'; static #draftChipInCourseBoardName = '[data-testid="board-draft-chip"]'; static #addCardInColumnButton = '[data-testid="column-0-add-card-btn"]'; @@ -88,7 +88,7 @@ class Board { } clickOnEditInThreeDotCourseBoardTitle() { - cy.get(Board.#editOptionInThreeDotCourseBoardTitle).click(); + cy.get(Board.#renameOptionInThreeDotCourseBoardTitle).click(); } clearAndType(selector, newTitle) { diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index a962880b..16affe02 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -7,7 +7,7 @@ class RoomBoards { static #mainPageArea = '[id="main-content"]'; static #roomBoardTitleOnPage = '[data-testid="board-title"]'; static #boardMenuIcon = '[data-testid="board-menu-icon"]'; - static #btnBoardMenuActionEdit = '[data-testid="kebab-menu-action-rename"]'; + static #btnBoardMenuActionRename = '[data-testid="kebab-menu-action-rename"]'; static #dialogAddMultiColumnBoard = '[data-testid="dialog-add-multi-column-board"]'; static #dialogAddSingleColumnBoard = '[data-testid="dialog-add-single-column-board"]'; static #boardLayoutDialogTitle = '[data-testid="board-layout-dialog-title"]'; @@ -122,7 +122,7 @@ class RoomBoards { cy.get(RoomBoards.#boardMenuIcon).click(); } clickOnEditInBoardMenu() { - cy.get(RoomBoards.#btnBoardMenuActionEdit).click(); + cy.get(RoomBoards.#btnBoardMenuActionRename).click(); } } diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index 8c8a5f5a..5430f634 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -63,7 +63,7 @@ When("I click on the three dot menu in room board", () => { roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); }); -When("I click on edit in board menu", () => { +When("I click on the option Rename in board three dot menu", () => { roomBoards.clickOnEditInBoardMenu(); }); From fe6787908bf466b910d2917bba56a462104e618c Mon Sep 17 00:00:00 2001 From: atlldwp Date: Thu, 23 Jan 2025 18:07:44 +0100 Subject: [PATCH 12/15] updated copy board tests --- .../copyMultiSingleColumnBoardsInRoom.feature | 14 +-- ...eteMultiAndSingleColumnBoardInRoom.feature | 4 +- .../pages/room_board/pageRoomBoards.js | 16 +-- .../prePostConditionSteps.spec.js | 6 +- .../course_board/commonBoardSteps.spec.js | 4 + ...Steps.spec.js => courseBoardSteps.spec.js} | 105 +++++++++++++++++- .../course_board/ctlToolInBoardSteps.spec.js | 64 ----------- .../deleteDeletedElementOnBoardSteps.spec.js | 18 --- .../openDrawingElementOnBoardSteps.spec.js | 12 -- .../room_boards/roomBoardSteps.spec.js | 24 +--- 10 files changed, 131 insertions(+), 136 deletions(-) rename cypress/support/step_definition/course_board/{createEditDeleteMultiColumnInBoardSteps.spec.js => courseBoardSteps.spec.js} (50%) delete mode 100644 cypress/support/step_definition/course_board/ctlToolInBoardSteps.spec.js delete mode 100644 cypress/support/step_definition/course_board/deleteDeletedElementOnBoardSteps.spec.js delete mode 100644 cypress/support/step_definition/course_board/openDrawingElementOnBoardSteps.spec.js diff --git a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature index 5587c494..7e258dd4 100644 --- a/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature +++ b/cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature @@ -10,35 +10,35 @@ Feature: Room - Copy multi-column and single-column boards in the room Given I am logged in as a '' at '' Given a room named '' exists Given a multi-column board named '' exists in the room - Given a sinlge-column board named '' exists in the room + Given a single-column board named '' exists in the room # teacher copies the multi-column board When I click on the multi-column board in the room detail page Then I see the page board details Then I see the chip Draft When I click on the three dot menu in room board - When I click on the menu Publish + When I select the three dot menu action 'publish' Then I do not see the chip Draft When I click on the three dot menu in room board - When I click on the option Copy + When I select the three dot menu action 'copy' Then I see the chip Draft When I click on the breadcrumb to navigate to the room detail page Then I see the detail page of room '' - Then I see multi-column copied board v-card on the room detail page + Then I see copied multi-column board tile in the rooms details page # teacher copies the single-column board When I click on the single-column board in the room detail page Then I see the page board details Then I see the chip Draft When I click on the three dot menu in room board - When I click on the menu Publish + When I select the three dot menu action 'publish' Then I do not see the chip Draft When I click on the three dot menu in room board - When I click on the option Copy + When I select the three dot menu action 'copy' Then I see the chip Draft When I click on the breadcrumb to navigate to the room detail page Then I see the detail page of room '' - Then I see single-column copied board v-card on the room detail page + Then I see copied single-column board tile in the room details page # post-condition: delete the room Given the room named '' is deleted diff --git a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature index 7295f7e7..3d01abe8 100644 --- a/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature +++ b/cypress/e2e/room_board/createEditDeleteMultiAndSingleColumnBoardInRoom.feature @@ -28,7 +28,7 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new multi column board When I click on the three dot menu in room board - When I click on the option Rename in board three dot menu + When I select the three dot menu action 'rename' Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' @@ -61,7 +61,7 @@ Feature: Room - Add, edit and delete board in room # teacher edits the default title of the new single column board When I click on the three dot menu in room board - When I click on the option Rename in board three dot menu + When I select the three dot menu action 'rename' Then I change the default room board title to '' When I click on the page outside of the title of the board Then I see my room board is named '' diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 16affe02..dd5608e2 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -11,8 +11,8 @@ class RoomBoards { static #dialogAddMultiColumnBoard = '[data-testid="dialog-add-multi-column-board"]'; static #dialogAddSingleColumnBoard = '[data-testid="dialog-add-single-column-board"]'; static #boardLayoutDialogTitle = '[data-testid="board-layout-dialog-title"]'; - static #breadCrumbToRoomNavigationFromBoard = '[data-testid="breadcrumb-1"]'; - static #multicolumnBoardSelector = '[data-testid="board-tile-subtitle-0"]'; + static #breadcrumbToRoomNavigationFromBoard = '[data-testid="breadcrumb-1"]'; + static #multiColumnBoardSelector = '[data-testid="board-tile-subtitle-0"]'; static #copyOptionSelector = '[data-testid="kebab-menu-action-copy"]'; static #chipDraftSelector = '[data-testid="board-draft-chip"]'; static #publishMenuSelector = '[data-testid="kebab-menu-action-publish"]'; @@ -20,11 +20,11 @@ class RoomBoards { static #multiColumnCopiedBoardSelector = '[data-testid="board-tile-title-2"]'; static #singleColumnCopiedBoardSelector = '[data-testid="board-tile-title-3"]'; - verifyMultiColumnCopiedBoardVCardVisibleOnRoomDetailPage() { + verifyMultiColumnCopiedBoardTileVisibleOnRoomDetailsPage() { cy.get(RoomBoards.#multiColumnCopiedBoardSelector).should("be.visible"); } - verifyListColumnCopiedBoardVCardVisibleOnRoomDetailPage() { + verifySingleColumnCopiedBoardTileVisibleOnRoomDetailsPage() { cy.get(RoomBoards.#singleColumnCopiedBoardSelector).should("be.visible"); } @@ -40,8 +40,8 @@ class RoomBoards { cy.get(RoomBoards.#chipDraftSelector).should("not.exist"); } - clickMulticolumnBoardInRoomDetailPage() { - cy.get(RoomBoards.#multicolumnBoardSelector).click(); + clickMultiColumnBoardInRoomDetailPage() { + cy.get(RoomBoards.#multiColumnBoardSelector).click(); } clickOptionCopy() { @@ -53,7 +53,7 @@ class RoomBoards { } clickOnBreadcrumbToNavigateToRoomDetail() { - cy.get(RoomBoards.#breadCrumbToRoomNavigationFromBoard).click(); + cy.get(RoomBoards.#breadcrumbToRoomNavigationFromBoard).click(); } clearAndType(selector, newTitle) { @@ -89,7 +89,7 @@ class RoomBoards { }); } - seeGivenRoomBoardTitle(boardTitle) { + seeUpdatedRoomBoardTitle(boardTitle) { cy.get(RoomBoards.#roomBoardTitleOnPage) .find("input") .should("have.value", boardTitle); diff --git a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js index d699d708..5cebfd35 100644 --- a/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js +++ b/cypress/support/step_definition/common_helper/prePostConditionSteps.spec.js @@ -40,11 +40,11 @@ Given("a multi-column board named {string} exists in the room", (new_board_title roomBoards.clickOnEditInBoardMenu(); roomBoards.enterRoomBoardTitle(new_board_title); roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); - roomBoards.seeGivenRoomBoardTitle(new_board_title); + roomBoards.seeUpdatedRoomBoardTitle(new_board_title); roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); -Given("a sinlge-column board named {string} exists in the room", (new_board_title) => { +Given("a single-column board named {string} exists in the room", (new_board_title) => { rooms.clickOnAddContentButton(); rooms.seeFabButtonToAddBoard(); rooms.clickOnFabButtonToAddBoard(); @@ -55,7 +55,7 @@ Given("a sinlge-column board named {string} exists in the room", (new_board_titl roomBoards.clickOnEditInBoardMenu(); roomBoards.enterRoomBoardTitle(new_board_title); roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); - roomBoards.seeGivenRoomBoardTitle(new_board_title); + roomBoards.seeUpdatedRoomBoardTitle(new_board_title); roomBoards.clickOnBreadcrumbToNavigateToRoomDetail(); }); diff --git a/cypress/support/step_definition/course_board/commonBoardSteps.spec.js b/cypress/support/step_definition/course_board/commonBoardSteps.spec.js index c11655d6..4d864805 100644 --- a/cypress/support/step_definition/course_board/commonBoardSteps.spec.js +++ b/cypress/support/step_definition/course_board/commonBoardSteps.spec.js @@ -3,6 +3,10 @@ import Board from "../../pages/course_board/pageBoard"; const board = new Board(); +When("I select the three dot menu action {string}", (kebabMenuAction) => { + board.clickOnKebabMenuAction(kebabMenuAction); +}); + When("I click on the board", () => { board.clickOnCourseBoardCardInCourseDetailPage(); }); diff --git a/cypress/support/step_definition/course_board/createEditDeleteMultiColumnInBoardSteps.spec.js b/cypress/support/step_definition/course_board/courseBoardSteps.spec.js similarity index 50% rename from cypress/support/step_definition/course_board/createEditDeleteMultiColumnInBoardSteps.spec.js rename to cypress/support/step_definition/course_board/courseBoardSteps.spec.js index 00472631..b1975bb5 100644 --- a/cypress/support/step_definition/course_board/createEditDeleteMultiColumnInBoardSteps.spec.js +++ b/cypress/support/step_definition/course_board/courseBoardSteps.spec.js @@ -63,10 +63,6 @@ When("I click on three dot menu in the column", () => { board.clickOnThreeDotOnColumn(); }); -When("I select the three dot menu action {string}", (kebabMenuAction) => { - board.clickOnKebabMenuAction(kebabMenuAction); -}); - When("I select the option Delete in three dot menu in the column", () => { board.selectDeleteInThreeDotMenu(); }); @@ -98,3 +94,104 @@ When("I choose multi-column board in the dialog box", () => { When("I choose single-column board in the dialog box", () => { board.clickOnSingleColumnBoardOptionInDialogBox(); }); + +Then("I see an external tool element with tool {string}", (toolName) => { + board.seeExternalToolElementWithTool(toolName); +}); + +When("I click on three dot menu of external tool element {string}", (toolName) => { + board.clickThreeDotMenuOnExternalToolElementWithTool(toolName); +}); + +When("I select external tools from the menu", () => { + board.selectExternalToolsFromMenu(); +}); + +Then("I see preferred tool {string} in the menu", (toolName) => { + board.seePreferredExternalToolInMenu(toolName); +}); + +Then("I select preferred tool {string} from the menu", (toolName) => { + board.selectPreferredExternalToolFromMenu(toolName); +}); + +Then("I do not see preferred tool {string} in the menu", (toolName) => { + board.preferredExternalToolIsNotVisibleInMenu(toolName); +}); + +Then( + "I see external tool element with tool {string} is not marked as incomplete", + (toolName) => { + board.seeToolIsNotMarkedAsIncomplete(toolName); + } +); + +Then( + "I see external tool element with tool {string} is not marked as incomplete operational", + (toolName) => { + board.seeToolIsNotMarkedAsIncompleteOperational(toolName); + } +); + +Then( + "I see external tool element with tool {string} is marked as incomplete", + (toolName) => { + board.seeToolIsMarkedAsIncomplete(toolName); + } +); + +Then( + "I see external tool element with tool {string} is marked as incomplete operational", + (toolName) => { + board.seeToolIsMarkedAsIncompleteOperational(toolName); + } +); + +When("I click on external tool element with tool {string}", (toolName) => { + board.clickExternalToolElementWithTool(toolName); +}); + +Then( + "I see an external tool element with tool {string} is marked as deactivated", + (toolName) => { + board.seeToolIsMarkedAsDeactivated(toolName); + } +); + +Then( + "I see an external tool element with tool {string} is not marked as deactivated", + (toolName) => { + board.seeToolIsNotMarkedAsDeactivated(toolName); + } +); + +When( + "I launch tool {string} on external tool element with given url {string}", + (toolName, url) => { + board.launchTool(toolName, url); + } +); + +Then("I see tool {string} on external tool element was launched", (toolName) => { + board.toolWasLaunched(toolName); +}); + +When("I click on three dot menu on the deleted element", () => { + board.clickOnThreeDotOnDeletedElement(); +}); + +When("I select the option Delete in three dot menu on the card", () => { + board.selectDeleteInThreeDotMenu(); +}); + +Then("I cannot see any deleted elements", () => { + board.canNotSeeDeletedElements(); +}); + +When("I click on open Drawing Element", () => { + board.clickOnOpenTldrawDrawingElement(); +}); + +When("I click on the whiteboard element", () => { + board.clickOnWhiteboardElement(); +}); diff --git a/cypress/support/step_definition/course_board/ctlToolInBoardSteps.spec.js b/cypress/support/step_definition/course_board/ctlToolInBoardSteps.spec.js deleted file mode 100644 index 6ae131f9..00000000 --- a/cypress/support/step_definition/course_board/ctlToolInBoardSteps.spec.js +++ /dev/null @@ -1,64 +0,0 @@ -import { Then, When } from "@badeball/cypress-cucumber-preprocessor"; -import Board from "../../pages/course_board/pageBoard"; - -const board = new Board(); - -Then("I see an external tool element with tool {string}", (toolName) => { - board.seeExternalToolElementWithTool(toolName); -}); - -When("I click on three dot menu of external tool element {string}", (toolName) => { - board.clickThreeDotMenuOnExternalToolElementWithTool(toolName); -}); - -When("I select external tools from the menu", () => { - board.selectExternalToolsFromMenu(); -}); - -Then("I see preferred tool {string} in the menu", (toolName) => { - board.seePreferredExternalToolInMenu(toolName); -}); - -Then("I select preferred tool {string} from the menu", (toolName) => { - board.selectPreferredExternalToolFromMenu(toolName); -}); - -Then("I do not see preferred tool {string} in the menu", (toolName) => { - board.preferredExternalToolIsNotVisibleInMenu(toolName); -}); - -Then("I see external tool element with tool {string} is not marked as incomplete", (toolName) => { - board.seeToolIsNotMarkedAsIncomplete(toolName); -}); - -Then("I see external tool element with tool {string} is not marked as incomplete operational", (toolName) => { - board.seeToolIsNotMarkedAsIncompleteOperational(toolName); -}); - -Then("I see external tool element with tool {string} is marked as incomplete", (toolName) => { - board.seeToolIsMarkedAsIncomplete(toolName); -}); - -Then("I see external tool element with tool {string} is marked as incomplete operational", (toolName) => { - board.seeToolIsMarkedAsIncompleteOperational(toolName); -}); - -When("I click on external tool element with tool {string}", (toolName) => { - board.clickExternalToolElementWithTool(toolName); -}); - -Then("I see an external tool element with tool {string} is marked as deactivated", (toolName) => { - board.seeToolIsMarkedAsDeactivated(toolName); -}); - -Then("I see an external tool element with tool {string} is not marked as deactivated", (toolName) => { - board.seeToolIsNotMarkedAsDeactivated(toolName); -}); - -When("I launch tool {string} on external tool element with given url {string}", (toolName, url) => { - board.launchTool(toolName, url); -}); - -Then("I see tool {string} on external tool element was launched", (toolName) => { - board.toolWasLaunched(toolName); -}); diff --git a/cypress/support/step_definition/course_board/deleteDeletedElementOnBoardSteps.spec.js b/cypress/support/step_definition/course_board/deleteDeletedElementOnBoardSteps.spec.js deleted file mode 100644 index 9cfe69a5..00000000 --- a/cypress/support/step_definition/course_board/deleteDeletedElementOnBoardSteps.spec.js +++ /dev/null @@ -1,18 +0,0 @@ -import { When } from "@badeball/cypress-cucumber-preprocessor"; -import Board from "../../pages/course_board/pageBoard"; - -const { Then } = require("@badeball/cypress-cucumber-preprocessor"); - -const board = new Board(); - -When("I click on three dot menu on the deleted element", () => { - board.clickOnThreeDotOnDeletedElement(); -}); - -When("I select the option Delete in three dot menu on the card", () => { - board.selectDeleteInThreeDotMenu(); -}); - -Then("I cannot see any deleted elements", () => { - board.canNotSeeDeletedElements(); -}); diff --git a/cypress/support/step_definition/course_board/openDrawingElementOnBoardSteps.spec.js b/cypress/support/step_definition/course_board/openDrawingElementOnBoardSteps.spec.js deleted file mode 100644 index 58982ebd..00000000 --- a/cypress/support/step_definition/course_board/openDrawingElementOnBoardSteps.spec.js +++ /dev/null @@ -1,12 +0,0 @@ -const { When, Then } = require("@badeball/cypress-cucumber-preprocessor"); -import Board from "../../pages/course_board/pageBoard"; - -const board = new Board(); - -When("I click on open Drawing Element", () => { - board.clickOnOpenTldrawDrawingElement(); -}); - -When("I click on the whiteboard element", () => { - board.clickOnWhiteboardElement(); -}); diff --git a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js index 5430f634..bca622f5 100644 --- a/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js +++ b/cypress/support/step_definition/room_boards/roomBoardSteps.spec.js @@ -3,12 +3,12 @@ import RoomBoards from "../../pages/room_board/pageRoomBoards"; const roomBoards = new RoomBoards(); -Then("I see multi-column copied board v-card on the room detail page", () => { - roomBoards.verifyMultiColumnCopiedBoardVCardVisibleOnRoomDetailPage(); +Then("I see copied multi-column board tile in the rooms details page", () => { + roomBoards.verifyMultiColumnCopiedBoardTileVisibleOnRoomDetailsPage(); }); -Then("I see single-column copied board v-card on the room detail page", () => { - roomBoards.verifyListColumnCopiedBoardVCardVisibleOnRoomDetailPage(); +Then("I see copied single-column board tile in the room details page", () => { + roomBoards.verifySingleColumnCopiedBoardTileVisibleOnRoomDetailsPage(); }); When("I click on the single-column board in the room detail page", () => { @@ -16,15 +16,7 @@ When("I click on the single-column board in the room detail page", () => { }); When("I click on the multi-column board in the room detail page", () => { - roomBoards.clickMulticolumnBoardInRoomDetailPage(); -}); - -When("I click on the option Copy", () => { - roomBoards.clickOptionCopy(); -}); - -When("I click on the menu Publish", () => { - roomBoards.clickMenuPublish(); // Method to click on the Publish menu + roomBoards.clickMultiColumnBoardInRoomDetailPage(); }); Then("I do not see the chip Draft", () => { @@ -63,10 +55,6 @@ When("I click on the three dot menu in room board", () => { roomBoards.clickOnThreeDotMenuInRoomBoardTitle(); }); -When("I click on the option Rename in board three dot menu", () => { - roomBoards.clickOnEditInBoardMenu(); -}); - Then("I change the default room board title to {string}", (boardTitle) => { roomBoards.enterRoomBoardTitle(boardTitle); }); @@ -75,7 +63,7 @@ When("I click on the page outside of the title of the board", () => { roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle(); }); Then("I see my room board is named {string}", (boardTitle) => { - roomBoards.seeGivenRoomBoardTitle(boardTitle); + roomBoards.seeUpdatedRoomBoardTitle(boardTitle); }); When("I click on delete in board menu", () => { roomBoards.clickOnDeleteInBoardMenu(); From 4215b7346424606d217a41ebe3fcbbdc001727fe Mon Sep 17 00:00:00 2001 From: atlldwp Date: Thu, 23 Jan 2025 18:11:52 +0100 Subject: [PATCH 13/15] update --- cypress/support/pages/room_board/pageRoomBoards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index dd5608e2..48fe087c 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -95,7 +95,7 @@ class RoomBoards { .should("have.value", boardTitle); } clickOutsideTheTitleToSaveTheModifiedTitle() { - cy.get(RoomBoards.#mainPageArea).click("bottom").wait(500); + cy.get(RoomBoards.#mainPageArea).click("bottom"); } clickOnDeleteInBoardMenu() { cy.get(RoomBoards.#boardMenuActionDelete).click(); From b9d12cf93d936c0e9b605cc4e09c8cdbdb5a7b97 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Fri, 24 Jan 2025 16:21:23 +0100 Subject: [PATCH 14/15] add wait copy board --- cypress/support/pages/room_board/pageRoomBoards.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index 48fe087c..af8f1dd9 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -86,6 +86,7 @@ class RoomBoards { cy.get(RoomBoards.#roomBoardTitleOnPage).within(() => { this.clearAndType("input", boardTitle); // Clear and type the new title cy.get("input").type("{esc}"); // Press Esc after typing, it works this way to save the title in a stable way. + cy.wait(500); }); } From b56d3d37c6bc97dc892d176b22f07f360183d566 Mon Sep 17 00:00:00 2001 From: atlldwp Date: Mon, 27 Jan 2025 10:00:30 +0100 Subject: [PATCH 15/15] updated wait time --- cypress/support/pages/room_board/pageRoomBoards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/support/pages/room_board/pageRoomBoards.js b/cypress/support/pages/room_board/pageRoomBoards.js index af8f1dd9..90bd3ab5 100644 --- a/cypress/support/pages/room_board/pageRoomBoards.js +++ b/cypress/support/pages/room_board/pageRoomBoards.js @@ -86,7 +86,7 @@ class RoomBoards { cy.get(RoomBoards.#roomBoardTitleOnPage).within(() => { this.clearAndType("input", boardTitle); // Clear and type the new title cy.get("input").type("{esc}"); // Press Esc after typing, it works this way to save the title in a stable way. - cy.wait(500); + cy.wait(1000); }); }