Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Use cypress-terminal-report #11226

Merged
merged 4 commits into from
Jul 11, 2023
Merged

Use cypress-terminal-report #11226

merged 4 commits into from
Jul 11, 2023

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Jul 11, 2023

This cypress plugin gives nice console logs about what is happening: I hope it will help us debug mysteriously failing tests.

In its default config, it only logs for failing tests.


This change is marked as an internal change (Task), so will not be included in the changelog.

This cypress plugin gives nice console logs about what is happening: I hope it
will help us debug mysteriously failing tests.

In its default config, it only logs for failing tests.
@richvdh richvdh requested review from a team as code owners July 11, 2023 12:49
@richvdh richvdh requested a review from germain-gg July 11, 2023 12:49
@richvdh richvdh added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label Jul 11, 2023
@richvdh richvdh requested a review from andybalaam July 11, 2023 12:49
Comment on lines +42 to +44
// disable logging of HTTP requests made to the Cypress server. They are noisy and not very helpful.
// @ts-ignore https://github.com/cypress-io/cypress/issues/26284
morgan: false,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this disables the HTTP 7/10/2023 9:21:09 PM 127.0.0.1 GET /sw.js spam that cypress normally writes

Copy link
Member

@t3chguy t3chguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Breaks console logging from plugins & axe.ts (terminalLog)

@richvdh
Copy link
Member Author

richvdh commented Jul 11, 2023

Breaks console logging from plugins & axe.ts (terminalLog)

No it doesn't. I thought it did but that's because I can't read.

@t3chguy
Copy link
Member

t3chguy commented Jul 11, 2023

image

We probably don't need to bridge console.debug from the webapp into STDOUT

@richvdh
Copy link
Member Author

richvdh commented Jul 11, 2023

To expand a bit more on the warning about console.log in the project's readme: if you look at the issue that resulted in the warning, the complaint is "I'm using console.log in my tests but the logs aren't hitting the terminal). That's to be expected because:

  • those console.logs are running in the browser context, so do not reach stdout (because browsers do not write their console logs to stdout
  • but they are outside the context of the application under test - so they are not intercepted by cypress-terminal-report.

That situation is quite different to the use of console.log in our plugins, where the console.log is running in the node context, so will hit stdout by default (and cypress-terminal-report does nothing to change that).

@t3chguy
Copy link
Member

t3chguy commented Jul 11, 2023

It seems to make axe failures much harder to read

Before
image

After

Copy /Users/t3chguy/WebstormProjects/matrix-react-sdk/cypress/plugins/synapsedocker/templates/default -> /var/folders/gm/y_c_9xc962g1ryjdx78d8hfm0000gn/T/react-sdk-synapsedocker-EWupdK
Gen /Users/t3chguy/WebstormProjects/matrix-react-sdk/cypress/plugins/synapsedocker/templates/default/homeserver.yaml
Gen /Users/t3chguy/WebstormProjects/matrix-react-sdk/cypress/plugins/synapsedocker/templates/default/localhost.signing.key
Starting synapse with config dir /var/folders/gm/y_c_9xc962g1ryjdx78d8hfm0000gn/T/react-sdk-synapsedocker-EWupdK...
Started synapse with id f3fa32e6a7411d09ed4c49ef61f4ed550881219c8abc45415114a054a5daff3e on port 50858.
1 accessibility violation was detected
┌─────────┬──────────────────┬───────────┬───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┬───────┐
│ (index) │        id        │  impact   │                                                    description                                                    │ nodes │
├─────────┼──────────────────┼───────────┼───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┼───────┤
│    0    │ 'color-contrast' │ 'serious' │ 'Ensures the contrast between foreground and background colors meets WCAG 2 AA minimum contrast ratio thresholds' │   2   │
└─────────┴──────────────────┴───────────┴───────────────────────────────────────────────────────────────────────────────────────────────────────────────────┴───────┘
Stopped synapse id f3fa32e6a7411d09ed4c49ef61f4ed550881219c8abc45415114a054a5daff3e.
      cy:intercept ➟  Matcher: {"method":"GET","pathname":"/config.json"}
                      Mocked Response: {"body":{"default_server_config":{"m.homeserver":{"base_url":"https://server.invalid"}},"map_style_url":"https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"}}
        cy:command ✔  startHomeserver   Started homeserver instance f3fa32e6a7411d09ed4c49ef61f4ed550881219c8abc45415114a054a5daff3e
        cy:command ✔  initTestUser      Object{5}, Alan
        cy:request ✔  [object Object]
                      Status: 200
                      Response body: {
                        "nonce": "f585f75c49bc04ff07df7efded47213e4e4da734829216702a5220808c48a554fe2baf9c72bc61b29159eb163f626a1f742609861892881d96e7456b01babc70"
                      }
        cy:request ✔  POST http://localhost:50858/_synapse/admin/v1/register
                      Status: 200
                      Response body: {
                        "user_id": "@user_3:localhost",
                        "home_server": "localhost",
                        "access_token": "syt_dXNlcl8z_ZxTfvXUTgyjXUVeJNwkh_3T677U",
                        "device_id": "IZMNDUWCBQ"
                      }
        cy:request ✔  POST http://localhost:50858/_matrix/client/r0/login
                      Status: 200
                      Response body: {
                        "user_id": "@user_3:localhost",
                        "access_token": "syt_dXNlcl8z_ksmGPwLidTHpkGmiUmzs_2SxKzF",
                        "home_server": "localhost",
                        "device_id": "KPZAJZDXEN",
                        "well_known": {
                          "m.homeserver": {
                            "base_url": "http://localhost:50858/"
                          }
                        }
                      }
            cy:log ✱  Registered test user user_3 with displayname Alan
        cy:command ✔  visit     /
          cons:log ✱  [HMR] Waiting for update signal from WDS...
         cons:info ✱  %cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools,
                      font-weight:bold
        cons:debug ⚈  Initialised rageshake.
        cons:debug ⚈  To fix line numbers in Chrome: Meatball menu → Settings → Ignore list → Add /rageshake\.js$
        cons:debug ⚈  Using Web platform
            cy:xhr ➟  GET http://localhost:8080/sockjs-node/info?t=1689081543752
                      Status: 200
          cy:fetch ➟  GET http://localhost:8080/olm.82e831a.wasm
                      Status: 200
        cy:command ✔  get       .mx_MatrixChat
          cy:fetch ❖  GET http://localhost:8080/config.localhost.json?cachebuster=1689081543897
                      Status: 404
         cons:info ✱  [WDS] Hot Module Replacement enabled.
         cons:info ✱  [WDS] Live Reloading enabled.
          cy:fetch ➟  STUBBED GET http://localhost:8080/config.json?cachebuster=1689081543897
                      Status: 200
         cons:warn ❖  No bug report endpoint set - logs will not be persisted
        cons:debug ⚈  Using WebAssembly Olm
          cy:fetch ➟  GET http://localhost:8080/i18n/languages.268a045.json
                      Status: 200
          cy:fetch ➟  GET http://localhost:8080/i18n/en_EN.31f4252.json
                      Status: 200
        cons:debug ⚈  set language to en
        cons:debug ⚈  Application is running in development mode
        cons:debug ⚈  Vector starting at http://localhost:8080/
          cons:log ✱  startUpdater, current version is !!UNSET!!
        cons:debug ⚈  Verifying homeserver configuration
        cons:debug ⚈  Config uses a default_server_config - validating object
          cy:fetch ➟  GET http://localhost:8080/img/download.a6b50e0.svg
                      Status: 200
        cons:error ✘  Failed to poll for update,
                      {
                        "status": 404
                      }
        cons:error ✘  Invalid /versions response
        cons:error ✘  Error processing homeserver config:,
                      {
                        "state": "FAIL_ERROR",
                        "error": "Homeserver URL does not appear to be a valid Matrix homeserver",
                        "base_url": "https://server.invalid"
                      }
        cons:debug ⚈  Using homeserver config:,
                      {
                        "hsUrl": "https://server.invalid",
                        "hsName": "server.invalid",
                        "hsNameIsDifferent": false,
                        "isDefault": true,
                        "warning": "Homeserver URL does not appear to be a valid Matrix homeserver",
                        "isNameResolvable": true
                      }
        cons:debug ⚈  Updating SdkConfig with validated discovery information
          cy:fetch ❖  GET http://localhost:8080/version
                      Status: 404
          cy:fetch ✘  GET https://server.invalid/_matrix/client/versions - getaddrinfo ENOTFOUND server.invalid
        cons:debug ⚈  No pickle key available
        cons:debug ⚈  Restoring session for @user_3:localhost
        cons:debug ⚈  setLoggedIn: mxid: @user_3:localhost deviceId: KPZAJZDXEN guest: false hs: http://localhost:50858 softLogout: false,
                       freshLogin: false
        cons:debug ⚈  StorageManager: Checking storage consistency
        cons:debug ⚈  StorageManager: Local storage supported? true
        cons:debug ⚈  StorageManager: IndexedDB supported? true
        cons:debug ⚈  StorageManager: Local storage contains data? true
        cons:debug ⚈  StorageManager: Crypto initialised? false
        cons:debug ⚈  StorageManager: Sync store using IndexedDB contains data? false
        cons:debug ⚈  StorageManager: Crypto store using IndexedDB contains data? false
        cons:debug ⚈  StorageManager: Storage consistency checks passed
        cons:debug ⚈  Session persisted for @user_3:localhost
        cons:debug ⚈  Lifecycle: Starting MatrixClient
        cons:debug ⚈  EventIndex: Platform doesn't support event indexing, not initializing.
        cons:debug ⚈  IndexedDBStore.startup: connecting to backend
        cons:debug ⚈  MatrixClientPeg: waiting for MatrixClient store to initialise
        cons:debug ⚈  StorageManager: Persistent?,
                      true
        cons:debug ⚈  newscreen home
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/thirdparty/protocols
                      Status: 200
        cy:command ✔  new url   http://localhost:8080/#/home
        cons:debug ⚈  IndexedDB worker is ready
        cons:debug ⚈  IndexedDBStore.startup: loading presence events
        cons:debug ⚈  IndexedDBStore.startup: processing presence events
        cons:debug ⚈  Crypto: Starting up crypto store...
        cons:debug ⚈  connecting to indexeddb matrix-js-sdk:crypto
        cons:debug ⚈  Upgrading IndexedDBCryptoStore from version 0 to 11
        cons:debug ⚈  connected to indexeddb matrix-js-sdk:crypto
        cons:debug ⚈  Crypto: initialising roomlist...
        cons:debug ⚈  Crypto: initialising crypto object...
        cons:debug ⚈  Crypto: initialising Olm...
        cons:debug ⚈  Crypto: initialising Olm device...
        cons:debug ⚈  Crypto: loading device list...
        cons:debug ⚈  Crypto: fetching own devices...
        cons:debug ⚈  Crypto: adding this device to the store...
        cons:debug ⚈  Now tracking device list for @user_3:localhost
        cons:debug ⚈  Crypto: checking for key backup...
        cons:debug ⚈  Checking key backup status...
        cons:debug ⚈  MatrixClientPeg: really starting MatrixClient
        cons:debug ⚈  Fetching new TURN credentials
          cy:fetch ❖  GET http://localhost:50858/_matrix/client/v3/room_keys/version
                      Status: 404
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/versions
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/voip/turnServer
                      Status: 200
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/keys/upload
                      Status: 200
         cons:info ✱  Key backup is absent or missing required data
        cons:debug ⚈  No usable key backup: not enabling key backup
        cons:debug ⚈  Getting saved sync token...
        cons:debug ⚈  Getting push rules...
        cons:debug ⚈  Attempting to send queued to-device messages
        cons:debug ⚈  MatrixClientPeg: MatrixClient started
        cons:debug ⚈  Attempting to get Jitsi conference information from homeserver
        cons:debug ⚈  Jitsi conference domain:,
                      meet.element.io
        cons:debug ⚈  Got saved sync token
        cons:debug ⚈  Got reply from saved sync, exists? false
        cons:debug ⚈  All queued to-device messages sent
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/pushrules/
                      Status: 200
          cy:fetch ✘  GET https://localhost/.well-known/matrix/client - connect ECONNREFUSED ::1:443
         cons:warn ❖  Adding default global override for .org.matrix.msc3952.is_user_mention
         cons:warn ❖  Adding default global override for .org.matrix.msc3952.is_room_mention
         cons:warn ❖  Adding default global override for .org.matrix.msc3786.rule.room.server_acl
         cons:warn ❖  Adding default global underride for .org.matrix.msc3914.rule.room.call
        cons:debug ⚈  Got push rules
        cons:debug ⚈  Checking lazy load status...
        cons:debug ⚈  Checking server lazy load support...
        cons:debug ⚈  Enabling lazy load on sync filter...
        cons:debug ⚈  Checking whether lazy loading has changed in store...
        cons:debug ⚈  Updating homeserver-configured integration managers...
        cons:debug ⚈  Homeserver has no integration managers
        cons:debug ⚈  Attempting to get Jitsi conference information from homeserver
        cons:debug ⚈  Jitsi conference domain:,
                      meet.element.io
        cons:debug ⚈  Storing client options...
        cons:debug ⚈  Stored client options
        cons:debug ⚈  Getting filter...
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/user/%40user_3%3Alocalhost/filter
                      Status: 200
        cons:debug ⚈  Sending initial sync request...
        cons:debug ⚈  Waiting for saved sync before starting sync processing...
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/sync?filter=%7B%22room%22%3A%7B%22timeline%22%3A%7B%22unread_thread_notifications%22%3Atrue%2C%22limit%22%3A20%7D%2C%22state%22%3A%7B%22lazy_load_members%22%3Atrue%7D%7D%7D&timeout=0&_cacheBuster=1689081545423
                      Status: 200
        cons:debug ⚈  Initial sync performed - resetting device tracking state
        cons:debug ⚈  Now tracking device list for @user_3:localhost
         cons:warn ❖  Adding default global override for .org.matrix.msc3952.is_user_mention
         cons:warn ❖  Adding default global override for .org.matrix.msc3952.is_room_mention
         cons:warn ❖  Adding default global override for .org.matrix.msc3786.rule.room.server_acl
         cons:warn ❖  Adding default global underride for .org.matrix.msc3914.rule.room.call
        cons:debug ⚈  GroupCallEventHandler start() waiting for client to start syncing
         cons:info ✱  MatrixClient sync state => PREPARED
         cons:info ✱  MediaHandler setAudioInput() running (deviceId=default)
        cons:debug ⚈  Checking for COLR support
        cons:debug ⚈  Waiting for COLR SVG to load
        cons:debug ⚈  Starting key download for,
                      [
                        "@user_3:localhost"
                      ]
         cons:info ✱  MatrixClient sync state => SYNCING
         cons:info ✱  Resuming queue after resumed sync
        cons:debug ⚈  Attempting to send queued to-device messages
         cons:info ✱  MediaHandler setVideoInput() running (deviceId=default)
         cons:info ✱  MediaHandler setAudioSettings() running (opts={"autoGainControl":true,"echoCancellation":true,"noiseSuppression":true})
         cons:info ✱  generating oneTimeKeys
        cons:debug ⚈  Regenerating room lists: Startup
         cons:warn ❖  Regenerating all room lists
         cons:warn ❖  Resetting known rooms, initiating regeneration
         cons:warn ❖  Resetting known rooms, initiating regeneration
        cons:debug ⚈  Saving device tracking data,
                      s1_2_0_1_1_1_1_4_0_1
        cons:debug ⚈  All queued to-device messages sent
        cons:debug ⚈  Setting up Mjolnir: after sync
        cons:debug ⚈  Updating Mjolnir ban lists to: 
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/profile/%40user_3%3Alocalhost
                      Status: 200
        cons:debug ⚈  Drawing canvas to detect COLR support
        cons:debug ⚈  Canvas check revealed COLR is supported? true
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/devices
                      Status: 200
          cy:fetch ➟  PUT http://localhost:50858/_matrix/client/r0/user/%40user_3%3Alocalhost/account_data/org.matrix.msc3890.local_notification_settings.KPZAJZDXEN
                      Status: 200
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/keys/query
                      Status: 200
          cy:fetch ➟  PUT http://localhost:50858/_matrix/client/r0/user/%40user_3%3Alocalhost/account_data/org.matrix.msc3890.local_notification_settings.KPZAJZDXEN
                      Status: 200
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/createRoom
                      Status: 200
        cons:debug ⚈  Old unverified sessions: 
        cons:debug ⚈  New unverified sessions: 
        cons:debug ⚈  Currently showing toasts for: 
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/profile/%40user_3%3Alocalhost
                      Status: 200
        cons:debug ⚈  got device keys for @user_3:localhost:,
                      {
                        "KPZAJZDXEN": {
                          "algorithms": [
                            "m.olm.v1.curve25519-aes-sha2",
                            "m.megolm.v1.aes-sha2"
                          ],
                          "device_id": "KPZAJZDXEN",
                          "keys": {
                            "curve25519:KPZAJZDXEN": "SQho4IMnyRqDOzCpa/U/JfYQ+OdqVoKDOniarnzBLEg",
                            "ed25519:KPZAJZDXEN": "eYhn+WiZbXlkX6yxrj8ACTevfHuhg1IruRKNRtvW3qY"
                          },
                          "signatures": {
                            "@user_3:localhost": {
                              "ed25519:KPZAJZDXEN": "Zxv/DSKeTCnJ+WjJHR9g6IukKBQGHLEY+JbSr9uwhvxyaoGHCspIG5Kbd/BcdskEyvaGufvjS3LgnFV8dSNhDA"
                            }
                          },
                          "user_id": "@user_3:localhost",
                          "unsigned": {}
                        }
                      }
        cons:debug ⚈  got cross-signing keys for @user_3:localhost:,
                      {}
        cons:debug ⚈  Completed key download for @user_3:localhost
        cons:debug ⚈  Device list for,
                      @user_3:localhost,
                      now up to date
        cons:debug ⚈  Old unverified sessions: 
        cons:debug ⚈  New unverified sessions: 
        cons:debug ⚈  Currently showing toasts for: 
         cons:info ✱  generating fallback key
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/sync?filter=0&timeout=30000&since=s1_2_0_1_1_1_1_4_0_1
                      Status: 200
         cons:info ✱  calling uploadOneTimeKeys
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/keys/upload
                      Status: 200
        cons:debug ⚈  EventTimelineSet.addLiveEvent: ignoring duplicate event $AAcbt6qGcP27phMg2ZjHloUOrxB83JI91TAfhJSwx80
         cons:info ✱  GroupCallEventHandler createGroupCallForRoom() processed room (roomId=!LcLtNOXIEoaPjVHdCo:localhost)
        cons:debug ⚈  Marking device list outdated for,
                      @user_3:localhost
        cy:command ✔  injectAxe 
        cons:debug ⚈  Starting key download for,
                      [
                        "@user_3:localhost"
                      ]
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/profile/%40user_3%3Alocalhost
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/profile/%40user_3%3Alocalhost
                      Status: 200
         cons:warn ❖  !LcLtNOXIEoaPjVHdCo:localhost is reportedly new but is already known - assuming TagChange instead
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/keys/query
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/sync?filter=0&timeout=30000&since=s8_2_0_1_3_1_1_4_0_1
                      Status: 200
      cy:intercept ➟  Matcher: "/_axe"
                      Mocked Response: /*! axe v4.7.2
                       * Copyright (c) 2023 Deque Systems, Inc.
                       *
                       * Your use of this Source Code Form is subject to the terms of the Mozilla Public
                       * License, v. 2.0. If a copy of the MPL was not distributed with this
                       * file, You can obtain one at http://mozilla.org/MPL/2.0/.
                       *
                       * This entire copyright notice must appear in every copy of this file you
                       * distribute or in any file that contains substantial portions of this source
                       * code.
                       */
                      !function a(window){var q=window,document=window.document;function te(e){return(te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var axe=axe||{};function P(e){this.name="SupportError",this.cause=e.cause,this.message="`".concat(e.cause,"` - feature unsupported in your environment."),e.ruleId&&(this.ruleId=e.ruleId,this.message+=" Skipping ".concat(this.ruleId," rule.")),this.stack=(new Error).stack}axe.version="4.7.2","function"==typeof define&&define.amd&&define("axe-core",[],function(){return axe}),"object"===("undefined"==typeof module?"undefined":te(module))&&module.exports&&"function"==typeof a.toString&&(axe.source="("+a.toString()+')(typeof window === "object" ? window : this);',module.exports=axe),"function"==typeof window.getComputedStyle&&(window.axe=axe),(P.prototype=Object.create(Error.prototype)).constructor=P;var I=["node"],B=["variant"],j=["matches"],o=["chromium"],i=["noImplicit"],L=["noPresentational"],z=["precision","format","inGamut"],V=["space"],$=["algorithm"],H=["method"],U=["maxDeltaE","deltaEMethod","steps","maxSteps"],G=["node"],W=["nodes"],Y=["node"],K=["relatedNodes"],X=["environmentData"],Z=["environmentData"],J=["node"],Q=["environmentData"],ee=["environmentData"],ne=["environmentData"];function re(e){return we(e)||ve(e)||Ae(e)||ye()}function ae(e,t,n){return(ae=ue()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);t=new(Function.bind.apply(e,r));return n&&ie(t,n.prototype),t}).apply(null,arguments)}function oe(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ie(e,t)}function ie(e,t){return(ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function le(n){var r=ue();return function(){var e,t=ce(n),t=(e=r?(e=ce(this).constructor,Reflect.construct(t,arguments,e)):t.apply(this,arguments),this);if(e&&("object"===te(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return se(t)}}function se(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ue(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}function ce(e){return(ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function de(e,t,n){fe(e,t),t.set(e,n)}function pe(e,t){fe(e,t),t.add(e)}function fe(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function me(e,t){t=be(e,t,"get");return t.get?t.get.call(e):t.value}function he(e,t,n){if(t.has(e))return n;throw new TypeError("attempted to get private field on non-instance")}function ge(e,t,n){t=be(e,t,"set");if(t.set)t.set.call(e,n);else{if(!t.writable)throw new TypeError("attempted to set read only private field");t.value=n}}function be(e,t,n){if(t.has(e))return t.get(e);throw new TypeError("attempted to "+n+" private field on non-instance")}function b(e,t){if(null==e)return{};var n,r=function(e,t){if(null==e)return{};var n,r,a={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],0<=t.indexOf(n)||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols)for(var a=Object.getOwnPropertySymbols(e),o=0;o<a.length;o++)n=a[o],0<=t.indexOf(n)||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n]);return r}function y(e){return function(e){if(Array.isArray(e))return Ce(e)}(e)||ve(e)||Ae(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ve(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function h(){return(h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n,r=arguments[t];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function v(e,t){return we(e)||function(e,t){var n ...
        cons:debug ⚈  got device keys for @user_3:localhost:,
                      {
                        "KPZAJZDXEN": {
                          "algorithms": [
                            "m.olm.v1.curve25519-aes-sha2",
                            "m.megolm.v1.aes-sha2"
                          ],
                          "device_id": "KPZAJZDXEN",
                          "keys": {
                            "curve25519:KPZAJZDXEN": "SQho4IMnyRqDOzCpa/U/JfYQ+OdqVoKDOniarnzBLEg",
                            "ed25519:KPZAJZDXEN": "eYhn+WiZbXlkX6yxrj8ACTevfHuhg1IruRKNRtvW3qY"
                          },
                          "signatures": {
                            "@user_3:localhost": {
                              "ed25519:KPZAJZDXEN": "Zxv/DSKeTCnJ+WjJHR9g6IukKBQGHLEY+JbSr9uwhvxyaoGHCspIG5Kbd/BcdskEyvaGufvjS3LgnFV8dSNhDA"
                            }
                          },
                          "user_id": "@user_3:localhost",
                          "unsigned": {}
                        }
                      }
        cons:debug ⚈  got cross-signing keys for @user_3:localhost:,
                      {}
        cons:debug ⚈  Completed key download for @user_3:localhost
        cons:debug ⚈  Device list for,
                      @user_3:localhost,
                      now up to date
         cons:info ✱  generating oneTimeKeys
        cons:debug ⚈  Old unverified sessions: 
        cons:debug ⚈  New unverified sessions: 
        cons:debug ⚈  Currently showing toasts for: 
         cons:info ✱  calling uploadOneTimeKeys
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/keys/upload
                      Status: 200
        cy:command ✔  visit     /#/room/!LcLtNOXIEoaPjVHdCo:localhost
        cons:debug ⚈  Routing URL ,
                      http://localhost:8080/#/room/!LcLtNOXIEoaPjVHdCo:localhost
        cy:command ✔  wrap      {}
        cy:command ✔  get       .mx_RoomView_body .mx_GenericEventListSummary[data-layout='irc']
         cons:info ✱  generating oneTimeKeys
        cons:debug ⚈  Saving device tracking data,
                      s8_2_0_1_3_1_1_4_0_1
        cons:debug ⚈  Switching to room id !LcLtNOXIEoaPjVHdCo:localhost at event undefined
        cons:debug ⚈  RVS update:,
                      !LcLtNOXIEoaPjVHdCo:localhost,
                      undefined,
                      loading?,
                      false,
                      joining?,
                      false,
                      initial?,
                      true,
                      shouldPeek?,
                      true
        cons:debug ⚈  newscreen room/!LcLtNOXIEoaPjVHdCo:localhost
         cons:info ✱  checkForPreJoinUISI: showing all messages, skipping check
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/capabilities
                      Status: 200
        cy:command ✔  within    
        cy:command ✔  get       .mx_GenericEventListSummary_summary
        cy:command ✔  findByText        Alan created and configured the room.
        cy:command ✔  assert    expected **<span.mx_TextualEvent.mx_GenericEventListSummary_summary>** to exist in the DOM
                      Actual:   "<span.mx_TextualEvent.mx_GenericEventListSummary_summary>"
                      Expected:         "<span.mx_TextualEvent.mx_GenericEventListSummary_summary>"
        cy:command ✔  get       .mx_GenericEventListSummary
        cy:command ✔  findByRole        button, {name: expand}
        cy:command ✔  click     
          cy:fetch ➟  PUT http://localhost:50858/_matrix/client/r0/user/%40user_3%3Alocalhost/account_data/im.vector.setting.breadcrumbs
                      Status: 200
          cy:fetch ➟  POST http://localhost:50858/_matrix/client/r0/rooms/!LcLtNOXIEoaPjVHdCo%3Alocalhost/receipt/m.read/%24q9SPNL_yo-KwL3pVGQ4TYv0uakQTv64NAsvcB_LKdG8
                      Status: 200
          cy:fetch ➟  PUT http://localhost:50858/_matrix/client/r0/presence/%40user_3%3Alocalhost/status
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/rooms/!LcLtNOXIEoaPjVHdCo%3Alocalhost/members?not_membership=leave&at=s8_2_0_1_3_1_1_4_0_1
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/rooms/!LcLtNOXIEoaPjVHdCo%3Alocalhost/messages?limit=20&dir=b&from=s2_2_0_1_3_1_1_4_0_1&filter=%7B%22lazy_load_members%22%3Atrue%7D
                      Status: 200
        cons:debug ⚈  Caching capabilities: ,
                      {
                        "m.room_versions": {
                          "default": "10",
                          "available": {
                            "1": "stable",
                            "2": "stable",
                            "3": "stable",
                            "4": "stable",
                            "5": "stable",
                            "6": "stable",
                            "7": "stable",
                            "8": "stable",
                            "9": "stable",
                            "10": "stable",
                            "org.matrix.msc2176": "unstable",
                            "org.matrix.msc3787": "unstable",
                            "org.matrix.msc2716v4": "unstable",
                            "org.matrix.msc3989": "unstable"
                          },
                          "org.matrix.msc3244.room_capabilities": {
                            "knock": {
                              "preferred": "7",
                              "support": [
                                "7",
                                "8",
                                "9",
                                "org.matrix.msc3787",
                                "10",
                                "org.matrix.msc2716v4",
                                "org.matrix.msc3989"
                              ]
                            },
                            "restricted": {
                              "preferred": "9 ...
        cons:debug ⚈  [!LcLtNOXIEoaPjVHdCo:localhost] Current version: 10
        cons:debug ⚈  [!LcLtNOXIEoaPjVHdCo:localhost] Version capability: ,
                      {
                        "default": "10",
                        "available": {
                          "1": "stable",
                          "2": "stable",
                          "3": "stable",
                          "4": "stable",
                          "5": "stable",
                          "6": "stable",
                          "7": "stable",
                          "8": "stable",
                          "9": "stable",
                          "10": "stable",
                          "org.matrix.msc2176": "unstable",
                          "org.matrix.msc3787": "unstable",
                          "org.matrix.msc2716v4": "unstable",
                          "org.matrix.msc3989": "unstable"
                        },
                        "org.matrix.msc3244.room_capabilities": {
                          "knock": {
                            "preferred": "7",
                            "support": [
                              "7",
                              "8",
                              "9",
                              "org.matrix.msc3787",
                              "10",
                              "org.matrix.msc2716v4",
                              "org.matrix.msc3989"
                            ]
                          },
                          "restricted": {
                            "preferred": "9",
                            "support": [
                              "8",
                              "9",
                              " ...
        cons:debug ⚈  Event $AAcbt6qGcP27phMg2ZjHloUOrxB83JI91TAfhJSwx80 already in timeline !LcLtNOXIEoaPjVHdCo:localhost:2023-07-11T13:19:05.770Z
         cons:info ✱  Presence:,
                      online
        cons:debug ⚈  LL: got 1 members from server for room !LcLtNOXIEoaPjVHdCo:localhost
        cons:debug ⚈  LL: RoomState about to set 1 OOB members ...
        cons:debug ⚈  LL: RoomState put in finished state ...
        cons:debug ⚈  LL: telling store to write 0 members for room !LcLtNOXIEoaPjVHdCo:localhost
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/sync?filter=0&timeout=30000&since=s8_2_0_1_4_1_1_4_0_1
                      Status: 200
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/rooms/!LcLtNOXIEoaPjVHdCo%3Alocalhost/messages?limit=20&dir=b&from=t1-1_2_0_1_3_1_1_4_0_1&filter=%7B%22lazy_load_members%22%3Atrue%7D
                      Status: 200
        cy:command ✔  get       .mx_EventTile[data-layout=irc].mx_EventTile_info:first-of-type .mx_EventTile_line
        cy:command ✔  assert    expected **<div.mx_EventTile_line>** to have CSS property **margin-inline-start** with the value **99px**
                      Actual:   "99px"
                      Expected:         "99px"
        cy:command ✔  assert    expected **<div.mx_EventTile_line>** to have CSS property **inset-inline-start** with the value **0px**
                      Actual:   "0px"
                      Expected:         "0px"
        cy:command ✔  get       .mx_MainSplit
        cy:command ✔  assert    expected **.mx_Spinner** not to exist in the DOM
                      Actual:   ".mx_Spinner"
                      Expected:         ".mx_Spinner"
         cons:info ✱  calling uploadOneTimeKeys
         cons:info ✱  checkForPreJoinUISI: showing all messages, skipping check
        cy:command ✔  assert    expected **.mx_Spinner** not to exist in the DOM
                      Actual:   ".mx_Spinner"
                      Expected:         ".mx_Spinner"
        cy:command ✔  assert    expected **.mx_InlineSpinner** not to exist in the DOM
                      Actual:   ".mx_InlineSpinner"
                      Expected:         ".mx_InlineSpinner"
        cy:command ✔  percySnapshot     Disabled in interactive mode
        cy:command ✔  a11y error!       color-contrast on 2 Nodes
        cy:command ✔  task      log, 1 accessibility violation was detected
          cy:fetch ➟  GET http://localhost:50858/_matrix/client/r0/sync?filter=0&timeout=30000&since=s8_2_0_2_4_1_1_4_0_1
        cy:command ✔  task      table, Object{4}
        cy:command ✘  assert    1 accessibility violation was detected: expected **1** to equal **0**
        cy:command ✔  Clear page        
        cons:debug ⚈  element-web closing
        cons:error ✘  /sync error %s,
                      ConnectionError: fetch failed: Failed to fetch
                          at MatrixHttpApi.requestOtherUrl (http://localhost:8080/bundles/_dev_/bundle.js:41965:13)
        cons:debug ⚈  Number of consecutive failed sync requests:,
                      1
        cons:debug ⚈  Starting keep-alive
         cons:info ✱  MatrixClient sync state => RECONNECTING
        cy:command ✔  task      synapseStop, f3fa32e6a7411d09ed4c49ef61f4ed550881219c8abc45415114a054a5daff3e

seems like this is due to the buffering causing the log order to be confusing. Axe failures end up in the middle of the log instead of at the bottom

@richvdh
Copy link
Member Author

richvdh commented Jul 11, 2023

Axe failures end up in the middle of the log instead of at the bottom

It's at the top (other than a couple of lines from the synapse startup/shutdown), no?

@t3chguy
Copy link
Member

t3chguy commented Jul 11, 2023

It's at the top

Yes but only if its the first test overall, it'd get buried amongst output from our ~200 tests. But not a blocker either way

@@ -174,7 +174,7 @@ jobs:
record: true
parallel: true
command-prefix: "yarn percy exec --parallel --"
config: '{"reporter":"cypress-multi-reporters", "reporterOptions": { "configFile": "cypress-ci-reporter-config.json" } }'
config: '{"reporter":"cypress-multi-reporters", "reporterOptions": { "configFile": "cypress-ci-reporter-config.json" }, "morgan": false }'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why the config in cypress.config.ts isn't working here, and I don't know if this is going to fix it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Narrator: it did not fix it. The test logs include:

[percy] Running "cypress run --headed --record --parallel --config {"reporter":"cypress-multi-reporters", "reporterOptions": { "configFile": "cypress-ci-reporter-config.json" }, "morgan": false } --ci-build-id sha-c5befa1ef8ed72f0d09ae4fb5df21b4536b324f7-time-1689141941"
The following configuration option is invalid:

 - morgan

@richvdh
Copy link
Member Author

richvdh commented Jul 11, 2023

Yes but only if its the first test overall, it'd get buried amongst output from our ~200 tests. But not a blocker either way

well the other tests should be pretty silent.

@richvdh richvdh added this pull request to the merge queue Jul 11, 2023
Merged via the queue into develop with commit 113b630 Jul 11, 2023
@richvdh richvdh deleted the rav/cypress_terminal_report branch July 11, 2023 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
T-Task Refactoring, enabling or disabling functionality, other engineering tasks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants