-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#161 Test import with same mail address
Test user import with users that have the same mail address. In this process, previously added methods were updated to be applicable for a wider range of cases. # Conflicts: # integrationTests/cypress/support/step_definitions/then.ts
- Loading branch information
Showing
11 changed files
with
3,131 additions
and
55 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const { defineConfig } = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
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,5 @@ | ||
{ | ||
"name": "Using fixtures to represent data", | ||
"email": "[email protected]", | ||
"body": "Fixtures are a great way to mock data for responses to routes" | ||
} |
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,25 @@ | ||
// *********************************************** | ||
// This example commands.js shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) |
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,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
61 changes: 61 additions & 0 deletions
61
integrationTests/cypress/e2e/import_same_mailAddress.feature
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,61 @@ | ||
Feature: Tests for uploading file with users with same mail address | ||
|
||
Background: | ||
Given the user "manager" exists | ||
And the user "manager" is member of the group "cesManager" | ||
And the user "manager" with password "newuserpassword1234A$" is logged in | ||
|
||
Scenario: a user selects a file for upload | ||
When the user opens the user import page | ||
And the user selects the file "tap_userimport_mailpara.csv" | ||
Then a table of the file content for the file "tap_userimport_mailpara.csv" is displayed | ||
|
||
@clean_before | ||
@clear_downloadDir | ||
Scenario Outline: a user uploads a file | ||
When the user opens the user import page | ||
And the user uploads the file "tap_userimport_mailpara.csv" | ||
Then the user import page shows an import with the message "<message>" and the details "<details>" | ||
|
||
Examples: | ||
| message | details | | ||
| Import completed with errors! | Created accounts (4) | | ||
| Import completed with errors! | Skipped data rows (1) | | ||
|
||
Scenario Outline: after uploading a file a user inspects the user import details page about the created accounts | ||
When the user opens the user import details page | ||
And the user clicks on the details regarding the "created" user import | ||
Then the table shows the information about the "created" user "<username>" | ||
|
||
Examples: | ||
| username | | ||
| Testertest | | ||
| Mustertest | | ||
| Neutest | | ||
| Haustest | | ||
|
||
Scenario: after uploading a file a user inspects the user import details page about the skipped accounts | ||
When the user opens the user import details page | ||
And the user clicks on the details regarding the "skipped" user import | ||
Then the table shows the error message "The following columns contained a value that is marked as unique and was already assigned: 'mail'." | ||
|
||
Scenario: after uploading a file a user downloads the import overview | ||
When the user opens the user import details page | ||
And the user downloads the import overview | ||
Then the import result is downloaded and contains information regarding "4" created, "0" updated and "1" skipped accounts in the file "tap_userimport_mailpara.csv" | ||
|
||
Scenario Outline: after uploading a file a user inspects the users page | ||
When the user opens the users page | ||
Then the new user "<username>" was added | ||
|
||
Examples: | ||
| username | | ||
| Testertest | | ||
| Mustertest | | ||
| Neutest | | ||
| Haustest | | ||
|
||
@clean_user_import | ||
Scenario: after uploading a file a user inspects the user import summaries page | ||
When the user opens the user import summaries page | ||
Then a table with the import information "New: 4, Updated: 0, Skipped: 1" regarding the file "tap_userimport_mailpara.csv" is shown |
6 changes: 6 additions & 0 deletions
6
integrationTests/cypress/fixtures/tap_userimport_mailpara.csv
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,6 @@ | ||
displayname,external,mail,pwdreset,surname,username,givenname | ||
Test,TRUE,[email protected],TRUE,Tester,Testertest,Tester | ||
Muster,TRUE,[email protected],TRUE,Muster,Mustertest,Muster | ||
Neu,TRUE,[email protected],TRUE,Neu,Neutest,Neu | ||
Alt,TRUE,[email protected],TRUE,Alt,Alt,Alt | ||
Haus,TRUE,[email protected],TRUE,Haus,Haustest,Haus |
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
Oops, something went wrong.