-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from eclipse-mnestix/staging
Release 1.4.0
- Loading branch information
Showing
110 changed files
with
4,326 additions
and
3,944 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
name: Publish wiki | ||
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- wiki/** | ||
- .github/workflows/publish-wiki.yml | ||
concurrency: | ||
group: publish-wiki | ||
cancel-in-progress: true | ||
permissions: | ||
contents: write | ||
jobs: | ||
publish-wiki: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Andrew-Chen-Wang/github-wiki-action@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
describe('Login Keycloak user roles', function () { | ||
const adminTestUser = { | ||
login: Cypress.env('TEST_ADMIN_USER_LOGIN'), | ||
password: Cypress.env('TEST_ADMIN_USER_PASSWORD'), | ||
}; | ||
const testUser = { | ||
login: Cypress.env('TEST_USER_LOGIN'), | ||
password: Cypress.env('TEST_USER_PASSWORD'), | ||
}; | ||
|
||
beforeEach(function () { | ||
cy.visit('/'); | ||
}); | ||
it('should be possible to login', () => { | ||
cy.getByTestId('header-burgermenu').click(); | ||
cy.getByTestId('login-button').should('exist'); | ||
}); | ||
|
||
it('should not be able to access templates without login', () => { | ||
cy.visit('/templates'); | ||
cy.getByTestId('authentication-prompt-lock').should('exist'); | ||
}); | ||
|
||
it('should show correct admin user login and icon', () => { | ||
cy.keycloakLogin(adminTestUser.login, adminTestUser.password); | ||
cy.getByTestId('header-burgermenu').click(); | ||
|
||
cy.getByTestId('user-info-box').should('have.text', 'admin@test.com'); | ||
cy.getByTestId('admin-icon').should('exist'); | ||
cy.getByTestId('login-button').should('be.not.exist'); | ||
cy.keycloakLogout(); | ||
}); | ||
|
||
it('should navigate to settings when logged in as admin user', () => { | ||
cy.keycloakLogin(adminTestUser.login, adminTestUser.password); | ||
cy.getByTestId('header-burgermenu').click(); | ||
|
||
cy.getByTestId('settings-menu-icon').should('exist').click(); | ||
cy.getByTestId('settings-route-page').should('exist'); | ||
cy.getByTestId('settings-header').should('have.text', 'Settings'); | ||
|
||
cy.getByTestId('header-burgermenu').click(); | ||
cy.keycloakLogout(); | ||
}); | ||
|
||
it('should show correct user login and icon', () => { | ||
cy.keycloakLogin(testUser.login, testUser.password); | ||
cy.getByTestId('header-burgermenu').click(); | ||
|
||
cy.getByTestId('user-info-box').should('have.text', 'user@test.com'); | ||
cy.getByTestId('user-icon').should('exist'); | ||
cy.getByTestId('login-button').should('be.not.exist'); | ||
cy.keycloakLogout(); | ||
}); | ||
|
||
it('should navigate to template when logged in as a user', () => { | ||
cy.keycloakLogin(testUser.login, testUser.password); | ||
|
||
cy.visit('/templates'); | ||
cy.getByTestId('templates-route-page').should('exist'); | ||
cy.getByTestId('templates-header').should('include.text', 'Templates'); | ||
|
||
cy.getByTestId('header-burgermenu').click(); | ||
cy.keycloakLogout(); | ||
}); | ||
|
||
it('should block settings route when logged in as s user', () => { | ||
cy.keycloakLogin(testUser.login, testUser.password); | ||
|
||
cy.visit('/settings'); | ||
cy.getByTestId('not-allowed-prompt-lock').should('exist'); | ||
|
||
cy.getByTestId('header-burgermenu').click(); | ||
cy.getByTestId('settings-menu-icon').should('not.exist'); | ||
|
||
cy.keycloakLogout(); | ||
}); | ||
}); |
Oops, something went wrong.