Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://anonfiles.com/W25eudAfy8/Screenshot_2022-09-29_142738_png
- https://anonfiles.com/a5ja44A7y5/2022-09-30_12-25-20_mkv
- npm install cypress --save-dev
- node_modules/.bin/cypress open
- unter setupNodeEvents in der cypress.config.js datei:
- specPattern: 'cypress/integration/examples/*.js' //path to your tests
- mit node_modules/.bin/cypress run öffnet es die tests nicht im browser zu sehen sondern intern, mit --headed öffnet sich der browser
- mit --browser firefox danach kann man auch den browser ändern
- cypress config:
- const { defineConfig } = require("cypress");
- module.exports = defineConfig({
- projectId: 'wsdbq2',
- e2e: {
- setupNodeEvents(on, config) {
- // implement node event listeners here
- },
- specPattern: 'cypress/integration/examples/*.js',
- viewportWidth: 1740,
- viewportHeight: 1200,
- defaultCommandTimeout: 40000,
- },
- });
- kundenverwaltung
- import 'cypress-wait-until';
- /// <reference types="Cypress" />
- describe('check the items per page, search for niggl michael, create a new berechtigung for him and delete it again', function () {
- it('should visit the site', function () {
- cy.visit('https://dev-ewswebui.ara-portal.de/dashboard')
- cy.wait(1500)
- cy.get('.ng-tns-c108-6.item-level-0 > .mat-ripple').click()
- cy.url().should('include', '/customerManagement')
- cy.wait(800)
- })
- it('should check the "items per page" object', function () {
- cy.get('.mat-form-field-flex').click()
- cy.get('#mat-option-0').click()
- cy.get('.cdk-column-companyNames').should('have.length', 11)
- cy.get('.mat-form-field-flex').click()
- cy.get('#mat-option-1').click()
- cy.get('.cdk-column-companyNames').should('have.length', 26)
- cy.get('.mat-form-field-flex').click()
- cy.get('#mat-option-2').click()
- cy.get('.cdk-column-companyNames').should('have.length', 51)
- })
- it('should search for niggl micheal and wait until his permissions has loaded', function () {
- cy.get('#mat-input-0').type('niggl michael')
- cy.waitUntil(() => cy.get('.clickable > .ng-tns-c544-12').contains('Michael Niggl'))
- })
- it('should create a new permission', function () {
- cy.get('.clickable > .ng-tns-c544-12').click()
- cy.get('.clickable > .mat-focus-indicator').click()
- cy.get('.mat-checkbox-inner-container').click()
- cy.get('#mat-input-2').type('thisIsDefinitlyMyRealEmail@emailthieves.gov')
- cy.get('#mat-input-1').type('ဆောင်းပါးကောင်း အမည်စာရင်းတင်သွင်းခြင်')
- cy.get('.mat-checkbox-inner-container').click()
- cy.get('.mat-dialog-actions > :nth-child(2)').click()
- cy.get(':nth-child(2) > .cdk-column-edit > [mat-icon-button=""][title="Bearbeiten"]').click()
- cy.get('.flex-box > .mat-focus-indicator').click()
- cy.wait(100)
- })
- it('should delete the new permission', function() {
- cy.get('.mat-dialog-actions > :nth-child(2)').click()
- cy.get(':nth-child(2) > .cdk-column-edit > [mat-icon-button=""][title="Löschen"]').click()
- cy.get('.mat-dialog-actions > :nth-child(1)').click()
- cy.wait(100)
- cy.get('.close-button').click()
- })
- })
- massendruck uvi
- /// <reference types="Cypress" />
- import 'cypress-wait-until';
- describe('Should try out filters, select all, deselect all, download all, send one and check the items per page dropdown', function () {
- it('should navigate to Massendruck uVI and select the filters', function () {
- cy.visit('https://dev-ewswebui.ara-portal.de/dashboard')
- cy.wait(1500)
- cy.contains('Massendruck uVI').click()
- cy.get('#mat-select-value-3 > .mat-select-placeholder').click()
- cy.get('#mat-option-3').click()
- cy.get('.mat-select-placeholder').click()
- cy.get('#mat-option-10').click()
- cy.waitUntil(() => cy.get('.cdk-column-propertyManagementAccountNumber').should('have.length', 11))
- cy.get('#mat-checkbox-1 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
- cy.wait(150)
- cy.get('#mat-checkbox-1 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
- cy.get('#mat-checkbox-4 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
- cy.contains('als PDF herunterladen').click()
- cy.get('.mat-dialog-actions > :nth-child(2)').click()
- cy.wait(100)
- cy.get('.mat-dialog-actions > :nth-child(1) > .mat-button-wrapper').click()
- cy.wait(1500)
- cy.get(':nth-child(2) > .cdk-column-percent > div.ng-star-inserted > .mat-focus-indicator').click()
- cy.wait(500)
- cy.get('.cdk-overlay-backdrop').click()
- cy.get('#mat-checkbox-8 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
- cy.get('#mat-checkbox-4 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
- cy.get('.vex-page-layout-content > .mat-focus-indicator.ng-star-inserted').click()
- cy.get('.mat-dialog-actions > :nth-child(2)').click()
- cy.wait(200)
- })
- })
Add Comment
Please, Sign In to add comment