Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atlldwp committed Jan 27, 2025
1 parent e707ccd commit 31947ab
Show file tree
Hide file tree
Showing 16 changed files with 741 additions and 729 deletions.
358 changes: 179 additions & 179 deletions cypress/e2e/course/contextRestrictionOfCtlTools.feature

Large diffs are not rendered by default.

512 changes: 256 additions & 256 deletions cypress/e2e/course/copyCtlTools.feature

Large diffs are not rendered by default.

480 changes: 240 additions & 240 deletions cypress/e2e/course/deactivationOfCtlTools.feature

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions cypress/e2e/course/shareCtlTools.feature
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Feature: Teacher can share a course
# Pre-condition: teacher adds a tool with required parameter
When I click on plus icon to add card in column
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool Context Scope' from available tools
When I enter 'test' in required custom parameter field 'searchparam'
Expand All @@ -89,7 +89,7 @@ Feature: Teacher can share a course
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool Optional Protected Parameter' from available tools
When I enter 'test' in required custom parameter field 'search'
Expand All @@ -100,7 +100,7 @@ Feature: Teacher can share a course
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool Protected Parameter' from available tools
When I enter 'test' in required custom parameter field 'search'
Expand Down
14 changes: 7 additions & 7 deletions cypress/e2e/course_board/createEditDeleteCtlToolInBoard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
# Teacher adds a tool without a custom parameter
When I click on plus icon to add card in column
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool 1' from available tools
Then I see tool 'CY Test Tool 1' is selected
Expand All @@ -86,7 +86,7 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool 1' from available tools
Then I see tool 'CY Test Tool 1' is selected
Expand All @@ -98,7 +98,7 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I insert the external tool link 'https://www.openstreetmap.org/?mlat=52.40847&mlon=9.80823&zoom=19#map=19/52.40847/9.80823'
Then I see tool 'OpenStreetMap' is selected
Expand All @@ -112,7 +112,7 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool Required Parameters' from available tools
Then I see tool 'CY Test Tool Required Parameters' is selected
Expand All @@ -128,7 +128,7 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
When I click on three dot menu in the card
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
When I select external tools from the menu
When I select external tools from the element selection dialog box
When I click on the tool configuration selection
When I select the tool 'CY Test Tool Optional Parameters' from available tools
Then I see tool 'CY Test Tool Optional Parameters' is selected
Expand Down Expand Up @@ -166,11 +166,11 @@ Feature: Course Board - To add, edit and delete a ctl tool in a board
When I select the option Edit in three dot menu on the card
When I click on plus icon to add content into card
Then I see preferred tool 'CY Test Tool Preferred' in the menu
When I select preferred tool 'CY Test Tool Preferred' from the menu
When I select preferred tool 'CY Test Tool Preferred' from the element selection dialog box
Then I see an external tool element with tool 'CY Test Tool Preferred'
When I click on plus icon to add content into card
Then I see preferred tool 'CY Test Tool Preferred With Param' in the menu
When I select preferred tool 'CY Test Tool Preferred With Param' from the menu
When I select preferred tool 'CY Test Tool Preferred With Param' from the element selection dialog box
Then I see tool 'CY Test Tool Preferred With Param' is selected
When I enter 'test' in required custom parameter field 'contextParam'
Then I see custom parameter input field 'contextParam' contains 'test'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Feature: Course Board - To create, edit and delete a single column course board
Then I click on the button with the Icon Plus to add a new card in the column
When I enter '<card_text_content>' to board card text element
When I click on plus icon to add content into card
When I select 'drawing-element' from the menu
When I select 'drawing-element' from the element selection dialog box
Then I see a whiteboard on the board
Then I see '<card_text_content>' in board card text element

Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/course_board/openDrawingElementOnBoard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Feature: Course Board - Opening a drawing element on a course page
When I click on the page outside of the column
When I click on plus icon to add card in column
When I click on plus icon to add content into card
Then I select 'drawing-element' from the menu
Then I select 'drawing-element' from the element selection dialog box

# teacher is able to open a drawing element to the course board
Given I am logged in as a '<teacher>' at '<namespace>'
Expand Down
17 changes: 9 additions & 8 deletions cypress/e2e/room_board/addDeleteBBBToolInRoomBoard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,26 @@ Feature: Room - Add BBB Tool in the Room Board
# pre-condition: room and boards are existing
Given I am logged in as a '<teacher>' at '<namespace>'
Given a room named '<room_name>' exists
Given a multi-column board named '<new_board_title>' exists in the room
Given a multi-column board named '<board_title>' exists in the room
Given the multi-column board has a column with a card

# teacher adds BBB Tool to the multi-column board
When I click on the three dot on the card
When I click on plus icon to add content into card
Then I see the dialog box to select element for the card
When I click on the button Close on the element selection dialogue box
Then I do not see the element selection dialogue box
When I click on plus icon to add content into card
Then I see the dialog box to select element for the card
When I select 'video-conference' from the menu
When I select 'video-conference' from the element selection dialog box
When I enter the video conference title '<video_conference_title>'
When I click on the save button or press the button enter key
Then I see the video conference element added in the card
When I click on the video conference element in the card
Then I see the modal to start the video conference
Then I see the moderator approval checkbox is checked in the video conference start modal
Then I see the button create in the video conference creation modal to start the call
Then I click on the button cancel in the video conference creation modal to back to the card
Then I click on the button cancel in the video conference creation modal to go back to the card

# student can see the video confernce in the multi-column board
# note: this scenario can not be defined as adding the student to the room feature is not yet implementred.
Expand All @@ -49,15 +50,15 @@ Feature: Room - Add BBB Tool in the Room Board
Then I do not see the video conference element

# post-condition: delete the room
Given I am on the room details page
Given I navigate to the room detail page from the board page
Given the room named '<room_name>' is deleted

@school_api_test
Examples:
| teacher | admin | namespace | room_name | new_board_title | video_conference_title |
| teacher1_dbc | admin1_dbc | dbc | Cypress Room Name | Board Cy Title | Cy BBB Tool |
| teacher | admin | namespace | room_name | board_title | video_conference_title |
| teacher1_dbc | admin1_dbc | dbc | Cypress Room Name | Board Cy Title | Cy BBB Tool |

@staging_test
Examples:
| teacher | admin | namespace | room_name | new_board_title | video_conference_title |
| teacher1_dbc | admin1_dbc | dbc | Cypress Room Name | Board Cy Title | Cy BBB Tool |
| teacher | admin | namespace | room_name | board_title | video_conference_title |
| teacher1_dbc | admin1_dbc | dbc | Cypress Room Name | Board Cy Title | Cy BBB Tool |
14 changes: 7 additions & 7 deletions cypress/e2e/room_board/copyMultiSingleColumnBoardsInRoom.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Feature: Room - Copy multi-column and single-column boards in the room
# pre-condition: room and boards are existing
Given I am logged in as a '<teacher>' at '<namespace>'
Given a room named '<room_name>' exists
Given a multi-column board named '<new_board_title>' exists in the room
Given a sinlge-column board named '<new_board_title>' exists in the room
Given I am on the room details page
Given a multi-column board named '<board_title>' exists in the room
Given a sinlge-column board named '<board_title>' exists in the room
Given I navigate to the room detail page from the board page

# teacher copies the multi-column board
When I click on the multi-column board in the room detail page
Expand Down Expand Up @@ -46,11 +46,11 @@ Feature: Room - Copy multi-column and single-column boards in the room

@school_api_test
Examples:
| teacher | namespace | room_name | new_board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |
| teacher | namespace | room_name | board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |

@staging_test
Examples:
| teacher | namespace | room_name | new_board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |
| teacher | namespace | room_name | board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |

Original file line number Diff line number Diff line change
Expand Up @@ -31,22 +31,22 @@ Feature: Room - Add, edit and delete board in room
When I select the three dot menu action 'rename'
Then I change the room board title to '<edited_board_title>'
When I click on the page outside of the title of the board
Then I see my room board is named '<new_board_title>'
Then I see my room board is named '<board_title>'

# cancel delete-process of the new multi column board
When I click on the three dot menu in room board
When I select the three dot menu action 'delete'
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 '<new_board_title>' on the room overview page
Then I see the board '<board_title>' 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 select the three dot menu action 'delete'
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 '<new_board_title>' in the room
Then I do not see the board '<board_title>' in the room

# teacher creates a new single column board in the room
Given I am logged in as a '<teacher>' at '<namespace>'
Expand All @@ -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 select the three dot menu action 'rename'
Then I change the default room board title to '<new_board_title>'
Then I change the default room board title to '<board_title>'
When I click on the page outside of the title of the board
Then I see my room board is named '<new_board_title>'
Then I see my room board is named '<board_title>'

# confirm delete-process of single column board
When I click on the three dot menu in room board
Expand All @@ -83,10 +83,10 @@ Feature: Room - Add, edit and delete board in room

@school_api_test
Examples:
| teacher | namespace | room_name | new_board_title |
| teacher | namespace | room_name | board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |

@staging_test
Examples:
| teacher | namespace | room_name | new_board_title |
| teacher | namespace | room_name | board_title |
| teacher1_brb | brb | Cypress Room Name | Board Cy Title |
3 changes: 2 additions & 1 deletion cypress/e2e/tldraw/createTLdrawWithContent.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Feature: TLDraw - Test tldraw on board
Given the multi-column board has a column with a card

# teacher creates a whiteboard element in the card and draws on it
When I click on the three dot on the card
When I click on plus icon to add content into card
When I select 'drawing-element' from the menu
When I select 'drawing-element' from the element selection dialog box
When I click on the whiteboard element
When I click on the pencil tool
When I draw a line on the canvas with startpoint '100', '100' and endpoint '300', '300'
Expand Down
5 changes: 5 additions & 0 deletions cypress/support/pages/course_board/pageBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class Board {
static #boardCard = '[data-testid="board-card-0-0"]';
static #copyBoardCardLinkButton = '[data-testid="board-menu-action-share-link"]';
static #firstBoardColumn = '[data-testid="board-column-0"]';
static #outsideClickAreaforCardInColumn = "body";

clickPlusIconToAddCardInColumn() {
cy.get(Board.#addCardInColumnButton).click();
Expand Down Expand Up @@ -229,6 +230,10 @@ class Board {
cy.get(Board.#mainPageArea).click("bottom");
}

clickOutsideTheCardToSaveTheCardInColumn() {
cy.get(Board.#outsideClickAreaforCardInColumn).clik(0, 0);
}

seeNewlyCreatedColumn(newColumnName) {
cy.wait(1000);
cy.get(Board.#addColumnTitleInput)
Expand Down
13 changes: 7 additions & 6 deletions cypress/support/pages/room_board/pageRoomBoards.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,19 @@ class RoomBoards {
static #moderatorApprovalCheckbox =
'[data-testid="moderator-must-approve-join-requests"]';
static #cancelButtonInVideoConferenceModal = '[data-testid="dialog-cancel"]';
static #globalCommonthreeDotButton = '[data-testid="board-menu-icon"]';
static #globalCommonThreeDotButton = '[data-testid="board-menu-icon"]';
static #deleteOptionOnVideoConferenceElementDialog =
'[data-testid="kebab-menu-action-delete"]';
static #deleteConfirmationDialogForVideoConferenceElement =
'[data-testid="dialog-title"]';
static #deleteButtonOnVideoConferenceElementDialog = '[data-testid="dialog-confirm"]';
static #threeDotButtonInCard = '[data-testid="card-menu-btn-0-0"]';
static #ThreeDotButtonInCard = '[data-testid="card-menu-btn-0-0"]';
static #editOptionInCardThreeDot = '[data-testid="kebab-menu-action-edit"]';

clickOnThreeDotInCard() {
cy.get(RoomBoards.#threeDotButtonInCard)
cy.get(RoomBoards.#ThreeDotButtonInCard)
//three dot has same data-testid and needs to be located inside the parent element
.find(RoomBoards.#globalCommonthreeDotButton)
.find(RoomBoards.#globalCommonThreeDotButton)
.click();
}

Expand All @@ -52,7 +52,7 @@ class RoomBoards {
clickThreeDotMenuInVideoConferenceElement() {
cy.get(RoomBoards.#videoConferenceElement)
//three dot has same data-testid and needs to be located inside the parent element
.find(RoomBoards.#globalCommonthreeDotButton)
.find(RoomBoards.#globalCommonThreeDotButton)
.click();
}

Expand Down Expand Up @@ -185,7 +185,8 @@ class RoomBoards {
enterRoomBoardTitle(boardTitle) {
cy.get(RoomBoards.#roomBoardTitleOnPage).within(() => {
this.clearAndType("input", boardTitle);
cy.get("input").type("{esc}"); // Press Esc after typing, it works this way to save the title in a stable way.
// Press Esc after typing, it works this way to save the title in a stable way.
cy.get("input").type("{esc}");
cy.wait(1000);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Given("a room named {string} exists", (room_name) => {
rooms.seeRoomDetailPage(room_name);
});

Given("a multi-column board named {string} exists in the room", (new_board_title) => {
Given("a multi-column board named {string} exists in the room", (board_title) => {
rooms.clickOnAddContentButton();
rooms.seeFabButtonToAddBoard();
rooms.clickOnFabButtonToAddBoard();
Expand All @@ -48,12 +48,12 @@ Given("a multi-column board named {string} exists in the room", (new_board_title
roomBoards.seeNewRoomBoardCreatePage();
roomBoards.clickOnThreeDotMenuInRoomBoardTitle();
roomBoards.clickOnEditInBoardMenu();
roomBoards.enterRoomBoardTitle(new_board_title);
roomBoards.enterRoomBoardTitle(board_title);
roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle();
roomBoards.seeGivenRoomBoardTitle(new_board_title);
roomBoards.seeGivenRoomBoardTitle(board_title);
});

Given("a single-column board named {string} exists in the room", (new_board_title) => {
Given("a single-column board named {string} exists in the room", (board_title) => {
rooms.clickOnAddContentButton();
rooms.seeFabButtonToAddBoard();
rooms.clickOnFabButtonToAddBoard();
Expand All @@ -62,12 +62,12 @@ Given("a single-column board named {string} exists in the room", (new_board_titl
roomBoards.seeNewRoomBoardCreatePage();
roomBoards.clickOnThreeDotMenuInRoomBoardTitle();
roomBoards.clickOnEditInBoardMenu();
roomBoards.enterRoomBoardTitle(new_board_title);
roomBoards.enterRoomBoardTitle(board_title);
roomBoards.clickOutsideTheTitleToSaveTheModifiedTitle();
roomBoards.seeGivenRoomBoardTitle(new_board_title);
roomBoards.seeGivenRoomBoardTitle(board_title);
});

Given("I am on the room details page", () => {
Given("I navigate to the room detail page from the board page", () => {
roomBoards.clickOnBreadcrumbToNavigateToRoomDetail();
});

Expand Down Expand Up @@ -99,6 +99,7 @@ Given("the multi-column board has a column with a card", () => {
board.clickOnAddNewColumnButton();
board.clickOutsideTheColumnToSaveTheColumn();
board.clickPlusIconToAddCardInColumn();
board.clickOutsideTheCardToSaveTheCardInColumn();
});

Given("course with name {string} is deleted", (courseName) => {
Expand Down
Loading

0 comments on commit 31947ab

Please sign in to comment.