mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Merge pull request #2782 from gradido/fix-login-query-in-e2e-test
fix(other): repair UserProfile.ChangePassword.feature scenario
This commit is contained in:
commit
5266acfb02
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@ -550,7 +550,7 @@ jobs:
|
||||
run: |
|
||||
cd e2e-tests/
|
||||
yarn
|
||||
yarn run cypress run --spec cypress/e2e/User.Authentication.feature,cypress/e2e/User.Authentication.ResetPassword.feature,cypress/e2e/User.Registration.feature
|
||||
yarn run cypress run
|
||||
- name: End-to-end tests | if tests failed, upload screenshots
|
||||
if: ${{ failure() && steps.e2e-tests.conclusion == 'failure' }}
|
||||
uses: actions/upload-artifact@v3
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
# Server
|
||||
JWT_EXPIRES_IN=1m
|
||||
JWT_EXPIRES_IN=2m
|
||||
|
||||
# Email
|
||||
EMAIL=true
|
||||
|
||||
@ -56,7 +56,7 @@ export default defineConfig({
|
||||
env: {
|
||||
backendURL: 'http://localhost:4000',
|
||||
mailserverURL: 'http://localhost:1080',
|
||||
loginQuery: `query ($email: String!, $password: String!, $publisherId: Int) {
|
||||
loginQuery: `mutation ($email: String!, $password: String!, $publisherId: Int) {
|
||||
login(email: $email, password: $password, publisherId: $publisherId) {
|
||||
email
|
||||
firstName
|
||||
@ -69,7 +69,8 @@ export default defineConfig({
|
||||
hasElopage
|
||||
publisherId
|
||||
isAdmin
|
||||
creation
|
||||
hideAmountGDD
|
||||
hideAmountGDT
|
||||
__typename
|
||||
}
|
||||
}`,
|
||||
|
||||
@ -5,13 +5,13 @@ Feature: User Authentication - reset password
|
||||
# TODO for these pre-conditions utilize seeding or API check, if user exists in test system
|
||||
# Background:
|
||||
# Given the following "users" are in the database:
|
||||
# | email | password | name |
|
||||
# | bibi@bloxberg.de | Aa12345_ | Bibi Bloxberg |
|
||||
# | email | password | name |
|
||||
# | raeuber@hotzenplotz.de | Aa12345_ | Räuber Hotzenplotz |
|
||||
|
||||
Scenario: Reset password from signin page successfully
|
||||
Given the user navigates to page "/login"
|
||||
And the user navigates to the forgot password page
|
||||
When the user enters the e-mail address "bibi@bloxberg.de"
|
||||
When the user enters the e-mail address "raeuber@hotzenplotz.de"
|
||||
And the user submits the e-mail form
|
||||
Then the user receives an e-mail containing the "password reset" link
|
||||
When the user opens the "password reset" link in the browser
|
||||
@ -19,7 +19,7 @@ Feature: User Authentication - reset password
|
||||
And the user repeats the password "12345Aa_"
|
||||
And the user submits the password form
|
||||
And the user clicks the sign in button
|
||||
Then the user submits the credentials "bibi@bloxberg.de" "Aa12345_"
|
||||
Then the user submits the credentials "raeuber@hotzenplotz.de" "Aa12345_"
|
||||
And the user cannot login
|
||||
But the user submits the credentials "bibi@bloxberg.de" "12345Aa_"
|
||||
And the user is logged in with username "Bibi Bloxberg"
|
||||
But the user submits the credentials "raeuber@hotzenplotz.de" "12345Aa_"
|
||||
And the user is logged in with username "Räuber Hotzenplotz"
|
||||
|
||||
@ -5,14 +5,14 @@ Feature: User profile - change password
|
||||
Background:
|
||||
# TODO for these pre-conditions utilize seeding or API check, if user exists in test system
|
||||
# Given the following "users" are in the database:
|
||||
# | email | password | name |
|
||||
# | bibi@bloxberg.de | Aa12345_ | Bibi Bloxberg | |
|
||||
# | email | password | name |
|
||||
# | bob@baumeister.de | Aa12345_ | Bob der Baumeister |
|
||||
|
||||
# TODO instead of credentials use the name of an user object (see seeds in backend)
|
||||
Given the user is logged in as "bibi@bloxberg.de" "Aa12345_"
|
||||
Given the user is logged in as "bob@baumeister.de" "Aa12345_"
|
||||
|
||||
Scenario: Change password successfully
|
||||
Given the user navigates to page "/profile"
|
||||
Given the user navigates to page "/settings"
|
||||
And the user opens the change password menu
|
||||
When the user fills the password form with:
|
||||
| Old password | Aa12345_ |
|
||||
@ -21,7 +21,7 @@ Feature: User profile - change password
|
||||
And the user submits the password form
|
||||
And the user is presented a "success" message
|
||||
And the user logs out
|
||||
Then the user submits the credentials "bibi@bloxberg.de" "Aa12345_"
|
||||
Then the user submits the credentials "bob@baumeister.de" "Aa12345_"
|
||||
And the user cannot login
|
||||
But the user submits the credentials "bibi@bloxberg.de" "12345Aa_"
|
||||
And the user is logged in with username "Bibi Bloxberg"
|
||||
But the user submits the credentials "bob@baumeister.de" "12345Aa_"
|
||||
And the user is logged in with username "Bob der Baumeister"
|
||||
|
||||
@ -11,7 +11,7 @@ export class SideNavMenu {
|
||||
}
|
||||
|
||||
logout() {
|
||||
cy.get(this.logoutMenu).click()
|
||||
cy.get('.main-sidebar').find(this.logoutMenu).click()
|
||||
return this
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,15 +49,15 @@ describe('Sidebar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(2).text()).toEqual('navigation.transactions')
|
||||
})
|
||||
|
||||
it('has nav-item "gdt.gdt" in navbar', () => {
|
||||
it('has nav-item "creation" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(3).text()).toEqual('creation')
|
||||
})
|
||||
|
||||
it('has nav-item "creation" in navbar', () => {
|
||||
it('has nav-item "GDT" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(4).text()).toContain('GDT')
|
||||
})
|
||||
|
||||
it('has nav-item "Information" in navbar', () => {
|
||||
it('has nav-item "navigation.info" in navbar', () => {
|
||||
expect(wrapper.findAll('.nav-item').at(5).text()).toContain('navigation.info')
|
||||
})
|
||||
})
|
||||
@ -68,13 +68,13 @@ describe('Sidebar', () => {
|
||||
expect(wrapper.findAll('ul').at(1).findAll('.nav-item')).toHaveLength(2)
|
||||
})
|
||||
|
||||
it('has nav-item "navigation.info" in navbar', () => {
|
||||
it('has nav-item "navigation.settings" in navbar', () => {
|
||||
expect(wrapper.findAll('ul').at(1).findAll('.nav-item').at(0).text()).toEqual(
|
||||
'navigation.settings',
|
||||
)
|
||||
})
|
||||
|
||||
it('has nav-item "navigation.settings" in navbar', () => {
|
||||
it('has nav-item "navigation.logout" in navbar', () => {
|
||||
expect(wrapper.findAll('ul').at(1).findAll('.nav-item').at(1).text()).toEqual(
|
||||
'navigation.logout',
|
||||
)
|
||||
|
||||
@ -48,7 +48,12 @@
|
||||
<b-icon icon="shield-check" aria-hidden="true"></b-icon>
|
||||
<span class="ml-2">{{ $t('navigation.admin_area') }}</span>
|
||||
</b-nav-item>
|
||||
<b-nav-item class="font-weight-bold" @click="$emit('logout')" active-class="activeRoute">
|
||||
<b-nav-item
|
||||
class="font-weight-bold"
|
||||
@click="$emit('logout')"
|
||||
active-class="activeRoute"
|
||||
data-test="logout-menu"
|
||||
>
|
||||
<b-img src="/img/svg/logout.svg" height="20" class="svg-icon" />
|
||||
<span class="ml-2 text-205">{{ $t('navigation.logout') }}</span>
|
||||
</b-nav-item>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user