Skip to content

Commit

Permalink
adept e2e table test to changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mahula committed Jun 29, 2024
1 parent 4576caf commit 7279b2f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tests/cypress/e2e/features/Tables.feature
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ Feature: Tables
When I submit the credentials 'akadmin' 'dreammall'
Then I am on page 'worldcafe'
When I click the enter my room button
Then I am navigated to page where my room is queried
Then My room is queried
9 changes: 7 additions & 2 deletions tests/cypress/e2e/pages/WorldcafePage.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
/* eslint-disable no-prototype-builtins */
/* eslint-disable @typescript-eslint/no-unsafe-call */
class WorldcafePage {
userMenuBtn: string = '.user-info'
signOutBtn: string = '.sign-out'
Expand All @@ -16,8 +19,10 @@ class WorldcafePage {
enterMyRoom() {
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
cy.intercept('POST', Cypress.env('backendURL'), (req) => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, no-prototype-builtins, @typescript-eslint/no-unsafe-member-access
if (req.body.hasOwnProperty('query') && req.body.query.includes('joinMyRoom')) {
if (
req.body.hasOwnProperty('query') &&
req.body.query.includes('{ mutation {\n joinMyRoom\n}')
) {
req.alias = 'postJoinMyRoomQuery'
}
})
Expand Down
3 changes: 1 addition & 2 deletions tests/cypress/e2e/steps/tables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ When('I click the enter my room button', () => {
worldcafePage.enterMyRoom()
})

Then('I am navigated to page where my room is queried', () => {
cy.url().should('contain', '/room/')
Then('My room is queried', () => {
cy.wait('@postJoinMyRoomQuery')
})

0 comments on commit 7279b2f

Please sign in to comment.