Skip to content

Commit

Permalink
Merge branch 'master' into 709-6-Toggle-In-TopMenu
Browse files Browse the repository at this point in the history
  • Loading branch information
ogerly authored Jul 1, 2024
2 parents 5659428 + c013332 commit 44a60c2
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 54 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/e2e.run.tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,18 @@ jobs:
- name: E2E | Boot up test system
run: |
cd authentik/
rm -rf database
./database.unpack.sh
docker compose up -d
cd ../
docker compose up -d database
cd backend
cp .env.dist .env
ln -s src/auth/public.pem public.pem
npm install
npm run db:reset
npm run build
npm run start &
cd ../frontend
cp .env.dist .env
npm install
Expand Down
74 changes: 37 additions & 37 deletions backend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
},
"dependencies": {
"@apollo/server": "^4.10.4",
"@getbrevo/brevo": "^2.1.1",
"@prisma/client": "^5.15.1",
"@getbrevo/brevo": "^2.2.0",
"@prisma/client": "^5.16.1",
"@vuepress/theme-default": "^2.0.0-rc.37",
"axios": "^1.7.2",
"class-validator": "^0.14.1",
Expand All @@ -42,7 +42,7 @@
"graphql": "^16.9.0",
"graphql-scalars": "^1.23.0",
"jsonwebtoken": "^9.0.2",
"prisma": "^5.15.1",
"prisma": "^5.16.1",
"prisma-extension-soft-delete": "^1.0.1",
"reflect-metadata": "^0.2.2",
"tsconfig-paths": "^4.2.0",
Expand All @@ -54,7 +54,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"@types/jest": "^29.5.12",
"@types/jsonwebtoken": "^9.0.6",
"@types/node": "^20.14.8",
"@types/node": "^20.14.9",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.13.1",
"@typescript-eslint/parser": "^7.13.1",
Expand Down
3 changes: 2 additions & 1 deletion tests/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ export default defineConfig({
viewportHeight: 1080,
viewportWidth: 1920,
env: {
authentikURL: 'http://localhost:9000',
authentikURL: 'http://localhost:9000/',
backendURL: 'http://localhost:4000/',
},
setupNodeEvents,
},
Expand Down
11 changes: 11 additions & 0 deletions tests/cypress/e2e/features/Tables.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Feature: Tables
As a user
I want to enter the room reachable via the central worldcafe button,
so that I can interact with other users in video conferences

Scenario: Worldcafe Enter Room
Given I navigate to page '/signin'
When I submit the credentials 'akadmin' 'dreammall'
Then I am on page 'worldcafe'
When I click the enter my room button
Then My room is queried
2 changes: 1 addition & 1 deletion tests/cypress/e2e/pages/LoginPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class LoginPage {
}

agreeConsent() {
cy.url('include', 'dreammallearth-authorization-implicit-consent')
cy.url().should('include', 'dreammallearth-authorization-implicit-consent')
cy.get(this.submitBtn).click()
}
}
Expand Down
15 changes: 15 additions & 0 deletions tests/cypress/e2e/pages/WorldcafePage.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class WorldcafePage {
userMenuBtn: string = '.user-info'
signOutBtn: string = '.sign-out'
centerBtn: string = '#create-button'
newTableBtnBtn: string = 'div.button-list > button.new-table-button'

signoutButtonIsVisible() {
cy.get(this.userMenuBtn).should('be.visible')
Expand All @@ -10,6 +12,19 @@ class WorldcafePage {
cy.get(this.userMenuBtn).first().click()
cy.get(this.signOutBtn).click()
}

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')) {
req.alias = 'postJoinMyRoomQuery'
}
})

cy.get(this.centerBtn).click()
cy.get(this.newTableBtnBtn).click()
}
}

export const worldcafePage = new WorldcafePage()
13 changes: 13 additions & 0 deletions tests/cypress/e2e/steps/tables.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Then, When } from '@badeball/cypress-cucumber-preprocessor'

// eslint-disable-next-line import/no-relative-parent-imports
import { worldcafePage } from '../pages/WorldcafePage'

When('I click the enter my room button', () => {
// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access
worldcafePage.enterMyRoom()
})

Then('My room is queried', () => {
cy.wait('@postJoinMyRoomQuery')
})
22 changes: 13 additions & 9 deletions tests/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"update": "npx npm-check-updates"
},
"devDependencies": {
"@badeball/cypress-cucumber-preprocessor": "^20.0.7",
"@badeball/cypress-cucumber-preprocessor": "^20.1.0",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.1",
"@eslint-community/eslint-plugin-eslint-comments": "^4.3.0",
"@typescript-eslint/eslint-plugin": "^7.8.0",
Expand All @@ -51,7 +51,7 @@
"multiple-cucumber-html-reporter": "^3.6.2",
"prettier": "^3.3.2",
"ts-loader": "^9.5.1",
"tsx": "^4.15.6",
"tsx": "^4.16.0",
"typescript": "^5.5.2",
"vuepress": "^2.0.0-rc.14",
"vuepress-plugin-search-pro": "^2.0.0-rc.50",
Expand Down

0 comments on commit 44a60c2

Please sign in to comment.