mirror of https://github.com/vector-im/riot-web
				
				
				
			Merge branch 'develop' into widget_state_no_update_invitation_room
						commit
						7c24e8ce01
					
				| 
						 | 
				
			
			@ -84,14 +84,16 @@ jobs:
 | 
			
		|||
            actions: read
 | 
			
		||||
            issues: read
 | 
			
		||||
            pull-requests: read
 | 
			
		||||
        environment:
 | 
			
		||||
            Cypress
 | 
			
		||||
            #strategy:
 | 
			
		||||
            #    fail-fast: false
 | 
			
		||||
            #    matrix:
 | 
			
		||||
            #      # Run 4 instances in Parallel
 | 
			
		||||
            #      runner: [1, 2, 3, 4]
 | 
			
		||||
        environment: Cypress
 | 
			
		||||
        strategy:
 | 
			
		||||
            fail-fast: false
 | 
			
		||||
            matrix:
 | 
			
		||||
                # Run 4 instances in Parallel
 | 
			
		||||
                runner: [1, 2, 3, 4]
 | 
			
		||||
        steps:
 | 
			
		||||
            - uses: browser-actions/setup-chrome@latest
 | 
			
		||||
            - run: echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
 | 
			
		||||
 | 
			
		||||
            - uses: tecolicom/actions-use-apt-tools@v1
 | 
			
		||||
              with:
 | 
			
		||||
                  # Our test suite includes some screenshot tests with unusual diacritics, which are
 | 
			
		||||
| 
						 | 
				
			
			@ -121,14 +123,12 @@ jobs:
 | 
			
		|||
              with:
 | 
			
		||||
                  # The built-in Electron runner seems to grind to a halt trying
 | 
			
		||||
                  # to run the tests, so use chrome.
 | 
			
		||||
                  browser: chrome
 | 
			
		||||
                  browser: "${{ env.BROWSER_PATH }}"
 | 
			
		||||
                  start: npx serve -p 8080 webapp
 | 
			
		||||
                  wait-on: "http://localhost:8080"
 | 
			
		||||
                  record:
 | 
			
		||||
                      true
 | 
			
		||||
                      #parallel: true
 | 
			
		||||
                      #command-prefix: 'yarn percy exec --parallel --'
 | 
			
		||||
                  command-prefix: "yarn percy exec --"
 | 
			
		||||
                  record: true
 | 
			
		||||
                  parallel: true
 | 
			
		||||
                  command-prefix: "yarn percy exec --parallel --"
 | 
			
		||||
                  config: '{"reporter":"cypress-multi-reporters", "reporterOptions": { "configFile": "cypress-ci-reporter-config.json" } }'
 | 
			
		||||
                  ci-build-id: ${{ needs.prepare.outputs.uuid }}
 | 
			
		||||
              env:
 | 
			
		||||
| 
						 | 
				
			
			@ -151,6 +151,8 @@ jobs:
 | 
			
		|||
                  COMMIT_INFO_MESSAGE: ${{ needs.prepare.outputs.commit_message }}
 | 
			
		||||
                  COMMIT_INFO_AUTHOR: ${{ needs.prepare.outputs.commit_author }}
 | 
			
		||||
                  COMMIT_INFO_EMAIL: ${{ needs.prepare.outputs.commit_email }}
 | 
			
		||||
                  CYPRESS_PULL_REQUEST_ID: ${{ needs.prepare.outputs.pr_id }}
 | 
			
		||||
                  CYPRESS_PULL_REQUEST_URL: https://github.com/${{ github.repository }}/pull/${{ needs.prepare.outputs.pr_id }}
 | 
			
		||||
 | 
			
		||||
                  # pass the Percy token as an environment variable
 | 
			
		||||
                  PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
 | 
			
		||||
| 
						 | 
				
			
			@ -159,9 +161,8 @@ jobs:
 | 
			
		|||
                  # tell Percy more details about the context of this run
 | 
			
		||||
                  PERCY_BRANCH: ${{ github.event.workflow_run.head_branch }}
 | 
			
		||||
                  PERCY_COMMIT: ${{ github.event.workflow_run.head_sha }}
 | 
			
		||||
                  PERCY_PULL_REQUEST:
 | 
			
		||||
                      ${{ needs.prepare.outputs.pr_id }}
 | 
			
		||||
                      #PERCY_PARALLEL_TOTAL: ${{ strategy.job-total }}
 | 
			
		||||
                  PERCY_PULL_REQUEST: ${{ needs.prepare.outputs.pr_id }}
 | 
			
		||||
                  PERCY_PARALLEL_TOTAL: ${{ strategy.job-total }}
 | 
			
		||||
                  PERCY_PARALLEL_NONCE: ${{ needs.prepare.outputs.uuid }}
 | 
			
		||||
 | 
			
		||||
            - name: Upload Artifact
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -27,7 +27,6 @@ export default defineConfig({
 | 
			
		|||
            return require("./cypress/plugins/index.ts").default(on, config);
 | 
			
		||||
        },
 | 
			
		||||
        baseUrl: "http://localhost:8080",
 | 
			
		||||
        experimentalSessionAndOrigin: true,
 | 
			
		||||
        specPattern: "cypress/e2e/**/*.{js,jsx,ts,tsx}",
 | 
			
		||||
    },
 | 
			
		||||
    env: {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -82,9 +82,27 @@ function sendActionFromIntegrationManager(integrationManagerUrl: string, targetR
 | 
			
		|||
    });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function clickUntilGone(selector: string, attempt = 0) {
 | 
			
		||||
    if (attempt === 11) {
 | 
			
		||||
        throw new Error("clickUntilGone attempt count exceeded");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    cy.get(selector)
 | 
			
		||||
        .last()
 | 
			
		||||
        .click()
 | 
			
		||||
        .then(($button) => {
 | 
			
		||||
            const exists = Cypress.$(selector).length > 0;
 | 
			
		||||
            if (exists) {
 | 
			
		||||
                clickUntilGone(selector, ++attempt);
 | 
			
		||||
            }
 | 
			
		||||
        });
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
function expectKickedMessage(shouldExist: boolean) {
 | 
			
		||||
    // Expand any event summaries
 | 
			
		||||
    cy.get(".mx_GenericEventListSummary_toggle[aria-expanded=false]").click({ multiple: true });
 | 
			
		||||
    // Expand any event summaries, we can't use a click multiple here because clicking one might de-render others
 | 
			
		||||
    // This is quite horrible but seems the most stable way of clicking 0-N buttons,
 | 
			
		||||
    // one at a time with a full re-evaluation after each click
 | 
			
		||||
    clickUntilGone(".mx_GenericEventListSummary_toggle[aria-expanded=false]");
 | 
			
		||||
 | 
			
		||||
    // Check for the event message (or lack thereof)
 | 
			
		||||
    cy.contains(".mx_EventTile_line", `${USER_DISPLAY_NAME} removed ${BOT_DISPLAY_NAME}: ${KICK_REASON}`).should(
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -177,7 +177,7 @@
 | 
			
		|||
        "babel-jest": "^29.0.0",
 | 
			
		||||
        "blob-polyfill": "^7.0.0",
 | 
			
		||||
        "chokidar": "^3.5.1",
 | 
			
		||||
        "cypress": "^11.0.0",
 | 
			
		||||
        "cypress": "^12.0.0",
 | 
			
		||||
        "cypress-axe": "^1.0.0",
 | 
			
		||||
        "cypress-multi-reporters": "^1.6.1",
 | 
			
		||||
        "cypress-real-events": "^1.7.1",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -3555,10 +3555,10 @@ cypress-real-events@^1.7.1:
 | 
			
		|||
  resolved "https://registry.yarnpkg.com/cypress-real-events/-/cypress-real-events-1.7.4.tgz#87780ee0f6669ee30ce52016c4bfc94d094a6e3d"
 | 
			
		||||
  integrity sha512-bAlIf3w6uJa72hcbLFpQIl/hBoNGYnSVzFMgohefWcooyZz2WbFZdFAEDOl5qOPATtAU01o92sWvc2QW9eT8aA==
 | 
			
		||||
 | 
			
		||||
cypress@^11.0.0:
 | 
			
		||||
  version "11.2.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/cypress/-/cypress-11.2.0.tgz#63edef8c387b687066c5493f6f0ad7b9ced4b2b7"
 | 
			
		||||
  integrity sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==
 | 
			
		||||
cypress@^12.0.0:
 | 
			
		||||
  version "12.3.0"
 | 
			
		||||
  resolved "https://registry.yarnpkg.com/cypress/-/cypress-12.3.0.tgz#ae3fb0540aef4b5eab1ef2bcd0760caf2992b8bf"
 | 
			
		||||
  integrity sha512-ZQNebibi6NBt51TRxRMYKeFvIiQZ01t50HSy7z/JMgRVqBUey3cdjog5MYEbzG6Ktti5ckDt1tfcC47lmFwXkw==
 | 
			
		||||
  dependencies:
 | 
			
		||||
    "@cypress/request" "^2.88.10"
 | 
			
		||||
    "@cypress/xvfb" "^1.2.4"
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue