Update to Cypress v10
This commit is contained in:
		
							parent
							
								
									6b71536950
								
							
						
					
					
						commit
						98bcc8da0e
					
				
							
								
								
									
										12
									
								
								.github/workflows/cypress.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										12
									
								
								.github/workflows/cypress.yml
									
									
									
									
										vendored
									
									
								
							@ -36,9 +36,9 @@ jobs:
 | 
			
		||||
          record: true
 | 
			
		||||
          parallel: true
 | 
			
		||||
          spec: |
 | 
			
		||||
            cypress/integration/mainnet/*.spec.ts
 | 
			
		||||
            cypress/integration/signet/*.spec.ts
 | 
			
		||||
            cypress/integration/testnet/*.spec.ts
 | 
			
		||||
            cypress/e2e/mainnet/*.spec.ts
 | 
			
		||||
            cypress/e2e/signet/*.spec.ts
 | 
			
		||||
            cypress/e2e/testnet/*.spec.ts
 | 
			
		||||
          group: Tests on ${{ matrix.browser }} (Mempool)
 | 
			
		||||
          browser: ${{ matrix.browser }}
 | 
			
		||||
          ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
 | 
			
		||||
@ -61,8 +61,8 @@ jobs:
 | 
			
		||||
          record: true
 | 
			
		||||
          parallel: true
 | 
			
		||||
          spec: |
 | 
			
		||||
            cypress/integration/liquid/liquid.spec.ts
 | 
			
		||||
            cypress/integration/liquidtestnet/liquidtestnet.spec.ts
 | 
			
		||||
            cypress/e2e/liquid/liquid.spec.ts
 | 
			
		||||
            cypress/e2e/liquidtestnet/liquidtestnet.spec.ts
 | 
			
		||||
          group: Tests on ${{ matrix.browser }} (Liquid)
 | 
			
		||||
          browser: ${{ matrix.browser }}
 | 
			
		||||
          ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
 | 
			
		||||
@ -84,7 +84,7 @@ jobs:
 | 
			
		||||
          wait-on-timeout: 120
 | 
			
		||||
          record: true
 | 
			
		||||
          parallel: true
 | 
			
		||||
          spec: cypress/integration/bisq/bisq.spec.ts
 | 
			
		||||
          spec: cypress/e2e/bisq/bisq.spec.ts
 | 
			
		||||
          group: Tests on ${{ matrix.browser }} (Bisq)
 | 
			
		||||
          browser: ${{ matrix.browser }}
 | 
			
		||||
          ci-build-id: '${{ github.sha }}-${{ github.workflow }}-${{ github.event_name }}'
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										23
									
								
								frontend/cypress.config.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								frontend/cypress.config.ts
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,23 @@
 | 
			
		||||
import { defineConfig } from 'cypress'
 | 
			
		||||
 | 
			
		||||
export default defineConfig({
 | 
			
		||||
  projectId: 'ry4br7',
 | 
			
		||||
  videosFolder: 'cypress/videos',
 | 
			
		||||
  screenshotsFolder: 'cypress/screenshots',
 | 
			
		||||
  fixturesFolder: 'cypress/fixtures',
 | 
			
		||||
  video: false,
 | 
			
		||||
  retries: {
 | 
			
		||||
    runMode: 3,
 | 
			
		||||
    openMode: 0,
 | 
			
		||||
  },
 | 
			
		||||
  chromeWebSecurity: false,
 | 
			
		||||
  e2e: {
 | 
			
		||||
    // We've imported your old cypress plugins here.
 | 
			
		||||
    // You may want to clean this up later by importing these.
 | 
			
		||||
    setupNodeEvents(on, config) {
 | 
			
		||||
      return require('./cypress/plugins/index.js')(on, config)
 | 
			
		||||
    },
 | 
			
		||||
    baseUrl: 'http://localhost:4200',
 | 
			
		||||
    specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}',
 | 
			
		||||
  },
 | 
			
		||||
})
 | 
			
		||||
@ -1,16 +0,0 @@
 | 
			
		||||
{
 | 
			
		||||
  "projectId": "ry4br7",
 | 
			
		||||
  "integrationFolder": "cypress/integration",
 | 
			
		||||
  "supportFile": "cypress/support/index.ts",
 | 
			
		||||
  "videosFolder": "cypress/videos",
 | 
			
		||||
  "screenshotsFolder": "cypress/screenshots",
 | 
			
		||||
  "pluginsFile": "cypress/plugins/index.js",
 | 
			
		||||
  "fixturesFolder": "cypress/fixtures",
 | 
			
		||||
  "baseUrl": "http://localhost:4200",
 | 
			
		||||
  "video": false,
 | 
			
		||||
  "retries": {
 | 
			
		||||
    "runMode": 3,
 | 
			
		||||
    "openMode": 0
 | 
			
		||||
  },
 | 
			
		||||
  "chromeWebSecurity": false
 | 
			
		||||
}
 | 
			
		||||
@ -35,13 +35,14 @@ describe('Bisq', () => {
 | 
			
		||||
        "Proposal", "Reimbursement request", "Transfer BSQ", "Unlock", "Vote reveal"
 | 
			
		||||
      ];
 | 
			
		||||
      filters.forEach((filter) => {
 | 
			
		||||
        it(`filters the transaction screen by ${filter}`, () => {
 | 
			
		||||
        it.only(`filters the transaction screen by ${filter}`, () => {
 | 
			
		||||
          cy.visit(`${basePath}/transactions`);
 | 
			
		||||
          cy.wait('@txs');
 | 
			
		||||
          cy.waitForSkeletonGone();
 | 
			
		||||
          cy.get('#filter').click();
 | 
			
		||||
          cy.contains(filter).find('input').click();
 | 
			
		||||
          //TODO: change this waiter
 | 
			
		||||
          cy.wait(1000);
 | 
			
		||||
          cy.wait('@txs');
 | 
			
		||||
          cy.wait(500);
 | 
			
		||||
          cy.get('td:nth-of-type(2)').each(($td) => {
 | 
			
		||||
            expect($td.text().trim()).to.eq(filter);
 | 
			
		||||
          });
 | 
			
		||||
@ -56,7 +57,7 @@ describe('Bisq', () => {
 | 
			
		||||
        filters.forEach((filter) => {
 | 
			
		||||
          cy.contains(filter).find('input').click();
 | 
			
		||||
          //TODO: change this waiter
 | 
			
		||||
          cy.wait(1000);
 | 
			
		||||
          cy.wait(1500);
 | 
			
		||||
        });
 | 
			
		||||
        cy.get('td:nth-of-type(2)').each(($td) => {
 | 
			
		||||
          const regex = new RegExp(`${filters.join('|')}`, 'g');
 | 
			
		||||
@ -124,7 +124,7 @@ describe('Liquid', () => {
 | 
			
		||||
        cy.visit(`${basePath}/assets`);
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('.container-xl input').click().type('Liquid Bitcoin').then(() => {
 | 
			
		||||
          cy.get('ngb-typeahead-window').should('have.length', 1);
 | 
			
		||||
          cy.get('ngb-typeahead-window', { timeout: 30000 }).should('have.length', 1);
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
@ -132,7 +132,7 @@ describe('Liquid', () => {
 | 
			
		||||
        cy.visit(`${basePath}/assets`);
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
        cy.get('.container-xl input').click().type('Liquid AUD').then(() => {
 | 
			
		||||
          cy.get('ngb-typeahead-window:nth-of-type(1) button').click();
 | 
			
		||||
          cy.get('ngb-typeahead-window:nth-of-type(1) button', { timeout: 30000 }).click();
 | 
			
		||||
        });
 | 
			
		||||
      });
 | 
			
		||||
    });
 | 
			
		||||
@ -189,7 +189,7 @@ describe('Mainnet', () => {
 | 
			
		||||
        cy.get('[data-cy="tx-2"] .table-tx-vin .highlight').invoke('text').should('contain', `${address}`);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
      it.only('highlights both input and output addresses in the same transaction', () => {
 | 
			
		||||
      it('highlights both input and output addresses in the same transaction', () => {
 | 
			
		||||
        const address = 'bc1q03u63r6hm7a3v6em58zdqtp446w2pw30nm63mv';
 | 
			
		||||
        cy.visit(`/address/${address}`);
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
@ -241,7 +241,7 @@ describe('Mainnet', () => {
 | 
			
		||||
            cy.get('[ngbtooltip="Next Block"] > .ng-fa-icon > .svg-inline--fa').should('not.exist');
 | 
			
		||||
            cy.get('[ngbtooltip="Previous Block"] > .ng-fa-icon > .svg-inline--fa').should('be.visible');
 | 
			
		||||
            cy.document().left();
 | 
			
		||||
            cy.get('.title-block h1').invoke('text').should('equal', 'Next block');
 | 
			
		||||
            cy.get('.title-block h1').invoke('text').should('equal', 'Next Block');
 | 
			
		||||
          });
 | 
			
		||||
        });
 | 
			
		||||
 | 
			
		||||
@ -77,7 +77,7 @@ Cypress.Commands.add('mockMempoolSocket', () => {
 | 
			
		||||
 | 
			
		||||
Cypress.Commands.add('changeNetwork', (network: "testnet" | "signet" | "liquid" | "bisq" | "mainnet") => {
 | 
			
		||||
  cy.get('.dropdown-toggle').click().then(() => {
 | 
			
		||||
        cy.get(`.${network}`).click().then(() => {
 | 
			
		||||
    cy.get(`a.${network}`).click().then(() => {
 | 
			
		||||
      cy.waitForPageIdle();
 | 
			
		||||
      if (network !== 'bisq') {
 | 
			
		||||
        cy.waitForSkeletonGone();
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										14
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14
									
								
								frontend/package-lock.json
									
									
									
										generated
									
									
									
								
							@ -70,7 +70,7 @@
 | 
			
		||||
      },
 | 
			
		||||
      "optionalDependencies": {
 | 
			
		||||
        "@cypress/schematic": "^1.3.0",
 | 
			
		||||
        "cypress": "^9.6.1",
 | 
			
		||||
        "cypress": "^10.0.2",
 | 
			
		||||
        "cypress-fail-on-console-error": "^2.1.3",
 | 
			
		||||
        "cypress-wait-until": "^1.7.1",
 | 
			
		||||
        "mock-socket": "^9.0.3",
 | 
			
		||||
@ -6901,9 +6901,9 @@
 | 
			
		||||
      "devOptional": true
 | 
			
		||||
    },
 | 
			
		||||
    "node_modules/cypress": {
 | 
			
		||||
      "version": "9.6.1",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.6.1.tgz",
 | 
			
		||||
      "integrity": "sha512-ECzmV7pJSkk+NuAhEw6C3D+RIRATkSb2VAHXDY6qGZbca/F9mv5pPsj2LO6Ty6oIFVBTrwCyL9agl28MtJMe2g==",
 | 
			
		||||
      "version": "10.0.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.0.2.tgz",
 | 
			
		||||
      "integrity": "sha512-7+C4KHYBcfZrawss+Gt5PlS35rfc6ySc59JcHDVsIMm1E/J35dqE41UEXpdtwIq3549umCerNWnFADzqib4kcA==",
 | 
			
		||||
      "hasInstallScript": true,
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "dependencies": {
 | 
			
		||||
@ -22471,9 +22471,9 @@
 | 
			
		||||
      "devOptional": true
 | 
			
		||||
    },
 | 
			
		||||
    "cypress": {
 | 
			
		||||
      "version": "9.6.1",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/cypress/-/cypress-9.6.1.tgz",
 | 
			
		||||
      "integrity": "sha512-ECzmV7pJSkk+NuAhEw6C3D+RIRATkSb2VAHXDY6qGZbca/F9mv5pPsj2LO6Ty6oIFVBTrwCyL9agl28MtJMe2g==",
 | 
			
		||||
      "version": "10.0.2",
 | 
			
		||||
      "resolved": "https://registry.npmjs.org/cypress/-/cypress-10.0.2.tgz",
 | 
			
		||||
      "integrity": "sha512-7+C4KHYBcfZrawss+Gt5PlS35rfc6ySc59JcHDVsIMm1E/J35dqE41UEXpdtwIq3549umCerNWnFADzqib4kcA==",
 | 
			
		||||
      "optional": true,
 | 
			
		||||
      "requires": {
 | 
			
		||||
        "@cypress/request": "^2.88.10",
 | 
			
		||||
 | 
			
		||||
@ -122,7 +122,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "optionalDependencies": {
 | 
			
		||||
    "@cypress/schematic": "^1.3.0",
 | 
			
		||||
    "cypress": "^9.6.1",
 | 
			
		||||
    "cypress": "^10.0.2",
 | 
			
		||||
    "cypress-fail-on-console-error": "^2.1.3",
 | 
			
		||||
    "cypress-wait-until": "^1.7.1",
 | 
			
		||||
    "mock-socket": "^9.0.3",
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user