argui

cypress

Sep 29th, 2022 (edited)
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JavaScript 5.20 KB | Source Code | 0 0
  1. https://anonfiles.com/W25eudAfy8/Screenshot_2022-09-29_142738_png
  2. https://anonfiles.com/a5ja44A7y5/2022-09-30_12-25-20_mkv
  3.  
  4. npm install cypress --save-dev
  5. node_modules/.bin/cypress open
  6.  
  7. unter setupNodeEvents in der cypress.config.js datei:
  8. specPattern: 'cypress/integration/examples/*.js' //path to your tests
  9. mit node_modules/.bin/cypress run öffnet es die tests nicht im browser zu sehen sondern intern, mit --headed öffnet sich der browser
  10. mit --browser firefox danach kann man auch den browser ändern
  11.  
  12.  
  13. cypress config:
  14. const { defineConfig } = require("cypress");
  15.  
  16. module.exports = defineConfig({
  17.   projectId: 'wsdbq2',
  18.   e2e: {
  19.     setupNodeEvents(on, config) {
  20.       // implement node event listeners here
  21.     },
  22.     specPattern: 'cypress/integration/examples/*.js',
  23.     viewportWidth: 1740,
  24.     viewportHeight: 1200,
  25.     defaultCommandTimeout: 40000,
  26.   },
  27. });
  28.  
  29.  
  30.  
  31.  
  32.  
  33. kundenverwaltung
  34.  
  35. import 'cypress-wait-until';
  36. /// <reference types="Cypress" />
  37.  
  38. describe('check the items per page, search for niggl michael, create a new berechtigung for him and delete it again', function () {
  39.  
  40.         it('should visit the site', function () {
  41.         cy.visit('https://dev-ewswebui.ara-portal.de/dashboard')
  42.         cy.wait(1500)
  43.         cy.get('.ng-tns-c108-6.item-level-0 > .mat-ripple').click()
  44.         cy.url().should('include', '/customerManagement')
  45.         cy.wait(800)
  46.         })
  47.  
  48.         it('should check the "items per page" object', function () {
  49.         cy.get('.mat-form-field-flex').click()
  50.         cy.get('#mat-option-0').click()
  51.         cy.get('.cdk-column-companyNames').should('have.length', 11)
  52.         cy.get('.mat-form-field-flex').click()
  53.         cy.get('#mat-option-1').click()
  54.         cy.get('.cdk-column-companyNames').should('have.length', 26)
  55.         cy.get('.mat-form-field-flex').click()
  56.         cy.get('#mat-option-2').click()
  57.         cy.get('.cdk-column-companyNames').should('have.length', 51)
  58.         })
  59.  
  60.         it('should search for niggl micheal and wait until his permissions has loaded', function () {
  61.         cy.get('#mat-input-0').type('niggl michael')
  62.         cy.waitUntil(() => cy.get('.clickable > .ng-tns-c544-12').contains('Michael Niggl'))
  63.         })
  64.  
  65.         it('should create a new permission', function () {
  66.         cy.get('.clickable > .ng-tns-c544-12').click()
  67.         cy.get('.clickable > .mat-focus-indicator').click()
  68.         cy.get('.mat-checkbox-inner-container').click()
  69.         cy.get('#mat-input-2').type('thisIsDefinitlyMyRealEmail@emailthieves.gov')
  70.         cy.get('#mat-input-1').type('ဆောင်းပါးကောင်း အမည်စာရင်းတင်သွင်းခြင်')
  71.         cy.get('.mat-checkbox-inner-container').click()
  72.         cy.get('.mat-dialog-actions > :nth-child(2)').click()
  73.         cy.get(':nth-child(2) > .cdk-column-edit > [mat-icon-button=""][title="Bearbeiten"]').click()
  74.         cy.get('.flex-box > .mat-focus-indicator').click()
  75.         cy.wait(100)
  76.         })
  77.  
  78.         it('should delete the new permission', function() {
  79.         cy.get('.mat-dialog-actions > :nth-child(2)').click()
  80.         cy.get(':nth-child(2) > .cdk-column-edit > [mat-icon-button=""][title="Löschen"]').click()
  81.         cy.get('.mat-dialog-actions > :nth-child(1)').click()
  82.         cy.wait(100)
  83.         cy.get('.close-button').click()
  84.         })
  85.     })
  86.  
  87.  
  88.  
  89.  
  90.     massendruck uvi
  91.  
  92. /// <reference types="Cypress" />
  93. import 'cypress-wait-until';
  94.  
  95.  
  96. describe('Should try out filters, select all, deselect all, download all, send one and check the items per page dropdown', function () {
  97.  
  98.     it('should navigate to Massendruck uVI and select the filters', function () {
  99.         cy.visit('https://dev-ewswebui.ara-portal.de/dashboard')
  100.         cy.wait(1500)
  101.         cy.contains('Massendruck uVI').click()
  102.         cy.get('#mat-select-value-3 > .mat-select-placeholder').click()
  103.         cy.get('#mat-option-3').click()
  104.         cy.get('.mat-select-placeholder').click()
  105.         cy.get('#mat-option-10').click()
  106.         cy.waitUntil(() => cy.get('.cdk-column-propertyManagementAccountNumber').should('have.length', 11))
  107.         cy.get('#mat-checkbox-1 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
  108.         cy.wait(150)
  109.         cy.get('#mat-checkbox-1 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
  110.         cy.get('#mat-checkbox-4 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
  111.         cy.contains('als PDF herunterladen').click()
  112.         cy.get('.mat-dialog-actions > :nth-child(2)').click()
  113.         cy.wait(100)
  114.         cy.get('.mat-dialog-actions > :nth-child(1) > .mat-button-wrapper').click()
  115.         cy.wait(1500)
  116.         cy.get(':nth-child(2) > .cdk-column-percent > div.ng-star-inserted > .mat-focus-indicator').click()
  117.         cy.wait(500)
  118.         cy.get('.cdk-overlay-backdrop').click()
  119.         cy.get('#mat-checkbox-8 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
  120.         cy.get('#mat-checkbox-4 > .mat-checkbox-layout > .mat-checkbox-inner-container').click()
  121.         cy.get('.vex-page-layout-content > .mat-focus-indicator.ng-star-inserted').click()
  122.         cy.get('.mat-dialog-actions > :nth-child(2)').click()
  123.         cy.wait(200)
  124.     })
  125.  
  126.  
  127. })
Add Comment
Please, Sign In to add comment