Skip to content

Commit

Permalink
updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
atlldwp committed Jan 21, 2025
1 parent 6a7d297 commit 6d51ca9
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 14 deletions.
3 changes: 3 additions & 0 deletions cypress/e2e/login_management/cloudLogin.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<student>' at '<namespace>'
Then I log out
Given I am logged in as a '<teacher>' at '<namespace>'
Then I log out
Given I am logged in as a '<admin>' at '<namespace>'
Then I log out

@staging_test
Examples:
Expand Down
Original file line number Diff line number Diff line change
@@ -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 '<teacher>' at '<namespace>'
Given a room named '<room_name>' exists
Given a multicolumn board named '<edited_board_title>' exists in the room
Given a list board named '<edited_board_title>' exists in the room
Given a multi-column board named '<edited_board_title>' exists in the room
Given a sinlge-column board named '<edited_board_title>' 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
Expand All @@ -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 '<room_name>'
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
Expand All @@ -35,17 +36,19 @@ 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 '<room_name>'
Then I see single-column copied board v-card on the room detail page


# Post-condition: Delete the room
Given the room named '<room_name>' is deleted

@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 |

11 changes: 10 additions & 1 deletion cypress/support/pages/room_board/pageRoomBoards.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});

Expand Down

0 comments on commit 6d51ca9

Please sign in to comment.