Skip to content

Commit

Permalink
cypress test update + docs
Browse files Browse the repository at this point in the history
  • Loading branch information
davidzynda committed Aug 3, 2023
1 parent bc837cf commit 3cb883a
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 25 deletions.
18 changes: 4 additions & 14 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@
*/


import { defineConfig } from "cypress";

export default defineConfig({
// e2e: {
// setupNodeEvents(on, config) {
// // implement node event listeners here
// },
// },
chromeWebSecurity: false,
const { defineConfig } = require('cypress')

module.exports = defineConfig({
e2e: {
baseUrl: 'http://localhost:8080',
setupNodeEvents() {
// implement node event listeners here
},
baseUrl: 'https://materialpass.beta.demo.catena-x.net/',
},
});
})
17 changes: 7 additions & 10 deletions cypress/e2e/sign-in/e2e.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,16 @@
/* eslint-disable no-undef */
describe("e2e test", () => {
before(() => {
cy.visit("http://localhost:8080");
cy.visit("https://materialpass.beta.demo.catena-x.net/");
cy.get(".search").type("CX-test"); // typing company name
cy.get(".CX_Test_Access").click(); // btn click
});
it("Sign in and battery select", () => {
cy.origin("https://centralidp.dev.demo.catena-x.net/auth/realms/CX-Central/", () => {
cy.get('.CX_Test_Access').click(); // btn click

});
cy.origin("https://sharedidp.dev.demo.catena-x.net/auth/", () => {
cy.get('#username').type("company 2 user"); // typing username
cy.get('#password').type("changeme"); // typing password
cy.get('#kc-login').click(); // btn click
})
cy.get('#input-7').type("NCR186850B"); // typing username
cy.get('#username').type("company 2 user"); // typing username
cy.get('#password').type("changeme"); // typing password
cy.get('#kc-login').click(); // btn click
cy.get('#input-4').type("NCR186850B"); // typing battery ID
cy.get('#search-btn').click(); // btn click
cy.wait(30000); // timeout for loading
cy.get('[data-cy="battery-id"]'); // 1. General information first field check
Expand Down
2 changes: 1 addition & 1 deletion docs/cypress/CYPRESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ This is the documentation for Battery Passport App E2E Cypress test.

## Steps tested

![test](./test2.png)
![test](./test.png)
</br></br>
Binary file modified docs/cypress/GUI-passing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/cypress/test.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed docs/cypress/test2.png
Binary file not shown.

0 comments on commit 3cb883a

Please sign in to comment.