Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Use Java 17 base image ([#77](https://github.com/cloudogu/scm/pull/77))

### Fixed
- [#78] Integration tests after upgrading CAS

## [2.44.2-2]
### Added
- [#72] Configuration options for resource requirements
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ node('vagrant') {
}

stage('e2e Tests') {
ecoSystem.runCypressIntegrationTests([cypressImage: "cypress/included:8.6.0", enableVideo: true, enableScreenshots: true])
ecoSystem.runCypressIntegrationTests([cypressImage: "cypress/included:12.17.1", enableVideo: true, enableScreenshots: true])
}

stage('Push changes to remote repository') {
Expand Down
3 changes: 3 additions & 0 deletions integrationTests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
cypress/videos
cypress/screenshots
37 changes: 37 additions & 0 deletions integrationTests/cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
const doguTestLibrary = require('@cloudogu/dogu-integration-test-library');
const { defineConfig } = require('cypress');
const createBundler = require("@bahmutov/cypress-esbuild-preprocessor");
const preprocessor = require("@badeball/cypress-cucumber-preprocessor");
const createEsbuildPlugin = require("@badeball/cypress-cucumber-preprocessor/esbuild");

async function setupNodeEvents(on, config) {
// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await preprocessor.addCucumberPreprocessorPlugin(on, config);

on(
"file:preprocessor",
createBundler({
plugins: [createEsbuildPlugin.default(config)],
})
);

config = doguTestLibrary.configure(config);

return config;
}

module.exports = defineConfig({
e2e: {
baseUrl: 'https://192.168.56.2',
env: {
"DoguName": "scm",
"MaxLoginRetries": 3,
"AdminUsername": "ces-admin",
"AdminPassword": "ecosystem2016",
"AdminGroup": "CesAdministrators"
},
videoCompression: false,
specPattern: ["cypress/e2e/**/*.feature"],
setupNodeEvents,
},
});
13 changes: 0 additions & 13 deletions integrationTests/cypress.json

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ Feature: Browser-based CAS login and logout functionality
Scenario: logged out user can log in to the dogu
Given the user is logged out of the CES
When the user opens the dogu start page
And the user types in correct login credentials
And the user clicks the login button
And the test user logs in with correct credentials
Then the user is logged in to the dogu

@requires_testuser
Scenario: logged out user can not log in to the dogu with wrong credentials
Given the user is logged out of the CES
When the user opens the dogu start page
And the user types in wrong login credentials
And the user clicks the login button
And the user logs in with wrong credentials
Then the login page informs the user about invalid credentials

@requires_testuser
Expand Down
11 changes: 0 additions & 11 deletions integrationTests/cypress/plugins/index.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
const {
When, Then
} = require("@badeball/cypress-cucumber-preprocessor");

// Loads all steps from the dogu integration library into this project
const doguTestLibrary = require('@cloudogu/dogu-integration-test-library')
doguTestLibrary.registerSteps()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { Then } = require("cypress-cucumber-preprocessor/steps");
const { Then } = require("@badeball/cypress-cucumber-preprocessor");

Then("the user can access the index", () => {
cy.getIndex().then((response) => {
Expand Down
10 changes: 6 additions & 4 deletions integrationTests/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"license": "MIT",
"dependencies": {
"cypress": "8.6.0",
"cypress-cucumber-preprocessor": "4.1.0",
"@cloudogu/dogu-integration-test-library": "1.0.0"
"@badeball/cypress-cucumber-preprocessor": "^16.0.0",
"@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
"@cloudogu/dogu-integration-test-library": "6.0.1",
"cypress": "^12.9.0",
"@bahmutov/cy-api": "^2.2.4"
},
"scripts": {
"updateTests": "mkdir -p cypress/integration/dogu_integration_test_lib && cp -r node_modules/@cloudogu/dogu-integration-test-library/lib/integration/* cypress/integration/dogu_integration_test_lib"
"updateTests": "mkdir -p cypress/e2e/dogu_integration_test_lib && cp -r node_modules/@cloudogu/dogu-integration-test-library/lib/integration/* cypress/e2e/dogu_integration_test_lib"
}
}
Loading