From 8d22be34a56c1325d2d9e7a332fd1e87912ee1a7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 15:00:41 +0100 Subject: [PATCH 01/42] A first, maybe working cypress test Plus cypress plugins to manage synapses in docker containers --- .github/workflows/layered-build.yaml | 14 +- .gitignore | 8 + .../integration/1-register/register.spec.ts | 36 ++ cypress/plugins/index.ts | 7 + cypress/plugins/synapsedocker/index.ts | 138 +++++ .../synapsedocker/templates/COPYME/README.md | 3 + .../templates/COPYME/homeserver.yaml | 70 +++ .../synapsedocker/templates/COPYME/log.config | 50 ++ .../synapsedocker/templates/consent/README.md | 1 + .../templates/consent/homeserver.yaml | 82 +++ .../templates/consent/log.config | 50 ++ .../consent/res/templates/privacy/en/1.0.html | 23 + .../res/templates/privacy/en/success.html | 9 + package.json | 3 + yarn.lock | 548 +++++++++++++++++- 15 files changed, 1029 insertions(+), 13 deletions(-) create mode 100644 cypress/integration/1-register/register.spec.ts create mode 100644 cypress/plugins/index.ts create mode 100644 cypress/plugins/synapsedocker/index.ts create mode 100644 cypress/plugins/synapsedocker/templates/COPYME/README.md create mode 100644 cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml create mode 100644 cypress/plugins/synapsedocker/templates/COPYME/log.config create mode 100644 cypress/plugins/synapsedocker/templates/consent/README.md create mode 100644 cypress/plugins/synapsedocker/templates/consent/homeserver.yaml create mode 100644 cypress/plugins/synapsedocker/templates/consent/log.config create mode 100644 cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html create mode 100644 cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 1610f0e66e2..ca36029b9af 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -20,4 +20,16 @@ jobs: path: element-web/webapp # We'll only use this in a triggered job, then we're done with it retention-days: 1 - + cypress: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Download build + uses: actions/download-artifact@v3 + with: + name: previewbuild + - name: Run Cypress tests + uses: cypress-io/github-action@v2 + with: + start: npx serve -p 8080 webapp diff --git a/.gitignore b/.gitignore index 3137cd555b1..2ec9a62f681 100644 --- a/.gitignore +++ b/.gitignore @@ -19,3 +19,11 @@ package-lock.json .vscode .vscode/ + +/cypress/videos +/cypress/downloads +/cypress/screenshots +# These could have files in them but don't currently +# Cypress will still auto-create them though... +/cypress/fixtures +/cypress/support diff --git a/cypress/integration/1-register/register.spec.ts b/cypress/integration/1-register/register.spec.ts new file mode 100644 index 00000000000..4089bb3e76d --- /dev/null +++ b/cypress/integration/1-register/register.spec.ts @@ -0,0 +1,36 @@ +/// + +import { SynapseInstance } from "../../plugins/synapsedocker/index"; + +describe("Registration", () => { + let synapseId; + let synapsePort; + + beforeEach(() => { + cy.task("synapseStart", "consent").then(result => { + synapseId = result.synapseId; + synapsePort = result.port; + }); + cy.visit("/#/register"); + }) + + afterEach(() => { + cy.task("synapseStop", synapseId); + }); + + it("foo", () => { + cy.get(".mx_ServerPicker_change", { timeout: 10000 }).click(); + cy.get(".mx_ServerPickerDialog_otherHomeserver").type(`http://localhost:${synapsePort}`); + cy.get(".mx_ServerPickerDialog_continue").click(); + // wait for the dialog to go away + cy.get('.mx_ServerPickerDialog').should('not.exist') + cy.get("#mx_RegistrationForm_username").type("alice"); + cy.get("#mx_RegistrationForm_password").type("tally me banana"); + cy.get("#mx_RegistrationForm_passwordConfirm").type("tally me banana"); + cy.get(".mx_Login_submit").click(); + cy.get(".mx_RegistrationEmailPromptDialog button.mx_Dialog_primary").click(); + cy.get(".mx_InteractiveAuthEntryComponents_termsPolicy input").click(); + cy.get(".mx_InteractiveAuthEntryComponents_termsSubmit").click(); + cy.url().should('contain', '/#/home') + }) +}) diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts new file mode 100644 index 00000000000..cea4d626147 --- /dev/null +++ b/cypress/plugins/index.ts @@ -0,0 +1,7 @@ +/// + +import { synapseDocker } from "./synapsedocker/index"; + +export default function(on, config) { + synapseDocker(on, config); +} diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts new file mode 100644 index 00000000000..f0115c1b271 --- /dev/null +++ b/cypress/plugins/synapsedocker/index.ts @@ -0,0 +1,138 @@ +/// + +import path from "path"; +import os from "os"; +import * as crypto from "crypto"; +import childProcess from "child_process"; +import * as fse from "fs-extra" + +// A cypress plugins to add command to start & stop synapses in +// docker with preset templates. + +interface SynapseConfig { + configDir: string; + registrationSecret: string; +} + +export interface SynapseInstance extends SynapseConfig { + synapseId: string; + port: number; +} + +const synapses = new Map(); + +function randB64Bytes(numBytes: number): string { + return crypto.randomBytes(numBytes).toString("base64").replace(/=*$/, ""); +} + +async function cfgDirFromTemplate(template: string): Promise { + const templateDir = path.join(__dirname, "templates", template); + + const stats = await fse.stat(templateDir); + if (!stats || !stats.isDirectory) { + throw new Error(`No such template: ${template}`); + } + const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker')); + // copy the contents of the template dir, omitting homeserver.yaml as we'll template that + await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); + + const registrationSecret = randB64Bytes(16); + const macaroonSecret = randB64Bytes(16); + const formSecret = randB64Bytes(16); + + // now copy homeserver.yaml, applying sustitutions + let hsYaml = await fse.readFile(path.join(templateDir, "homeserver.yaml"), "utf8"); + hsYaml = hsYaml.replace(/{{REGISTRATION_SECRET}}/g, registrationSecret); + hsYaml = hsYaml.replace(/{{MACAROON_SECRET_KEY}}/g, macaroonSecret); + hsYaml = hsYaml.replace(/{{FORM_SECRET}}/g, formSecret); + await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml); + + // now generate a signing key (we could use synapse's config generation for + // this, or we could just do this...) + // NB. This assumes the homeserver.yaml specifies the key in this location + const signingKey = randB64Bytes(32); + await fse.writeFile(path.join(tempDir, "localhost.signing.key"), `ed25519 x ${signingKey}`); + + return { + configDir: tempDir, + registrationSecret, + }; +} + +/** + * @type {Cypress.PluginConfig} + */ +// eslint-disable-next-line no-unused-vars +export function synapseDocker(on, config) { + on("task", { + // Start a synapse instance: the template must be the name of + // one of the templates in the cypress/plugins/synapsedocker/templates + // directory + async synapseStart(template: string): Promise { + console.log("Starting synapse..."); + + const synCfg = await cfgDirFromTemplate(template); + + const synapseId = await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "run", + "--rm", + "-d", + "-v", `${synCfg.configDir}:/data`, + "-p", "8008/tcp", + "matrixdotorg/synapse", + "run", + ], (err, stdout) => { + if (err) reject(err); + resolve(stdout.trim()); + }); + }); + + // Get the port that docker allocated: specifying only one + // port above leaves docker to just grab a free one, although + // in hindsight we need to put the port in public_baseurl in the + // config really, so this will probably need changing to use a fixed + // / configured port. + const port = await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "port", synapseId, "8008", + ], { encoding: 'utf8' }, (err, stdout) => { + if (err) reject(err); + resolve(Number(stdout.trim().split(":")[1])); + }); + }); + + synapses.set(synapseId, Object.assign({ + port, + synapseId, + }, synCfg)); + + console.log(`Started synapse with id ${synapseId} on port ${port}.`); + return synapses.get(synapseId); + }, + async synapseStop(id) { + const synCfg = synapses.get(id); + + if (!synCfg) throw new Error("Unknown synapse ID"); + + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "stop", + id, + ], err => { + if (err) reject(err); + resolve(); + }); + }); + + await fse.remove(synCfg.configDir); + + synapses.delete(id); + + console.log(`Stopped synapse id ${id}.`); + // apparently returning 'undefined' here means the task never + // returns on the other side. returning 'null' is fine though... + return null; + }, + }); +} diff --git a/cypress/plugins/synapsedocker/templates/COPYME/README.md b/cypress/plugins/synapsedocker/templates/COPYME/README.md new file mode 100644 index 00000000000..df1ed89e6e4 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/COPYME/README.md @@ -0,0 +1,3 @@ +# Meta-template for synapse templates + +To make another template, you can copy this directory diff --git a/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml new file mode 100644 index 00000000000..6d404334565 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml @@ -0,0 +1,70 @@ +server_name: "localhost" +pid_file: /data/homeserver.pid +# XXX: This won't actually be right: it lets docker allocate an ephemeral port, +# so we have a chicken-and-egg problem +public_baseurl: http://localhost:8008/ +# Listener is always port 8008 (configured in the container) +listeners: + - port: 8008 + tls: false + bind_addresses: ['::'] + type: http + x_forwarded: true + + resources: + - names: [client, federation, consent] + compress: false + +# An sqlite in-memory database is fast & automatically wipes each time +database: + name: "sqlite3" + args: + database: ":memory:" + +# Needs to be configured to log to the console like a good docker process +log_config: "/data/log.config" + +rc_messages_per_second: 10000 +rc_message_burst_count: 10000 +rc_registration: + per_second: 10000 + burst_count: 10000 + +rc_login: + address: + per_second: 10000 + burst_count: 10000 + account: + per_second: 10000 + burst_count: 10000 + failed_attempts: + per_second: 10000 + burst_count: 10000 + +media_store_path: "/data/media_store" +uploads_path: "/data/uploads" +enable_registration: true +disable_msisdn_registration: false +# These placeholders will be be replaced with values generated at start +registration_shared_secret: "{{REGISTRATION_SECRET}}" +report_stats: false +macaroon_secret_key: "{{MACAROON_SECRET_KEY}}" +form_secret: "{{FORM_SECRET}}" +# Signing key must be here: it will be generated to this file +signing_key_path: "/data/localhost.signing.key" +email: + enable_notifs: false + smtp_host: "localhost" + smtp_port: 25 + smtp_user: "exampleusername" + smtp_pass: "examplepassword" + require_transport_security: False + notif_from: "Your Friendly %(app)s homeserver " + app_name: Matrix + notif_template_html: notif_mail.html + notif_template_text: notif_mail.txt + notif_for_new_users: True + client_base_url: "http://localhost/element" + +trusted_key_servers: + - server_name: "matrix.org" diff --git a/cypress/plugins/synapsedocker/templates/COPYME/log.config b/cypress/plugins/synapsedocker/templates/COPYME/log.config new file mode 100644 index 00000000000..ac232762da3 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/COPYME/log.config @@ -0,0 +1,50 @@ +# Log configuration for Synapse. +# +# This is a YAML file containing a standard Python logging configuration +# dictionary. See [1] for details on the valid settings. +# +# Synapse also supports structured logging for machine readable logs which can +# be ingested by ELK stacks. See [2] for details. +# +# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema +# [2]: https://matrix-org.github.io/synapse/latest/structured_logging.html + +version: 1 + +formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + +handlers: + # A handler that writes logs to stderr. Unused by default, but can be used + # instead of "buffer" and "file" in the logger handlers. + console: + class: logging.StreamHandler + formatter: precise + +loggers: + synapse.storage.SQL: + # beware: increasing this to DEBUG will make synapse log sensitive + # information such as access tokens. + level: INFO + + twisted: + # We send the twisted logging directly to the file handler, + # to work around https://github.com/matrix-org/synapse/issues/3471 + # when using "buffer" logger. Use "console" to log to stderr instead. + handlers: [console] + propagate: false + +root: + level: INFO + + # Write logs to the `buffer` handler, which will buffer them together in memory, + # then write them to a file. + # + # Replace "buffer" with "console" to log to stderr instead. (Note that you'll + # also need to update the configuration for the `twisted` logger above, in + # this case.) + # + handlers: [console] + +disable_existing_loggers: false diff --git a/cypress/plugins/synapsedocker/templates/consent/README.md b/cypress/plugins/synapsedocker/templates/consent/README.md new file mode 100644 index 00000000000..713e55f9d51 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/consent/README.md @@ -0,0 +1 @@ +A synapse configured with user privacy consent enabled diff --git a/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml new file mode 100644 index 00000000000..43dcc3cbbf9 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml @@ -0,0 +1,82 @@ +server_name: "localhost" +pid_file: /data/homeserver.pid +public_baseurl: http://localhost:5005/ +listeners: + - port: 8008 + tls: false + bind_addresses: ['::'] + type: http + x_forwarded: true + + resources: + - names: [client, federation, consent] + compress: false + +database: + name: "sqlite3" + args: + database: ":memory:" + +log_config: "/data/log.config" + +rc_messages_per_second: 10000 +rc_message_burst_count: 10000 +rc_registration: + per_second: 10000 + burst_count: 10000 + +rc_login: + address: + per_second: 10000 + burst_count: 10000 + account: + per_second: 10000 + burst_count: 10000 + failed_attempts: + per_second: 10000 + burst_count: 10000 + +media_store_path: "/data/media_store" +uploads_path: "/data/uploads" +enable_registration: true +disable_msisdn_registration: false +registration_shared_secret: "{{REGISTRATION_SECRET}}" +report_stats: false +macaroon_secret_key: "{{MACAROON_SECRET_KEY}}" +form_secret: "{{FORM_SECRET}}" +signing_key_path: "/data/localhost.signing.key" +email: + enable_notifs: false + smtp_host: "localhost" + smtp_port: 25 + smtp_user: "exampleusername" + smtp_pass: "examplepassword" + require_transport_security: False + notif_from: "Your Friendly %(app)s homeserver " + app_name: Matrix + notif_template_html: notif_mail.html + notif_template_text: notif_mail.txt + notif_for_new_users: True + client_base_url: "http://localhost/element" + +user_consent: + template_dir: /data/res/templates/privacy + version: 1.0 + server_notice_content: + msgtype: m.text + body: >- + To continue using this homeserver you must review and agree to the + terms and conditions at %(consent_uri)s + send_server_notice_to_guests: True + block_events_error: >- + To continue using this homeserver you must review and agree to the + terms and conditions at %(consent_uri)s + require_at_registration: true + +server_notices: + system_mxid_localpart: notices + system_mxid_display_name: "Server Notices" + system_mxid_avatar_url: "mxc://localhost:5005/oumMVlgDnLYFaPVkExemNVVZ" + room_name: "Server Notices" +trusted_key_servers: + - server_name: "matrix.org" diff --git a/cypress/plugins/synapsedocker/templates/consent/log.config b/cypress/plugins/synapsedocker/templates/consent/log.config new file mode 100644 index 00000000000..ac232762da3 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/consent/log.config @@ -0,0 +1,50 @@ +# Log configuration for Synapse. +# +# This is a YAML file containing a standard Python logging configuration +# dictionary. See [1] for details on the valid settings. +# +# Synapse also supports structured logging for machine readable logs which can +# be ingested by ELK stacks. See [2] for details. +# +# [1]: https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema +# [2]: https://matrix-org.github.io/synapse/latest/structured_logging.html + +version: 1 + +formatters: + precise: + format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s' + +handlers: + # A handler that writes logs to stderr. Unused by default, but can be used + # instead of "buffer" and "file" in the logger handlers. + console: + class: logging.StreamHandler + formatter: precise + +loggers: + synapse.storage.SQL: + # beware: increasing this to DEBUG will make synapse log sensitive + # information such as access tokens. + level: INFO + + twisted: + # We send the twisted logging directly to the file handler, + # to work around https://github.com/matrix-org/synapse/issues/3471 + # when using "buffer" logger. Use "console" to log to stderr instead. + handlers: [console] + propagate: false + +root: + level: INFO + + # Write logs to the `buffer` handler, which will buffer them together in memory, + # then write them to a file. + # + # Replace "buffer" with "console" to log to stderr instead. (Note that you'll + # also need to update the configuration for the `twisted` logger above, in + # this case.) + # + handlers: [console] + +disable_existing_loggers: false diff --git a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html new file mode 100644 index 00000000000..d4959b4bcb3 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/1.0.html @@ -0,0 +1,23 @@ + + + + Test Privacy policy + + + {% if has_consented %} +

+ Thank you, you've already accepted the license. +

+ {% else %} +

+ Please accept the license! +

+
+ + + + +
+ {% endif %} + + \ No newline at end of file diff --git a/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html new file mode 100644 index 00000000000..abe27d87ca1 --- /dev/null +++ b/cypress/plugins/synapsedocker/templates/consent/res/templates/privacy/en/success.html @@ -0,0 +1,9 @@ + + + + Test Privacy policy + + +

Danke schon

+ + \ No newline at end of file diff --git a/package.json b/package.json index a8c54d1d741..86b8f30a3fa 100644 --- a/package.json +++ b/package.json @@ -142,6 +142,7 @@ "@types/escape-html": "^1.0.1", "@types/file-saver": "^2.0.3", "@types/flux": "^3.1.9", + "@types/fs-extra": "^9.0.13", "@types/jest": "^26.0.20", "@types/lodash": "^4.14.168", "@types/modernizr": "^3.5.3", @@ -163,6 +164,7 @@ "babel-jest": "^26.6.3", "blob-polyfill": "^6.0.20211015", "chokidar": "^3.5.1", + "cypress": "^9.5.4", "enzyme": "^3.11.0", "enzyme-to-json": "^3.6.2", "eslint": "8.9.0", @@ -172,6 +174,7 @@ "eslint-plugin-matrix-org": "^0.4.0", "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-hooks": "^4.3.0", + "fs-extra": "^10.0.1", "glob": "^7.1.6", "jest": "^27.4.0", "jest-canvas-mock": "^2.3.0", diff --git a/yarn.lock b/yarn.lock index 6a1ae457680..5b08a1716d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1101,6 +1101,38 @@ exec-sh "^0.3.2" minimist "^1.2.0" +"@cypress/request@^2.88.10": + version "2.88.10" + resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.10.tgz#b66d76b07f860d3a4b8d7a0604d020c662752cce" + integrity sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg== + dependencies: + aws-sign2 "~0.7.0" + aws4 "^1.8.0" + caseless "~0.12.0" + combined-stream "~1.0.6" + extend "~3.0.2" + forever-agent "~0.6.1" + form-data "~2.3.2" + http-signature "~1.3.6" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.19" + performance-now "^2.1.0" + qs "~6.5.2" + safe-buffer "^5.1.2" + tough-cookie "~2.5.0" + tunnel-agent "^0.6.0" + uuid "^8.3.2" + +"@cypress/xvfb@^1.2.4": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@cypress/xvfb/-/xvfb-1.2.4.tgz#2daf42e8275b39f4aa53c14214e557bd14e7748a" + integrity sha512-skbBzPggOVYCbnGgV+0dmBdW/s77ZkAOXIC1knS8NagwDjBrNC1LuXtQJeiN6l+m7lzmHtaoUw/ctJKdqkG57Q== + dependencies: + debug "^3.1.0" + lodash.once "^4.1.1" + "@eslint/eslintrc@^1.1.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.1.0.tgz#583d12dbec5d4f22f333f9669f7d0b7c7815b4d3" @@ -1786,6 +1818,13 @@ "@types/fbemitter" "*" "@types/react" "*" +"@types/fs-extra@^9.0.13": + version "9.0.13" + resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-9.0.13.tgz#7594fbae04fe7f1918ce8b3d213f74ff44ac1f45" + integrity sha512-nEnwB++1u5lVDM2UI4c1+5R+FYaKfaAzS4OococimjVm3nQw3TuzH5UNsocrcTBbhnerblyHj4A49qXbIiZdpA== + dependencies: + "@types/node" "*" + "@types/geojson@^7946.0.8": version "7946.0.8" resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.8.tgz#30744afdb385e2945e22f3b033f897f76b1f12ca" @@ -1875,6 +1914,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.10.tgz#774f43868964f3cfe4ced1f5417fe15818a4eaea" integrity sha512-6iihJ/Pp5fsFJ/aEDGyvT4pHGmCpq7ToQ/yf4bl5SbVAvwpspYJ+v3jO7n8UyjhQVHTy+KNszOozDdv+O6sovQ== +"@types/node@^14.14.31": + version "14.18.12" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.12.tgz#0d4557fd3b94497d793efd4e7d92df2f83b4ef24" + integrity sha512-q4jlIR71hUpWTnGhXWcakgkZeHa3CCjcQcnuzU8M891BAWA2jHiziiWEPEkdS5pFsz7H9HJiy8BrK7tBRNrY7A== + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -1976,6 +2020,16 @@ resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" integrity sha512-hppQEBDmlwhFAXKJX2KnWLYu5yMfi91yazPb2l+lbJiwW+wdo1gNeRA+3RgNSO39WYX2euey41KEwnqesU2Jew== +"@types/sinonjs__fake-timers@8.1.1": + version "8.1.1" + resolved "https://registry.yarnpkg.com/@types/sinonjs__fake-timers/-/sinonjs__fake-timers-8.1.1.tgz#b49c2c70150141a15e0fa7e79cf1f92a72934ce3" + integrity sha512-0kSuKjAS0TrGLJ0M/+8MaFkGsQhZpB6pxOmvS3K8FYI72K//YmdfoW9X2qPsAKh1mkwxGD5zib9s1FIFed6E8g== + +"@types/sizzle@^2.3.2": + version "2.3.3" + resolved "https://registry.yarnpkg.com/@types/sizzle/-/sizzle-2.3.3.tgz#ff5e2f1902969d305225a047c8a0fd5c915cebef" + integrity sha512-JYM8x9EGF163bEyhdJBpR2QX1R5naCJHC8ucJylJ3w9/CVBaskdQ8WqBf8MmQrd1kRvp/a4TS8HJ+bxzR7ZJYQ== + "@types/stack-utils@^2.0.0": version "2.0.1" resolved "https://registry.yarnpkg.com/@types/stack-utils/-/stack-utils-2.0.1.tgz#20f18294f797f2209b5f65c8e3b5c8e8261d127c" @@ -2005,6 +2059,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yauzl@^2.9.1": + version "2.10.0" + resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599" + integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw== + dependencies: + "@types/node" "*" + "@types/zxcvbn@^4.4.0": version "4.4.1" resolved "https://registry.yarnpkg.com/@types/zxcvbn/-/zxcvbn-4.4.1.tgz#46e42cbdcee681b22181478feaf4af2bc4c1abd2" @@ -2152,6 +2213,14 @@ agent-base@6: dependencies: debug "4" +aggregate-error@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a" + integrity sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA== + dependencies: + clean-stack "^2.0.0" + indent-string "^4.0.0" + ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" @@ -2196,7 +2265,12 @@ another-json@^0.2.0: resolved "https://registry.yarnpkg.com/another-json/-/another-json-0.2.0.tgz#b5f4019c973b6dd5c6506a2d93469cb6d32aeedc" integrity sha1-tfQBnJc7bdXGUGotk0acttMq7tw= -ansi-escapes@^4.2.1: +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + +ansi-escapes@^4.2.1, ansi-escapes@^4.3.0: version "4.3.2" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-4.3.2.tgz#6b2291d1db7d98b6521d5f1efa42d0f3a9feb65e" integrity sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ== @@ -2248,6 +2322,11 @@ anymatch@^3.0.3, anymatch@~3.1.2: normalize-path "^3.0.0" picomatch "^2.0.4" +arch@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/arch/-/arch-2.2.0.tgz#1bc47818f305764f23ab3306b0bfc086c5a29d11" + integrity sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -2377,11 +2456,21 @@ astral-regex@^2.0.0: resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31" integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ== +async@^3.2.0: + version "3.2.3" + resolved "https://registry.yarnpkg.com/async/-/async-3.2.3.tgz#ac53dafd3f4720ee9e8a160628f18ea91df196c9" + integrity sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g== + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= +at-least-node@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" + integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== + atob@^2.1.2: version "2.1.2" resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" @@ -2621,7 +2710,12 @@ blob-polyfill@^6.0.20211015: resolved "https://registry.yarnpkg.com/blob-polyfill/-/blob-polyfill-6.0.20211015.tgz#7c47e62347e302e8d1d1ee5e140b881f74bdb23e" integrity sha512-OGL4bm6ZNpdFAvQugRlQy5MNly8gk15aWi/ZhQHimQsrx9WKD05r+v+xNgHCChLER3MH+9KLAhzuFlwFKrH1Yw== -bluebird@^3.5.0: +blob-util@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/blob-util/-/blob-util-2.0.2.tgz#3b4e3c281111bb7f11128518006cdc60b403a1eb" + integrity sha512-T7JQa+zsXXEa6/8ZhHcQEW1UFfVM49Ts65uBkFL6fz2QmrElqmbajIDJvuA0tEhRe5eIjpV9ZF+0RfZR9voJFQ== + +bluebird@^3.5.0, bluebird@^3.7.2: version "3.7.2" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== @@ -2715,6 +2809,11 @@ buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" +buffer-crc32@~0.2.3: + version "0.2.13" + resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" + integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= + buffer-fill@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/buffer-fill/-/buffer-fill-1.0.0.tgz#f8f78b76789888ef39f205cd637f68e702122b2c" @@ -2725,7 +2824,7 @@ buffer-from@^1.0.0, buffer-from@^1.1.1: resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== -buffer@^5.4.3: +buffer@^5.4.3, buffer@^5.6.0: version "5.7.1" resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== @@ -2748,6 +2847,11 @@ cache-base@^1.0.1: union-value "^1.0.0" unset-value "^1.0.0" +cachedir@^2.3.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/cachedir/-/cachedir-2.3.0.tgz#0c75892a052198f0b21c7c1804d8331edfcae0e8" + integrity sha512-A+Fezp4zxnit6FanDmv9EqXNAi3vt9DWp51/71UEhXukb7QUuvtv9344h91dyAxuTLoSYJFU299qzR3tzwPAhw== + call-bind@^1.0.0, call-bind@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" @@ -2834,6 +2938,11 @@ character-reference-invalid@^1.0.0: resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.4.tgz#083329cda0eae272ab3dbbf37e9a382c13af1560" integrity sha512-mKKUkUbhPpQlCOfIuZkvSEgktjPFIsZKRRbC6KWVEMvlzblj3i3asQv5ODsrwt0N3pHAEvjP8KTQPHkp0+6jOg== +check-more-types@^2.24.0: + version "2.24.0" + resolved "https://registry.yarnpkg.com/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" + integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= + cheerio-select@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/cheerio-select/-/cheerio-select-1.5.0.tgz#faf3daeb31b17c5e1a9dabcee288aaf8aafa5823" @@ -2903,6 +3012,11 @@ classnames@*, classnames@^2.2.6: resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e" integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== +clean-stack@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" + integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== + cli-color@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/cli-color/-/cli-color-2.0.1.tgz#93e3491308691f1e46beb78b63d0fb2585e42ba6" @@ -2914,6 +3028,30 @@ cli-color@^2.0.0: memoizee "^0.4.15" timers-ext "^0.1.7" +cli-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-3.1.0.tgz#264305a7ae490d1d03bf0c9ba7c925d1753af307" + integrity sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw== + dependencies: + restore-cursor "^3.1.0" + +cli-table3@~0.6.1: + version "0.6.1" + resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.6.1.tgz#36ce9b7af4847f288d3cdd081fbd09bf7bd237b8" + integrity sha512-w0q/enDHhPLq44ovMGdQeeDLvwxwavsJX7oQGYt/LrBlYsyaxyDnp6z3QzFut/6kLLKnlcUVJLrpB7KBfgG/RA== + dependencies: + string-width "^4.2.0" + optionalDependencies: + colors "1.4.0" + +cli-truncate@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-2.1.0.tgz#c39e28bf05edcde5be3b98992a22deed5a2b93c7" + integrity sha512-n8fOixwDD6b/ObinzTrp1ZKFzbgvKZvuz/TvejnLn1aQfC6r52XEx85FmuC+3HI+JM7coBRXUvNqEU2PHVrHpg== + dependencies: + slice-ansi "^3.0.0" + string-width "^4.2.0" + cliui@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" @@ -2990,6 +3128,16 @@ color-name@^1.1.4, color-name@~1.1.4: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +colorette@^2.0.16: + version "2.0.16" + resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" + integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== + +colors@1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" + integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== + combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: version "1.0.8" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" @@ -3007,6 +3155,16 @@ commander@^4.0.1: resolved "https://registry.yarnpkg.com/commander/-/commander-4.1.1.tgz#9fd602bd936294e9e9ef46a3f4d6964044b18068" integrity sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA== +commander@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae" + integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg== + +common-tags@^1.8.0: + version "1.8.2" + resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" + integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== + commondir@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/commondir/-/commondir-1.0.1.tgz#ddd800da0c66127393cca5950ea968a3aaf1253b" @@ -3122,7 +3280,7 @@ cross-spawn@^6.0.0: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -3191,6 +3349,54 @@ csstype@^3.0.2: resolved "https://registry.yarnpkg.com/csstype/-/csstype-3.0.10.tgz#2ad3a7bed70f35b965707c092e5f30b327c290e5" integrity sha512-2u44ZG2OcNUO9HDp/Jl8C07x6pU/eTR3ncV91SiK3dhG9TWvRVsCoJw14Ckx5DgWkzGA3waZWO3d7pgqpUI/XA== +cypress@^9.5.4: + version "9.5.4" + resolved "https://registry.yarnpkg.com/cypress/-/cypress-9.5.4.tgz#49d9272f62eba12f2314faf29c2a865610e87550" + integrity sha512-6AyJAD8phe7IMvOL4oBsI9puRNOWxZjl8z1lgixJMcgJ85JJmyKeP6uqNA0dI1z14lmJ7Qklf2MOgP/xdAqJ/Q== + dependencies: + "@cypress/request" "^2.88.10" + "@cypress/xvfb" "^1.2.4" + "@types/node" "^14.14.31" + "@types/sinonjs__fake-timers" "8.1.1" + "@types/sizzle" "^2.3.2" + arch "^2.2.0" + blob-util "^2.0.2" + bluebird "^3.7.2" + buffer "^5.6.0" + cachedir "^2.3.0" + chalk "^4.1.0" + check-more-types "^2.24.0" + cli-cursor "^3.1.0" + cli-table3 "~0.6.1" + commander "^5.1.0" + common-tags "^1.8.0" + dayjs "^1.10.4" + debug "^4.3.2" + enquirer "^2.3.6" + eventemitter2 "^6.4.3" + execa "4.1.0" + executable "^4.1.1" + extract-zip "2.0.1" + figures "^3.2.0" + fs-extra "^9.1.0" + getos "^3.2.1" + is-ci "^3.0.0" + is-installed-globally "~0.4.0" + lazy-ass "^1.6.0" + listr2 "^3.8.3" + lodash "^4.17.21" + log-symbols "^4.0.0" + minimist "^1.2.6" + ospath "^1.2.2" + pretty-bytes "^5.6.0" + proxy-from-env "1.0.0" + request-progress "^3.0.0" + semver "^7.3.2" + supports-color "^8.1.1" + tmp "~0.2.1" + untildify "^4.0.0" + yauzl "^2.10.0" + d@1, d@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" @@ -3225,6 +3431,11 @@ date-names@^0.1.11: resolved "https://registry.yarnpkg.com/date-names/-/date-names-0.1.13.tgz#c4358f6f77c8056e2f5ea68fdbb05f0bf1e53bd0" integrity sha512-IxxoeD9tdx8pXVcmqaRlPvrXIsSrSrIZzfzlOkm9u+hyzKp5Wk/odt9O/gd7Ockzy8n/WHeEpTVJ2bF3mMV4LA== +dayjs@^1.10.4: + version "1.11.0" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.0.tgz#009bf7ef2e2ea2d5db2e6583d2d39a4b5061e805" + integrity sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug== + debug@4, debug@^4.0.0, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" @@ -3239,7 +3450,7 @@ debug@^2.2.0, debug@^2.3.3, debug@^2.6.9: dependencies: ms "2.0.0" -debug@^3.2.7: +debug@^3.1.0, debug@^3.2.7: version "3.2.7" resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== @@ -3529,6 +3740,13 @@ end-of-stream@^1.1.0: dependencies: once "^1.4.0" +enquirer@^2.3.6: + version "2.3.6" + resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + entities@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.2.tgz#bdfa735299664dfafd34529ed4f8522a275fea56" @@ -3946,6 +4164,11 @@ event-emitter@^0.3.5: d "1" es5-ext "~0.10.14" +eventemitter2@^6.4.3: + version "6.4.5" + resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-6.4.5.tgz#97380f758ae24ac15df8353e0cc27f8b95644655" + integrity sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw== + events@^3.2.0: version "3.3.0" resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" @@ -3963,6 +4186,21 @@ exec-sh@^0.3.2: resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.3.6.tgz#ff264f9e325519a60cb5e273692943483cca63bc" integrity sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w== +execa@4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" + integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== + dependencies: + cross-spawn "^7.0.0" + get-stream "^5.0.0" + human-signals "^1.1.1" + is-stream "^2.0.0" + merge-stream "^2.0.0" + npm-run-path "^4.0.0" + onetime "^5.1.0" + signal-exit "^3.0.2" + strip-final-newline "^2.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -3998,6 +4236,13 @@ execall@^2.0.0: dependencies: clone-regexp "^2.1.0" +executable@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/executable/-/executable-4.1.1.tgz#41532bff361d3e57af4d763b70582db18f5d133c" + integrity sha512-8iA79xD3uAch729dUG8xaaBBFGaEa0wdD2VkYLFHwlqosEj/jT66AzcreRDSgV7ehnNLBW2WR5jIXwGKjVdTLg== + dependencies: + pify "^2.2.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -4080,6 +4325,17 @@ extglob@^2.0.4: snapdragon "^0.8.1" to-regex "^3.0.1" +extract-zip@2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a" + integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg== + dependencies: + debug "^4.1.1" + get-stream "^5.1.0" + yauzl "^2.10.0" + optionalDependencies: + "@types/yauzl" "^2.9.1" + extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" @@ -4169,11 +4425,25 @@ fbjs@^0.8.4: setimmediate "^1.0.5" ua-parser-js "^0.7.30" +fd-slicer@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e" + integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4= + dependencies: + pend "~1.2.0" + fflate@^0.4.1: version "0.4.8" resolved "https://registry.yarnpkg.com/fflate/-/fflate-0.4.8.tgz#f90b82aefbd8ac174213abb338bd7ef848f0f5ae" integrity sha512-FJqqoDBR00Mdj9ppamLa/Y7vxm+PRmNWA67N846RvsoYVMKB4q3y/de5PA7gUmRMYK/8CMz2GDZQmCRN1wBcWA== +figures@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-3.2.0.tgz#625c18bd293c604dc4a8ddb2febf0c88341746af" + integrity sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg== + dependencies: + escape-string-regexp "^1.0.5" + file-entry-cache@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz#211b2dd9659cb0394b073e7323ac3c933d522027" @@ -4318,6 +4588,25 @@ fragment-cache@^0.2.1: dependencies: map-cache "^0.2.2" +fs-extra@^10.0.1: + version "10.0.1" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8" + integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag== + dependencies: + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + +fs-extra@^9.1.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d" + integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ== + dependencies: + at-least-node "^1.0.0" + graceful-fs "^4.2.0" + jsonfile "^6.0.1" + universalify "^2.0.0" + fs-readdir-recursive@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz#e32fc030a2ccee44a6b5371308da54be0b397d27" @@ -4399,6 +4688,13 @@ get-stream@^4.0.0: dependencies: pump "^3.0.0" +get-stream@^5.0.0, get-stream@^5.1.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" + integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== + dependencies: + pump "^3.0.0" + get-stream@^6.0.0, get-stream@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-6.0.1.tgz#a262d8eef67aced57c2852ad6167526a43cbf7b7" @@ -4417,6 +4713,13 @@ get-value@^2.0.3, get-value@^2.0.6: resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= +getos@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5" + integrity sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q== + dependencies: + async "^3.2.0" + getpass@^0.1.1: version "0.1.7" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" @@ -4465,6 +4768,13 @@ glob@^7.0.0, glob@^7.1.1, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6: once "^1.3.0" path-is-absolute "^1.0.0" +global-dirs@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-3.0.0.tgz#70a76fe84ea315ab37b1f5576cbde7d48ef72686" + integrity sha512-v8ho2DS5RiCjftj1nD9NmnfaOzTdud7RRnVd9kFNOjqZbISlx5DQ+OrTkywgd0dIt7oFCvKetZSHoHcP3sDdiA== + dependencies: + ini "2.0.0" + global-modules@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-2.0.0.tgz#997605ad2345f27f51539bea26574421215c7780" @@ -4517,6 +4827,11 @@ gonzales-pe@^4.3.0: dependencies: minimist "^1.2.5" +graceful-fs@^4.1.6, graceful-fs@^4.2.0: + version "4.2.10" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" + integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== + graceful-fs@^4.2.4, graceful-fs@^4.2.9: version "4.2.9" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.9.tgz#041b05df45755e587a24942279b9d113146e1c96" @@ -4704,6 +5019,15 @@ http-signature@~1.2.0: jsprim "^1.2.2" sshpk "^1.7.0" +http-signature@~1.3.6: + version "1.3.6" + resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.3.6.tgz#cb6fbfdf86d1c974f343be94e87f7fc128662cf9" + integrity sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw== + dependencies: + assert-plus "^1.0.0" + jsprim "^2.0.2" + sshpk "^1.14.1" + https-proxy-agent@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz#e2a90542abb68a762e0a0850f6c9edadfd8506b2" @@ -4712,6 +5036,11 @@ https-proxy-agent@^5.0.0: agent-base "6" debug "4" +human-signals@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" + integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== + human-signals@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-2.1.0.tgz#dc91fcba42e4d06e4abaed33b3e7a3c02f514ea0" @@ -4805,6 +5134,11 @@ inherits@2, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.3: resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== +ini@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ini/-/ini-2.0.0.tgz#e5fd556ecdd5726be978fa1001862eacb0a94bc5" + integrity sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA== + ini@^1.3.5: version "1.3.8" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" @@ -4920,6 +5254,13 @@ is-ci@^2.0.0: dependencies: ci-info "^2.0.0" +is-ci@^3.0.0: + version "3.0.1" + resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-3.0.1.tgz#db6ecbed1bd659c43dac0f45661e7674103d1867" + integrity sha512-ZYvCgrefwqoQ6yTyYUbQu64HsITZ3NfKX1lzaEYdkTDcfKzzCI/wthRRYKkdjHKFVgNiXKAKm65Zo1pk2as/QQ== + dependencies: + ci-info "^3.2.0" + is-core-module@^2.2.0, is-core-module@^2.5.0, is-core-module@^2.8.0, is-core-module@^2.8.1: version "2.8.1" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.8.1.tgz#f59fdfca701d5879d0a6b100a40aa1560ce27211" @@ -5056,6 +5397,14 @@ is-hexadecimal@^1.0.0: resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.4.tgz#cc35c97588da4bd49a8eedd6bc4082d44dcb23a7" integrity sha512-gyPJuv83bHMpocVYoqof5VDiZveEoGoFL8m3BXNb2VW8Xs+rz9kqO8LOQ5DH6EsuvilT1ApazU0pyl+ytbPtlw== +is-installed-globally@~0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.4.0.tgz#9a0fd407949c30f86eb6959ef1b7994ed0b7b520" + integrity sha512-iwGqO3J21aaSkC7jWnHP/difazwS7SFeIqxv6wEtLU8Y5KlzFTjyqcSIT0d8s4+dDhKytsk9PJZ2BkS5eZwQRQ== + dependencies: + global-dirs "^3.0.0" + is-path-inside "^3.0.2" + is-ip@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/is-ip/-/is-ip-3.1.0.tgz#2ae5ddfafaf05cb8008a62093cf29734f657c5d8" @@ -5092,6 +5441,11 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== +is-path-inside@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -5912,6 +6266,15 @@ json5@^2.1.2: dependencies: minimist "^1.2.5" +jsonfile@^6.0.1: + version "6.1.0" + resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" + integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== + dependencies: + universalify "^2.0.0" + optionalDependencies: + graceful-fs "^4.1.6" + jsprim@^1.2.2: version "1.4.2" resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.2.tgz#712c65533a15c878ba59e9ed5f0e26d5b77c5feb" @@ -5922,6 +6285,16 @@ jsprim@^1.2.2: json-schema "0.4.0" verror "1.10.0" +jsprim@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-2.0.2.tgz#77ca23dbcd4135cd364800d22ff82c2185803d4d" + integrity sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ== + dependencies: + assert-plus "1.0.0" + extsprintf "1.3.0" + json-schema "0.4.0" + verror "1.10.0" + "jsx-ast-utils@^2.4.1 || ^3.0.0", jsx-ast-utils@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-3.2.1.tgz#720b97bfe7d901b927d87c3773637ae8ea48781b" @@ -5998,6 +6371,11 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "~0.3.2" +lazy-ass@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/lazy-ass/-/lazy-ass-1.6.0.tgz#7999655e8646c17f089fdd187d150d3324d54513" + integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM= + leven@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2" @@ -6046,6 +6424,20 @@ linkifyjs@^4.0.0-beta.4: resolved "https://registry.yarnpkg.com/linkifyjs/-/linkifyjs-4.0.0-beta.4.tgz#8a03e7a999ed0b578a14d690585a32706525c45e" integrity sha512-j8IUYMqyTT0aDrrkA5kf4hn6QurSKjGiQbqjNr4qc8dwEXIniCGp0JrdXmsGcTOEyhKG03GyRnJjp3NDTBBPDQ== +listr2@^3.8.3: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== + dependencies: + cli-truncate "^2.1.0" + colorette "^2.0.16" + log-update "^4.0.0" + p-map "^4.0.0" + rfdc "^1.3.0" + rxjs "^7.5.1" + through "^2.3.8" + wrap-ansi "^7.0.0" + loader-utils@^2.0.0: version "2.0.2" resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129" @@ -6103,6 +6495,11 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== +lodash.once@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/lodash.once/-/lodash.once-4.1.1.tgz#0dd3971213c7c56df880977d504c88fb471a97ac" + integrity sha1-DdOXEhPHxW34gJd9UEyI+0cal6w= + lodash.truncate@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" @@ -6113,7 +6510,7 @@ lodash@^4.17.15, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.7.0: resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== -log-symbols@^4.1.0: +log-symbols@^4.0.0, log-symbols@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503" integrity sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg== @@ -6121,6 +6518,16 @@ log-symbols@^4.1.0: chalk "^4.1.0" is-unicode-supported "^0.1.0" +log-update@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/log-update/-/log-update-4.0.0.tgz#589ecd352471f2a1c0c570287543a64dfd20e0a1" + integrity sha512-9fkkDevMefjg0mmzWFBW8YkFP91OrizzkW3diF7CpG+S2EYdy4+TVfGwz1zeF8x7hCx1ovSPTOE9Ngib74qqUg== + dependencies: + ansi-escapes "^4.3.0" + cli-cursor "^3.1.0" + slice-ansi "^4.0.0" + wrap-ansi "^6.2.0" + loglevel@^1.7.1: version "1.8.0" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.8.0.tgz#e7ec73a57e1e7b419cb6c6ac06bf050b67356114" @@ -6443,7 +6850,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@>=1.2.2, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5: +minimist@>=1.2.2, minimist@^1.1.1, minimist@^1.2.0, minimist@^1.2.5, minimist@^1.2.6: version "1.2.6" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44" integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q== @@ -6614,7 +7021,7 @@ npm-run-path@^2.0.0: dependencies: path-key "^2.0.0" -npm-run-path@^4.0.1: +npm-run-path@^4.0.0, npm-run-path@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== @@ -6751,7 +7158,7 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" -onetime@^5.1.2: +onetime@^5.1.0, onetime@^5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== @@ -6787,6 +7194,11 @@ opus-recorder@^8.0.3: resolved "https://registry.yarnpkg.com/opus-recorder/-/opus-recorder-8.0.5.tgz#06d3e32e15da57ebc3f57e41b93033475fcb4e3e" integrity sha512-tBRXc9Btds7i3bVfA7d5rekAlyOcfsivt5vSIXHxRV1Oa+s6iXFW8omZ0Lm3ABWotVcEyKt96iIIUcgbV07YOw== +ospath@^1.2.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" + integrity sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs= + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -6827,6 +7239,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-map@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b" + integrity sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ== + dependencies: + aggregate-error "^3.0.0" + p-retry@^4.5.0: version "4.6.1" resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-4.6.1.tgz#8fcddd5cdf7a67a0911a9cf2ef0e5df7f602316c" @@ -6949,6 +7368,11 @@ pbf@^3.2.1: ieee754 "^1.1.12" resolve-protobuf-schema "^2.1.0" +pend@~1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" + integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA= + performance-now@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" @@ -6969,6 +7393,11 @@ picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42" integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA== +pify@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= + pify@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/pify/-/pify-4.0.1.tgz#4b2cd25c50d598735c50292224fd8c6df41e3231" @@ -7118,6 +7547,11 @@ prelude-ls@~1.1.2: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54" integrity sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ= +pretty-bytes@^5.6.0: + version "5.6.0" + resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" + integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== + pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-26.6.2.tgz#e35c2705f14cb7fe2fe94fa078345b444120fc93" @@ -7176,6 +7610,11 @@ protocol-buffers-schema@^3.3.1: resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz#77bc75a48b2ff142c1ad5b5b90c94cd0fa2efd03" integrity sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw== +proxy-from-env@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" + integrity sha1-M8UDmPcOp+uW0h97gXYwpVeRx+4= + psl@^1.1.28, psl@^1.1.33: version "1.8.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -7581,6 +8020,13 @@ repeat-string@^1.0.0, repeat-string@^1.6.1: resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= +request-progress@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/request-progress/-/request-progress-3.0.0.tgz#4ca754081c7fec63f505e4faa825aa06cd669dbe" + integrity sha1-TKdUCBx/7GP1BeT6qCWqBs1mnb4= + dependencies: + throttleit "^1.0.0" + request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -7673,6 +8119,14 @@ resolve@^2.0.0-next.3: is-core-module "^2.2.0" path-parse "^1.0.6" +restore-cursor@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-3.1.0.tgz#39f67c54b3a7a58cea5236d95cf0034239631f7e" + integrity sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA== + dependencies: + onetime "^5.1.0" + signal-exit "^3.0.2" + ret@~0.1.10: version "0.1.15" resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" @@ -7693,6 +8147,11 @@ rfc4648@^1.4.0: resolved "https://registry.yarnpkg.com/rfc4648/-/rfc4648-1.5.1.tgz#b0b16756e33d9de8c0c7833e94b28e627ec372a4" integrity sha512-60e/YWs2/D3MV1ErdjhJHcmlgnyLUiG4X/14dgsfm9/zmCWLN16xI6YqJYSCd/OANM7bUNzJqPY5B8/02S9Ibw== +rfdc@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" + integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== + rimraf@^3.0.0, rimraf@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" @@ -7730,6 +8189,13 @@ rw@^1.3.3: resolved "https://registry.yarnpkg.com/rw/-/rw-1.3.3.tgz#3f862dfa91ab766b14885ef4d01124bfda074fb4" integrity sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q= +rxjs@^7.5.1: + version "7.5.5" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.5.tgz#2ebad89af0f560f460ad5cc4213219e1f7dd4e9f" + integrity sha512-sy+H0pQofO95VDmFLzyaw9xNJU4KTRSwQIGM6+iG3SypAtCiLDzpeG8sJrNCWn2Up9km+KhkvTdbkrdy+yzZdw== + dependencies: + tslib "^2.1.0" + safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" @@ -7910,6 +8376,15 @@ slash@^3.0.0: resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" integrity sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q== +slice-ansi@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-3.0.0.tgz#31ddc10930a1b7e0b67b08c96c2f49b77a789787" + integrity sha512-pSyv7bSTC7ig9Dcgbw9AuRNUb5k5V6oDudjZoMBSr13qpLBG7tB+zgCkARjq7xIUgdz5P1Qe8u+rSGdouOOIyQ== + dependencies: + ansi-styles "^4.0.0" + astral-regex "^2.0.0" + is-fullwidth-code-point "^3.0.0" + slice-ansi@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-4.0.0.tgz#500e8dd0fd55b05815086255b3195adf2a45fe6b" @@ -8041,7 +8516,7 @@ sprintf-js@~1.0.2: resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c" integrity sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw= -sshpk@^1.7.0: +sshpk@^1.14.1, sshpk@^1.7.0: version "1.17.0" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.17.0.tgz#578082d92d4fe612b13007496e543fa0fbcbe4c5" integrity sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ== @@ -8311,7 +8786,7 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" -supports-color@^8.0.0: +supports-color@^8.0.0, supports-color@^8.1.1: version "8.1.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== @@ -8384,6 +8859,16 @@ throat@^6.0.1: resolved "https://registry.yarnpkg.com/throat/-/throat-6.0.1.tgz#d514fedad95740c12c2d7fc70ea863eb51ade375" integrity sha512-8hmiGIJMDlwjg7dlJ4yKGLK8EsYqKgPWbG3b4wjJddKNwc7N7Dpn08Df4szr/sZdMVeOstrdYSsqzX6BYbcB+w== +throttleit@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/throttleit/-/throttleit-1.0.0.tgz#9e785836daf46743145a5984b6268d828528ac6c" + integrity sha1-nnhYNtr0Z0MUWlmEtiaNgoUorGw= + +through@^2.3.8: + version "2.3.8" + resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" + integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= + timers-ext@^0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/timers-ext/-/timers-ext-0.1.7.tgz#6f57ad8578e07a3fb9f91d9387d65647555e25c6" @@ -8407,6 +8892,13 @@ tmatch@^2.0.1: resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-2.0.1.tgz#0c56246f33f30da1b8d3d72895abaf16660f38cf" integrity sha1-DFYkbzPzDaG409colauvFmYPOM8= +tmp@~0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.2.1.tgz#8457fc3037dcf4719c251367a1af6500ee1ccf14" + integrity sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ== + dependencies: + rimraf "^3.0.0" + tmpl@1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.5.tgz#8683e0b902bb9c20c4f726e3c0b69f36518c07cc" @@ -8503,7 +8995,7 @@ tslib@^1.8.1, tslib@^1.9.3: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.0.3, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1: +tslib@^2.0.0, tslib@^2.0.3, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -8692,6 +9184,11 @@ universalify@^0.1.2: resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== +universalify@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" + integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== + unset-value@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" @@ -8700,6 +9197,11 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" +untildify@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/untildify/-/untildify-4.0.0.tgz#2bc947b953652487e4600949fb091e3ae8cd919b" + integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -8753,6 +9255,11 @@ uuid@^3.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== +uuid@^8.3.2: + version "8.3.2" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" + integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== + v8-compile-cache@^2.0.3, v8-compile-cache@^2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz#2de19618c66dc247dcfb6f99338035d8245a2cee" @@ -8993,6 +9500,15 @@ wrap-ansi@^5.1.0: string-width "^3.0.0" strip-ansi "^5.0.0" +wrap-ansi@^6.2.0: + version "6.2.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53" + integrity sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA== + dependencies: + ansi-styles "^4.0.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" @@ -9112,6 +9628,14 @@ yargs@^17.0.1: y18n "^5.0.5" yargs-parser "^21.0.0" +yauzl@^2.10.0: + version "2.10.0" + resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9" + integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk= + dependencies: + buffer-crc32 "~0.2.3" + fd-slicer "~1.1.0" + zwitch@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920" From 630895422a9bd64cf6b7d454dfff325903141e50 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 15:11:03 +0100 Subject: [PATCH 02/42] Fix yaml --- .github/workflows/layered-build.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index ca36029b9af..15e4dd6292d 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -27,8 +27,8 @@ jobs: - uses: actions/checkout@v2 - name: Download build uses: actions/download-artifact@v3 - with: - name: previewbuild + with: + name: previewbuild - name: Run Cypress tests uses: cypress-io/github-action@v2 with: From f4f7cace2c90e981fd6ea026543b0b0dac6a1aa7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 15:29:59 +0100 Subject: [PATCH 03/42] This file is important --- cypress.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 cypress.json diff --git a/cypress.json b/cypress.json new file mode 100644 index 00000000000..371abf5a85f --- /dev/null +++ b/cypress.json @@ -0,0 +1,3 @@ +{ + "baseUrl": "http://localhost:8080" +} From 8312ead0ae33675065dd313d1b3e4e71d5046b9e Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 16:12:42 +0100 Subject: [PATCH 04/42] try & find where it's put the artifact --- .github/workflows/layered-build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 15e4dd6292d..657bdb73a8b 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -29,7 +29,9 @@ jobs: uses: actions/download-artifact@v3 with: name: previewbuild + - name: wheres the artifact + run: ls -lR - name: Run Cypress tests uses: cypress-io/github-action@v2 with: - start: npx serve -p 8080 webapp + start: npx serve -p 8080 matrix-react-sdk/webapp From e2be179ed39084cba667cef605540353036b7b82 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 16:20:24 +0100 Subject: [PATCH 05/42] Download artifact to a directory --- .github/workflows/layered-build.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 657bdb73a8b..0cba278d015 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -29,9 +29,10 @@ jobs: uses: actions/download-artifact@v3 with: name: previewbuild + path: webapp - name: wheres the artifact run: ls -lR - name: Run Cypress tests uses: cypress-io/github-action@v2 with: - start: npx serve -p 8080 matrix-react-sdk/webapp + start: npx serve -p 8080 webapp From 2c6265d3461324c731244d052448bcf5383e65e0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 16:30:11 +0100 Subject: [PATCH 06/42] pics or it didn't happen --- .github/workflows/layered-build.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 0cba278d015..9c6e94ca6e0 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -30,9 +30,14 @@ jobs: with: name: previewbuild path: webapp - - name: wheres the artifact - run: ls -lR - name: Run Cypress tests uses: cypress-io/github-action@v2 with: start: npx serve -p 8080 webapp + - name: Upload Artifact + uses: actions/upload-artifact@v2 + with: + name: cypress-results + path: | + cypress/screenshots + cypress/videos From 0ad99d77eb1ed80a28217bc79a4bbe8186fbeef7 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 16:39:35 +0100 Subject: [PATCH 07/42] Add conditional, otherwise no artifacts on failure... --- .github/workflows/layered-build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 9c6e94ca6e0..416f4355394 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -35,6 +35,7 @@ jobs: with: start: npx serve -p 8080 webapp - name: Upload Artifact + if: failure() uses: actions/upload-artifact@v2 with: name: cypress-results From 358b6922f2a35dd2b2c0d509672654a85f982d19 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 16:55:01 +0100 Subject: [PATCH 08/42] Try increasing timeout also actually give the test a name --- cypress/integration/1-register/register.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/integration/1-register/register.spec.ts b/cypress/integration/1-register/register.spec.ts index 4089bb3e76d..5a9143d0841 100644 --- a/cypress/integration/1-register/register.spec.ts +++ b/cypress/integration/1-register/register.spec.ts @@ -18,8 +18,8 @@ describe("Registration", () => { cy.task("synapseStop", synapseId); }); - it("foo", () => { - cy.get(".mx_ServerPicker_change", { timeout: 10000 }).click(); + it("registers an account and lands on the home screen", () => { + cy.get(".mx_ServerPicker_change", { timeout: 20000 }).click(); cy.get(".mx_ServerPickerDialog_otherHomeserver").type(`http://localhost:${synapsePort}`); cy.get(".mx_ServerPickerDialog_continue").click(); // wait for the dialog to go away From 7ab9222530e43e2f6bf2a4734fc237b397cb9de5 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 17:05:52 +0100 Subject: [PATCH 09/42] Try in chrome --- .github/workflows/layered-build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 416f4355394..2778a9a7558 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -33,6 +33,7 @@ jobs: - name: Run Cypress tests uses: cypress-io/github-action@v2 with: + browser: chrome start: npx serve -p 8080 webapp - name: Upload Artifact if: failure() From 67a59bd0ec5d80a9380479f273f527f615eaa0f8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 17:21:30 +0100 Subject: [PATCH 10/42] Get docker logs to see why it's failing also document the chrome setting --- .github/workflows/layered-build.yaml | 2 ++ cypress/plugins/synapsedocker/index.ts | 16 +++++++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 2778a9a7558..31e4fada7a8 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -33,6 +33,8 @@ jobs: - name: Run Cypress tests uses: cypress-io/github-action@v2 with: + # The built in Electron runner seems to grind to a halt trying + # to run the tests, so use chrome. browser: chrome start: npx serve -p 8080 webapp - name: Upload Artifact diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index f0115c1b271..8fedbead3a5 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -76,7 +76,7 @@ export function synapseDocker(on, config) { const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", - "--rm", + //"--rm", "-d", "-v", `${synCfg.configDir}:/data`, "-p", "8008/tcp", @@ -115,6 +115,20 @@ export function synapseDocker(on, config) { if (!synCfg) throw new Error("Unknown synapse ID"); + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "logs", + id, + ], (err, stdout, stderr) => { + if (err) reject(err); + console.log("Container logs (out): "); + console.log(stdout); + console.log("Container logs (err): "); + console.log(stderr); + resolve(); + }); + }); + await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "stop", From 2d8200bc7a7342da970c382924980bb811617432 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 17:36:33 +0100 Subject: [PATCH 11/42] Try changing mode on homeserver.yaml --- cypress/plugins/synapsedocker/index.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 8fedbead3a5..928167078c4 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -45,7 +45,7 @@ async function cfgDirFromTemplate(template: string): Promise { hsYaml = hsYaml.replace(/{{REGISTRATION_SECRET}}/g, registrationSecret); hsYaml = hsYaml.replace(/{{MACAROON_SECRET_KEY}}/g, macaroonSecret); hsYaml = hsYaml.replace(/{{FORM_SECRET}}/g, formSecret); - await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml); + await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml, { mode: 0x644 }); // now generate a signing key (we could use synapse's config generation for // this, or we could just do this...) @@ -76,7 +76,6 @@ export function synapseDocker(on, config) { const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", - //"--rm", "-d", "-v", `${synCfg.configDir}:/data`, "-p", "8008/tcp", @@ -139,6 +138,16 @@ export function synapseDocker(on, config) { }); }); + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "rm", + id, + ], err => { + if (err) reject(err); + resolve(); + }); + }); + await fse.remove(synCfg.configDir); synapses.delete(id); From b2adcf537fa8a196273057d37d30784084c5cffc Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 17:52:05 +0100 Subject: [PATCH 12/42] debug --- cypress/plugins/synapsedocker/index.ts | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 928167078c4..af836055828 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -69,10 +69,10 @@ export function synapseDocker(on, config) { // one of the templates in the cypress/plugins/synapsedocker/templates // directory async synapseStart(template: string): Promise { - console.log("Starting synapse..."); - const synCfg = await cfgDirFromTemplate(template); + console.log(`Starting synapse with config dir ${synCfg.configDir}...`); + const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", @@ -87,6 +87,19 @@ export function synapseDocker(on, config) { }); }); + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "run", + "--rm", + "-v", `${synCfg.configDir}:/data`, + "debian:buster", + "ls -l /data", + ], (err, stdout) => { + if (err) reject(err); + resolve(stdout.trim()); + }); + }); + // Get the port that docker allocated: specifying only one // port above leaves docker to just grab a free one, although // in hindsight we need to put the port in public_baseurl in the From d9861a8249e94cfc5b259656c7b007211ed57a87 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:05:09 +0100 Subject: [PATCH 13/42] More debugging --- cypress/plugins/synapsedocker/index.ts | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index af836055828..50759fea585 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -32,7 +32,8 @@ async function cfgDirFromTemplate(template: string): Promise { if (!stats || !stats.isDirectory) { throw new Error(`No such template: ${template}`); } - const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker')); + const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); + await fse.chmod(tempDir, 0x777); // copy the contents of the template dir, omitting homeserver.yaml as we'll template that await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); @@ -73,6 +74,14 @@ export function synapseDocker(on, config) { console.log(`Starting synapse with config dir ${synCfg.configDir}...`); + await new Promise((resolve, reject) => { + childProcess.execFile('ls -l', [ synCfg.configDir ], (err, stdout) => { + if (err) reject(err); + console.log(stdout); + resolve(); + }); + }); + const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", @@ -93,7 +102,7 @@ export function synapseDocker(on, config) { "--rm", "-v", `${synCfg.configDir}:/data`, "debian:buster", - "ls -l /data", + "ls -l /", ], (err, stdout) => { if (err) reject(err); resolve(stdout.trim()); @@ -127,12 +136,18 @@ export function synapseDocker(on, config) { if (!synCfg) throw new Error("Unknown synapse ID"); + const dockerLogsPath = path.join("cypress", "dockerlogs", id); + await fse.ensureDir(dockerLogsPath); + await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "logs", id, - ], (err, stdout, stderr) => { + ], async (err, stdout, stderr) => { if (err) reject(err); + await fse.writeFile(path.join(dockerLogsPath, "stdout"), stdout); + await fse.writeFile(path.join(dockerLogsPath, "stderr"), stderr); + console.log("Container logs (out): "); console.log(stdout); console.log("Container logs (err): "); From d08597de46315aa0df76cc1d263e8cd3dde221ac Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:16:49 +0100 Subject: [PATCH 14/42] more file permissions debugging --- cypress/plugins/synapsedocker/index.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 50759fea585..6a4fcd17cc6 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -33,8 +33,9 @@ async function cfgDirFromTemplate(template: string): Promise { throw new Error(`No such template: ${template}`); } const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); - await fse.chmod(tempDir, 0x777); + await fse.chmod(tempDir, 0o777); // copy the contents of the template dir, omitting homeserver.yaml as we'll template that + console.log(`Copy ${templateDir} -> ${tempDir}`); await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); const registrationSecret = randB64Bytes(16); @@ -42,6 +43,7 @@ async function cfgDirFromTemplate(template: string): Promise { const formSecret = randB64Bytes(16); // now copy homeserver.yaml, applying sustitutions + console.log(`Gen ${path.join(templateDir, "homeserver.yaml")}`); let hsYaml = await fse.readFile(path.join(templateDir, "homeserver.yaml"), "utf8"); hsYaml = hsYaml.replace(/{{REGISTRATION_SECRET}}/g, registrationSecret); hsYaml = hsYaml.replace(/{{MACAROON_SECRET_KEY}}/g, macaroonSecret); @@ -52,6 +54,7 @@ async function cfgDirFromTemplate(template: string): Promise { // this, or we could just do this...) // NB. This assumes the homeserver.yaml specifies the key in this location const signingKey = randB64Bytes(32); + console.log(`Gen ${path.join(templateDir, "localhost.signing.key")}`); await fse.writeFile(path.join(tempDir, "localhost.signing.key"), `ed25519 x ${signingKey}`); return { From 322a750fcd19ba6ac53d5812235ccbed2667a37d Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:31:31 +0100 Subject: [PATCH 15/42] ARGH --- cypress/plugins/synapsedocker/index.ts | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 6a4fcd17cc6..16829e1eb28 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -33,7 +33,25 @@ async function cfgDirFromTemplate(template: string): Promise { throw new Error(`No such template: ${template}`); } const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); + + await new Promise((resolve, reject) => { + childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { + if (err) reject(err); + console.log(stdout); + resolve(); + }); + }); + await fse.chmod(tempDir, 0o777); + + await new Promise((resolve, reject) => { + childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { + if (err) reject(err); + console.log(stdout); + resolve(); + }); + }); + // copy the contents of the template dir, omitting homeserver.yaml as we'll template that console.log(`Copy ${templateDir} -> ${tempDir}`); await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); @@ -77,14 +95,6 @@ export function synapseDocker(on, config) { console.log(`Starting synapse with config dir ${synCfg.configDir}...`); - await new Promise((resolve, reject) => { - childProcess.execFile('ls -l', [ synCfg.configDir ], (err, stdout) => { - if (err) reject(err); - console.log(stdout); - resolve(); - }); - }); - const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", From 02965aab5f1c95d451ce22e99701c702b3af17cd Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:40:25 +0100 Subject: [PATCH 16/42] more debug --- cypress/plugins/synapsedocker/index.ts | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 16829e1eb28..a81c5d6c3a7 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -34,6 +34,9 @@ async function cfgDirFromTemplate(template: string): Promise { } const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); + const tempstats = await fse.stat(tempDir); + console.log("Stats for temp dir: ", tempstats) + await new Promise((resolve, reject) => { childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { if (err) reject(err); @@ -109,19 +112,6 @@ export function synapseDocker(on, config) { }); }); - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "run", - "--rm", - "-v", `${synCfg.configDir}:/data`, - "debian:buster", - "ls -l /", - ], (err, stdout) => { - if (err) reject(err); - resolve(stdout.trim()); - }); - }); - // Get the port that docker allocated: specifying only one // port above leaves docker to just grab a free one, although // in hindsight we need to put the port in public_baseurl in the From 6c0acdb7d5231c61b87c6b7277ba640314d3b492 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:49:20 +0100 Subject: [PATCH 17/42] sigh --- cypress/plugins/synapsedocker/index.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index a81c5d6c3a7..a049b2cd932 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -37,16 +37,19 @@ async function cfgDirFromTemplate(template: string): Promise { const tempstats = await fse.stat(tempDir); console.log("Stats for temp dir: ", tempstats) - await new Promise((resolve, reject) => { + /*await new Promise((resolve, reject) => { childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { if (err) reject(err); console.log(stdout); resolve(); }); - }); + });*/ await fse.chmod(tempDir, 0o777); + const tempstats2 = await fse.stat(tempDir); + console.log("New stats for temp dir: ", tempstats2) + await new Promise((resolve, reject) => { childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { if (err) reject(err); From 20a6963b9e07603d1c1bd98a5157097322361386 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 18:58:22 +0100 Subject: [PATCH 18/42] Eugh, that's not how arguments work --- cypress/plugins/synapsedocker/index.ts | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index a049b2cd932..6be84a2047c 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -37,27 +37,11 @@ async function cfgDirFromTemplate(template: string): Promise { const tempstats = await fse.stat(tempDir); console.log("Stats for temp dir: ", tempstats) - /*await new Promise((resolve, reject) => { - childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { - if (err) reject(err); - console.log(stdout); - resolve(); - }); - });*/ - await fse.chmod(tempDir, 0o777); const tempstats2 = await fse.stat(tempDir); console.log("New stats for temp dir: ", tempstats2) - await new Promise((resolve, reject) => { - childProcess.execFile('ls -ld', [ tempDir ], (err, stdout) => { - if (err) reject(err); - console.log(stdout); - resolve(); - }); - }); - // copy the contents of the template dir, omitting homeserver.yaml as we'll template that console.log(`Copy ${templateDir} -> ${tempDir}`); await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); From 9f6128c53772440b0c75f9d4b9baa399bcecaec8 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 20:06:58 +0100 Subject: [PATCH 19/42] Add the option to really allow open registration and remove debug logging / comment fixes --- cypress/plugins/synapsedocker/index.ts | 7 +------ .../plugins/synapsedocker/templates/COPYME/homeserver.yaml | 2 ++ .../synapsedocker/templates/consent/homeserver.yaml | 2 ++ 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 6be84a2047c..0d0a5a56c79 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -34,14 +34,9 @@ async function cfgDirFromTemplate(template: string): Promise { } const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); - const tempstats = await fse.stat(tempDir); - console.log("Stats for temp dir: ", tempstats) - + // change permissions on the temp directory so the docker container can see its contents await fse.chmod(tempDir, 0o777); - const tempstats2 = await fse.stat(tempDir); - console.log("New stats for temp dir: ", tempstats2) - // copy the contents of the template dir, omitting homeserver.yaml as we'll template that console.log(`Copy ${templateDir} -> ${tempDir}`); await fse.copy(templateDir, tempDir, { filter: f => path.basename(f) !== 'homeserver.yaml' }); diff --git a/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml index 6d404334565..39f02eab3c4 100644 --- a/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml +++ b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml @@ -44,6 +44,7 @@ rc_login: media_store_path: "/data/media_store" uploads_path: "/data/uploads" enable_registration: true +enable_registration_without_verification disable_msisdn_registration: false # These placeholders will be be replaced with values generated at start registration_shared_secret: "{{REGISTRATION_SECRET}}" @@ -68,3 +69,4 @@ email: trusted_key_servers: - server_name: "matrix.org" +suppress_key_server_warning: true diff --git a/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml index 43dcc3cbbf9..049e0c449e1 100644 --- a/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml +++ b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml @@ -39,6 +39,7 @@ rc_login: media_store_path: "/data/media_store" uploads_path: "/data/uploads" enable_registration: true +enable_registration_without_verification disable_msisdn_registration: false registration_shared_secret: "{{REGISTRATION_SECRET}}" report_stats: false @@ -80,3 +81,4 @@ server_notices: room_name: "Server Notices" trusted_key_servers: - server_name: "matrix.org" +suppress_key_server_warning: true From 41030ec42cb06caec189f15c1ac9fdc3cdc356d3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 20:15:56 +0100 Subject: [PATCH 20/42] failure to yaml --- cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml | 2 +- cypress/plugins/synapsedocker/templates/consent/homeserver.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml index 39f02eab3c4..fab1bc1c451 100644 --- a/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml +++ b/cypress/plugins/synapsedocker/templates/COPYME/homeserver.yaml @@ -44,7 +44,7 @@ rc_login: media_store_path: "/data/media_store" uploads_path: "/data/uploads" enable_registration: true -enable_registration_without_verification +enable_registration_without_verification: true disable_msisdn_registration: false # These placeholders will be be replaced with values generated at start registration_shared_secret: "{{REGISTRATION_SECRET}}" diff --git a/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml index 049e0c449e1..e26133f6d11 100644 --- a/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml +++ b/cypress/plugins/synapsedocker/templates/consent/homeserver.yaml @@ -39,7 +39,7 @@ rc_login: media_store_path: "/data/media_store" uploads_path: "/data/uploads" enable_registration: true -enable_registration_without_verification +enable_registration_without_verification: true disable_msisdn_registration: false registration_shared_secret: "{{REGISTRATION_SECRET}}" report_stats: false From b7c7f64c16704fb79308f3925b9526303fee965a Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 20:25:13 +0100 Subject: [PATCH 21/42] Upload docker logs as artifacts and temporarily remove contional to test --- .github/workflows/layered-build.yaml | 3 ++- cypress/plugins/synapsedocker/index.ts | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 31e4fada7a8..5e99d179b14 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -38,10 +38,11 @@ jobs: browser: chrome start: npx serve -p 8080 webapp - name: Upload Artifact - if: failure() + #if: failure() uses: actions/upload-artifact@v2 with: name: cypress-results path: | cypress/screenshots cypress/videos + cypress/dockerlogs diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 0d0a5a56c79..2f18c20dba3 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -132,11 +132,6 @@ export function synapseDocker(on, config) { if (err) reject(err); await fse.writeFile(path.join(dockerLogsPath, "stdout"), stdout); await fse.writeFile(path.join(dockerLogsPath, "stderr"), stderr); - - console.log("Container logs (out): "); - console.log(stdout); - console.log("Container logs (err): "); - console.log(stderr); resolve(); }); }); From e2b7235fd46be7e097d5db6fc1fe71f70b639890 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 20:34:00 +0100 Subject: [PATCH 22/42] Put the conditional back --- .github/workflows/layered-build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build.yaml index 5e99d179b14..4ab7cdc1828 100644 --- a/.github/workflows/layered-build.yaml +++ b/.github/workflows/layered-build.yaml @@ -38,7 +38,7 @@ jobs: browser: chrome start: npx serve -p 8080 webapp - name: Upload Artifact - #if: failure() + if: failure() uses: actions/upload-artifact@v2 with: name: cypress-results From bf80b6547e2b201cdd0d63429069f00cd09ae552 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 21:10:12 +0100 Subject: [PATCH 23/42] Upgrade types in end to end tests to be compatible with fs-extra types --- test/end-to-end-tests/yarn.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/end-to-end-tests/yarn.lock b/test/end-to-end-tests/yarn.lock index 75be63fb557..f730e7003ae 100644 --- a/test/end-to-end-tests/yarn.lock +++ b/test/end-to-end-tests/yarn.lock @@ -3,14 +3,14 @@ "@types/node@*": - version "11.12.1" - resolved "https://registry.yarnpkg.com/@types/node/-/node-11.12.1.tgz#d90123f6c61fdf2f7cddd286ddae891586dd3488" - integrity sha512-sKDlqv6COJrR7ar0+GqqhrXQDzQlMcqMnF2iEU6m9hLo8kxozoAGUazwPyELHlRVmjsbvlnGXjnzyptSXVmceA== + version "17.0.23" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.23.tgz#3b41a6e643589ac6442bdbd7a4a3ded62f33f7da" + integrity sha512-UxDxWn7dl97rKVeVS61vErvw086aCYhDLyvRQZ5Rk65rZKepaFdm53GeqXaKBuOhED4e9uWq34IC3TdSdJJ2Gw== "@types/puppeteer@^5.4.4": - version "5.4.4" - resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.4.tgz#e92abeccc4f46207c3e1b38934a1246be080ccd0" - integrity sha512-3Nau+qi69CN55VwZb0ATtdUAlYlqOOQ3OfQfq0Hqgc4JMFXiQT/XInlwQ9g6LbicDslE6loIFsXFklGh5XmI6Q== + version "5.4.5" + resolved "https://registry.yarnpkg.com/@types/puppeteer/-/puppeteer-5.4.5.tgz#154e3850a77bfd3967f036680de8ddc88eb3a12b" + integrity sha512-lxCjpDEY+DZ66+W3x5Af4oHnEmUXt0HuaRzkBGE2UZiZEp/V1d3StpLPlmNVu/ea091bdNmVPl44lu8Wy/0ZCA== dependencies: "@types/node" "*" From 979b5ff1f14fd81f48bcfa7d50aed4b7e233e94d Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 21:29:42 +0100 Subject: [PATCH 24/42] Try reducing timeout a bit also make password more... sensible --- cypress/integration/1-register/register.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cypress/integration/1-register/register.spec.ts b/cypress/integration/1-register/register.spec.ts index 5a9143d0841..81a5df5d788 100644 --- a/cypress/integration/1-register/register.spec.ts +++ b/cypress/integration/1-register/register.spec.ts @@ -19,14 +19,14 @@ describe("Registration", () => { }); it("registers an account and lands on the home screen", () => { - cy.get(".mx_ServerPicker_change", { timeout: 20000 }).click(); + cy.get(".mx_ServerPicker_change", { timeout: 15000 }).click(); cy.get(".mx_ServerPickerDialog_otherHomeserver").type(`http://localhost:${synapsePort}`); cy.get(".mx_ServerPickerDialog_continue").click(); // wait for the dialog to go away cy.get('.mx_ServerPickerDialog').should('not.exist') cy.get("#mx_RegistrationForm_username").type("alice"); - cy.get("#mx_RegistrationForm_password").type("tally me banana"); - cy.get("#mx_RegistrationForm_passwordConfirm").type("tally me banana"); + cy.get("#mx_RegistrationForm_password").type("totally a great password"); + cy.get("#mx_RegistrationForm_passwordConfirm").type("totally a great password"); cy.get(".mx_Login_submit").click(); cy.get(".mx_RegistrationEmailPromptDialog button.mx_Dialog_primary").click(); cy.get(".mx_InteractiveAuthEntryComponents_termsPolicy input").click(); From ea6f8af50e15a341e35d0931c61a86c3ad337555 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 21:40:45 +0100 Subject: [PATCH 25/42] Hex is not octal --- cypress/plugins/synapsedocker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 2f18c20dba3..c206dd940c8 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -51,7 +51,7 @@ async function cfgDirFromTemplate(template: string): Promise { hsYaml = hsYaml.replace(/{{REGISTRATION_SECRET}}/g, registrationSecret); hsYaml = hsYaml.replace(/{{MACAROON_SECRET_KEY}}/g, macaroonSecret); hsYaml = hsYaml.replace(/{{FORM_SECRET}}/g, formSecret); - await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml, { mode: 0x644 }); + await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml, { mode: 0o644 }); // now generate a signing key (we could use synapse's config generation for // this, or we could just do this...) From 2aca9280577395c92112383dce21efbefb4d6064 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 21:41:26 +0100 Subject: [PATCH 26/42] Remove file mode Seems to be unnecessary since the signing key is perfectly fine --- cypress/plugins/synapsedocker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index c206dd940c8..1ec831492f5 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -51,7 +51,7 @@ async function cfgDirFromTemplate(template: string): Promise { hsYaml = hsYaml.replace(/{{REGISTRATION_SECRET}}/g, registrationSecret); hsYaml = hsYaml.replace(/{{MACAROON_SECRET_KEY}}/g, macaroonSecret); hsYaml = hsYaml.replace(/{{FORM_SECRET}}/g, formSecret); - await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml, { mode: 0o644 }); + await fse.writeFile(path.join(tempDir, "homeserver.yaml"), hsYaml); // now generate a signing key (we could use synapse's config generation for // this, or we could just do this...) From 38bbb55090bcff406122bb8506bf0e3f2281ea5c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 12 Apr 2022 21:50:42 +0100 Subject: [PATCH 27/42] Give the log files extensions --- cypress/plugins/synapsedocker/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 1ec831492f5..eac35812c9c 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -130,8 +130,8 @@ export function synapseDocker(on, config) { id, ], async (err, stdout, stderr) => { if (err) reject(err); - await fse.writeFile(path.join(dockerLogsPath, "stdout"), stdout); - await fse.writeFile(path.join(dockerLogsPath, "stderr"), stderr); + await fse.writeFile(path.join(dockerLogsPath, "stdout.log"), stdout); + await fse.writeFile(path.join(dockerLogsPath, "stderr.log"), stderr); resolve(); }); }); From a1e9350301ee08184f17a7826a00ca800c72ef99 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 09:32:20 +0100 Subject: [PATCH 28/42] Rename workflow file now it also does tests --- .../workflows/{layered-build.yaml => layered-build-and-test.yaml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{layered-build.yaml => layered-build-and-test.yaml} (100%) diff --git a/.github/workflows/layered-build.yaml b/.github/workflows/layered-build-and-test.yaml similarity index 100% rename from .github/workflows/layered-build.yaml rename to .github/workflows/layered-build-and-test.yaml From 1e8953a064b8b3b0656f9f366801e1931d5ac271 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 09:32:39 +0100 Subject: [PATCH 29/42] Add cypress scripts --- package.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.json b/package.json index c47f3eee368..3261559764b 100644 --- a/package.json +++ b/package.json @@ -49,6 +49,8 @@ "lint:types": "tsc --noEmit --jsx react", "lint:style": "stylelint \"res/css/**/*.scss\"", "test": "jest", + "test:cypress": "cypress run", + "test:cypress:open": "cypress open", "test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080", "coverage": "yarn test --coverage" }, From 53b8a1c95d3c372a075ea6812bd9ea9c1acf48a0 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 09:37:25 +0100 Subject: [PATCH 30/42] copyright headers --- cypress/integration/1-register/register.spec.ts | 16 ++++++++++++++++ cypress/plugins/index.ts | 16 ++++++++++++++++ cypress/plugins/synapsedocker/index.ts | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/cypress/integration/1-register/register.spec.ts b/cypress/integration/1-register/register.spec.ts index 81a5df5d788..3968d738245 100644 --- a/cypress/integration/1-register/register.spec.ts +++ b/cypress/integration/1-register/register.spec.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + /// import { SynapseInstance } from "../../plugins/synapsedocker/index"; diff --git a/cypress/plugins/index.ts b/cypress/plugins/index.ts index cea4d626147..db01ceceb4f 100644 --- a/cypress/plugins/index.ts +++ b/cypress/plugins/index.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + /// import { synapseDocker } from "./synapsedocker/index"; diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index eac35812c9c..474eecc6c5e 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -1,3 +1,19 @@ +/* +Copyright 2022 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + /// import path from "path"; From 1619330b9a7b8aba892f28bd1010f723547d8569 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 09:40:47 +0100 Subject: [PATCH 31/42] Use ? operator Co-authored-by: Travis Ralston --- cypress/plugins/synapsedocker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 474eecc6c5e..4296be3d9de 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -45,7 +45,7 @@ async function cfgDirFromTemplate(template: string): Promise { const templateDir = path.join(__dirname, "templates", template); const stats = await fse.stat(templateDir); - if (!stats || !stats.isDirectory) { + if (!stats?.isDirectory) { throw new Error(`No such template: ${template}`); } const tempDir = await fse.mkdtemp(path.join(os.tmpdir(), 'react-sdk-synapsedocker-')); From b56da36757f1863b6ca3306230a9606d86abe096 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 09:45:43 +0100 Subject: [PATCH 32/42] Use develop synapse image --- cypress/plugins/synapsedocker/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 4296be3d9de..c2763a38b9e 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -102,7 +102,7 @@ export function synapseDocker(on, config) { "-d", "-v", `${synCfg.configDir}:/data`, "-p", "8008/tcp", - "matrixdotorg/synapse", + "matrixdotorg/synapse:develop", "run", ], (err, stdout) => { if (err) reject(err); From a78d21265687cdabbd6a3ee4d40ce43085961b62 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:00:34 +0100 Subject: [PATCH 33/42] Tidy up any remaining synapses after each spec run Also: * Move the synapseStart / synapseStop functions out to the top level so they can be reused * Add a tsconfig file * Give the containers names --- cypress/plugins/synapsedocker/index.ts | 216 ++++++++++++++----------- cypress/tsconfig.json | 8 + 2 files changed, 127 insertions(+), 97 deletions(-) create mode 100644 cypress/tsconfig.json diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index c2763a38b9e..3bc84dae2b8 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -16,11 +16,11 @@ limitations under the License. /// -import path from "path"; -import os from "os"; +import * as path from "path"; +import * as os from "os"; import * as crypto from "crypto"; -import childProcess from "child_process"; -import * as fse from "fs-extra" +import * as childProcess from "child_process"; +import * as fse from "fs-extra"; // A cypress plugins to add command to start & stop synapses in // docker with preset templates. @@ -82,104 +82,126 @@ async function cfgDirFromTemplate(template: string): Promise { }; } +// Start a synapse instance: the template must be the name of +// one of the templates in the cypress/plugins/synapsedocker/templates +// directory +async function synapseStart(template: string): Promise { + const synCfg = await cfgDirFromTemplate(template); + + console.log(`Starting synapse with config dir ${synCfg.configDir}...`); + + const synapseId = await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "run", + "--name", `react-sdk-cypress-synapse-${template}-${randB64Bytes(4)}`, + "-d", + "-v", `${synCfg.configDir}:/data`, + "-p", "8008/tcp", + "matrixdotorg/synapse:develop", + "run", + ], (err, stdout) => { + if (err) reject(err); + resolve(stdout.trim()); + }); + }); + + // Get the port that docker allocated: specifying only one + // port above leaves docker to just grab a free one, although + // in hindsight we need to put the port in public_baseurl in the + // config really, so this will probably need changing to use a fixed + // / configured port. + const port = await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "port", synapseId, "8008", + ], { encoding: 'utf8' }, (err, stdout) => { + if (err) reject(err); + resolve(Number(stdout.trim().split(":")[1])); + }); + }); + + synapses.set(synapseId, Object.assign({ + port, + synapseId, + }, synCfg)); + + console.log(`Started synapse with id ${synapseId} on port ${port}.`); + return synapses.get(synapseId); +} + +async function synapseStop(id) { + const synCfg = synapses.get(id); + + if (!synCfg) throw new Error("Unknown synapse ID"); + + const synapseLogsPath = path.join("cypress", "synapselogs", id); + await fse.ensureDir(synapseLogsPath); + + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "logs", + id, + ], async (err, stdout, stderr) => { + if (err) reject(err); + await fse.writeFile(path.join(synapseLogsPath, "stdout.log"), stdout); + await fse.writeFile(path.join(synapseLogsPath, "stderr.log"), stderr); + resolve(); + }); + }); + + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "stop", + id, + ], err => { + if (err) reject(err); + resolve(); + }); + }); + + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "rm", + id, + ], err => { + if (err) reject(err); + resolve(); + }); + }); + + await fse.remove(synCfg.configDir); + + synapses.delete(id); + + console.log(`Stopped synapse id ${id}.`); + // cypres deliberately fails if you return 'undefined', so + // return null to signal all is well and we've handled the task. + return null; +} + /** * @type {Cypress.PluginConfig} */ // eslint-disable-next-line no-unused-vars export function synapseDocker(on, config) { on("task", { - // Start a synapse instance: the template must be the name of - // one of the templates in the cypress/plugins/synapsedocker/templates - // directory - async synapseStart(template: string): Promise { - const synCfg = await cfgDirFromTemplate(template); - - console.log(`Starting synapse with config dir ${synCfg.configDir}...`); - - const synapseId = await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "run", - "-d", - "-v", `${synCfg.configDir}:/data`, - "-p", "8008/tcp", - "matrixdotorg/synapse:develop", - "run", - ], (err, stdout) => { - if (err) reject(err); - resolve(stdout.trim()); - }); - }); - - // Get the port that docker allocated: specifying only one - // port above leaves docker to just grab a free one, although - // in hindsight we need to put the port in public_baseurl in the - // config really, so this will probably need changing to use a fixed - // / configured port. - const port = await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "port", synapseId, "8008", - ], { encoding: 'utf8' }, (err, stdout) => { - if (err) reject(err); - resolve(Number(stdout.trim().split(":")[1])); - }); - }); - - synapses.set(synapseId, Object.assign({ - port, - synapseId, - }, synCfg)); - - console.log(`Started synapse with id ${synapseId} on port ${port}.`); - return synapses.get(synapseId); - }, - async synapseStop(id) { - const synCfg = synapses.get(id); - - if (!synCfg) throw new Error("Unknown synapse ID"); - - const dockerLogsPath = path.join("cypress", "dockerlogs", id); - await fse.ensureDir(dockerLogsPath); - - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "logs", - id, - ], async (err, stdout, stderr) => { - if (err) reject(err); - await fse.writeFile(path.join(dockerLogsPath, "stdout.log"), stdout); - await fse.writeFile(path.join(dockerLogsPath, "stderr.log"), stderr); - resolve(); - }); - }); - - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "stop", - id, - ], err => { - if (err) reject(err); - resolve(); - }); - }); - - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "rm", - id, - ], err => { - if (err) reject(err); - resolve(); - }); - }); - - await fse.remove(synCfg.configDir); - - synapses.delete(id); - - console.log(`Stopped synapse id ${id}.`); - // apparently returning 'undefined' here means the task never - // returns on the other side. returning 'null' is fine though... - return null; - }, + synapseStart, synapseStop, + }); + + on("after:spec", async (spec) => { + // Cleans up any remaining synapse instances after a spec run + // This is on the theory that we should avoid re-using synapse + // instances between spec runs: they should be cheap enough to + // start that we can have a separate one for each spec run or even + // test. If we accidentally re-use synapses, we could inadvertantly + // make our tests depend on each other. + for (const synId of synapses.keys()) { + console.warn(`Cleaning up synapse ID ${synId} after ${spec.name}`); + await synapseStop(synId); + } + }); + + on("before:run", async () => { + // tidy up old synapse log files before each run + await fse.emptyDir(path.join("cypress", "synapselogs")); }); } diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json new file mode 100644 index 00000000000..9a638a19668 --- /dev/null +++ b/cypress/tsconfig.json @@ -0,0 +1,8 @@ +{ + "compilerOptions": { + "target": "es2016", + "lib": ["es2020", "dom"], + "types": ["cypress"] + }, + "include": ["**/*.ts"] +} From 4dd0545eee405d48096dd63b4429a4aeb9352167 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:08:55 +0100 Subject: [PATCH 34/42] Don't upload video on test pass We don't upload it anyway so tell cypress not to so it can not bother encoding them --- cypress.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cypress.json b/cypress.json index 371abf5a85f..4c1ed2d5856 100644 --- a/cypress.json +++ b/cypress.json @@ -1,3 +1,4 @@ { - "baseUrl": "http://localhost:8080" + "baseUrl": "http://localhost:8080", + "videoUploadOnPasses": false } From ca86bad15e9ce40487311ee180f094e5d98f16f3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:12:48 +0100 Subject: [PATCH 35/42] Enable linting on cypress files and fix existing lint errors --- .eslintrc.js | 1 + .gitignore | 2 +- cypress/integration/1-register/register.spec.ts | 14 +++++++------- cypress/support/index.ts | 3 +++ package.json | 4 ++-- 5 files changed, 14 insertions(+), 10 deletions(-) create mode 100644 cypress/support/index.ts diff --git a/.eslintrc.js b/.eslintrc.js index 9efdd128548..67e6ab1e642 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -92,6 +92,7 @@ module.exports = { files: [ "src/**/*.{ts,tsx}", "test/**/*.{ts,tsx}", + "cypress/**/*.ts", ], extends: [ "plugin:matrix-org/typescript", diff --git a/.gitignore b/.gitignore index 2ec9a62f681..8e14ba9057b 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,7 @@ package-lock.json /cypress/videos /cypress/downloads /cypress/screenshots +/cypress/synapselogs # These could have files in them but don't currently # Cypress will still auto-create them though... /cypress/fixtures -/cypress/support diff --git a/cypress/integration/1-register/register.spec.ts b/cypress/integration/1-register/register.spec.ts index 3968d738245..f719da55477 100644 --- a/cypress/integration/1-register/register.spec.ts +++ b/cypress/integration/1-register/register.spec.ts @@ -28,18 +28,18 @@ describe("Registration", () => { synapsePort = result.port; }); cy.visit("/#/register"); - }) - + }); + afterEach(() => { cy.task("synapseStop", synapseId); }); - + it("registers an account and lands on the home screen", () => { cy.get(".mx_ServerPicker_change", { timeout: 15000 }).click(); cy.get(".mx_ServerPickerDialog_otherHomeserver").type(`http://localhost:${synapsePort}`); cy.get(".mx_ServerPickerDialog_continue").click(); // wait for the dialog to go away - cy.get('.mx_ServerPickerDialog').should('not.exist') + cy.get('.mx_ServerPickerDialog').should('not.exist'); cy.get("#mx_RegistrationForm_username").type("alice"); cy.get("#mx_RegistrationForm_password").type("totally a great password"); cy.get("#mx_RegistrationForm_passwordConfirm").type("totally a great password"); @@ -47,6 +47,6 @@ describe("Registration", () => { cy.get(".mx_RegistrationEmailPromptDialog button.mx_Dialog_primary").click(); cy.get(".mx_InteractiveAuthEntryComponents_termsPolicy input").click(); cy.get(".mx_InteractiveAuthEntryComponents_termsSubmit").click(); - cy.url().should('contain', '/#/home') - }) -}) + cy.url().should('contain', '/#/home'); + }); +}); diff --git a/cypress/support/index.ts b/cypress/support/index.ts new file mode 100644 index 00000000000..9901ef4cb80 --- /dev/null +++ b/cypress/support/index.ts @@ -0,0 +1,3 @@ +// Empty file to prevent cypress from recreating a helpful example +// file on every run (their example file doesn't use semicolons and +// so fails our lint rules). diff --git a/package.json b/package.json index 3261559764b..80132730618 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,8 @@ "start:all": "echo THIS IS FOR LEGACY PURPOSES ONLY. && yarn start:build", "start:build": "babel src -w -s -d lib --verbose --extensions \".ts,.js\"", "lint": "yarn lint:types && yarn lint:js && yarn lint:style", - "lint:js": "eslint --max-warnings 0 src test", - "lint:js-fix": "eslint --fix src test", + "lint:js": "eslint --max-warnings 0 src test cypress", + "lint:js-fix": "eslint --fix src test cypress", "lint:types": "tsc --noEmit --jsx react", "lint:style": "stylelint \"res/css/**/*.scss\"", "test": "jest", From cfdb2af143e03a2bdd241cf20dec902f963ead3c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:26:20 +0100 Subject: [PATCH 36/42] Type check cypress files and make it pass the type checks, specifically: * Upgrade sinon fake timers to a version that has the right types * Set module resolution * Type check cypress files separately --- cypress/tsconfig.json | 3 ++- package.json | 4 ++-- yarn.lock | 14 +++++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cypress/tsconfig.json b/cypress/tsconfig.json index 9a638a19668..85239e1a2a7 100644 --- a/cypress/tsconfig.json +++ b/cypress/tsconfig.json @@ -2,7 +2,8 @@ "compilerOptions": { "target": "es2016", "lib": ["es2020", "dom"], - "types": ["cypress"] + "types": ["cypress"], + "moduleResolution": "node" }, "include": ["**/*.ts"] } diff --git a/package.json b/package.json index 80132730618..987c12eb06d 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "lint": "yarn lint:types && yarn lint:js && yarn lint:style", "lint:js": "eslint --max-warnings 0 src test cypress", "lint:js-fix": "eslint --fix src test cypress", - "lint:types": "tsc --noEmit --jsx react", + "lint:types": "tsc --noEmit --jsx react && tsc --noEmit -p cypress", "lint:style": "stylelint \"res/css/**/*.scss\"", "test": "jest", "test:cypress": "cypress run", @@ -134,7 +134,7 @@ "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz", "@peculiar/webcrypto": "^1.1.4", "@sentry/types": "^6.10.0", - "@sinonjs/fake-timers": "^7.0.2", + "@sinonjs/fake-timers": "^9.1.2", "@types/classnames": "^2.2.11", "@types/commonmark": "^0.27.4", "@types/counterpart": "^0.18.1", diff --git a/yarn.lock b/yarn.lock index ccad8c55ba2..d5f058af71f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1676,13 +1676,6 @@ dependencies: type-detect "4.0.8" -"@sinonjs/fake-timers@^7.0.2": - version "7.1.2" - resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" - integrity sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg== - dependencies: - "@sinonjs/commons" "^1.7.0" - "@sinonjs/fake-timers@^8.0.1": version "8.1.0" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz#3fdc2b6cb58935b21bfb8d1625eb1300484316e7" @@ -1690,6 +1683,13 @@ dependencies: "@sinonjs/commons" "^1.7.0" +"@sinonjs/fake-timers@^9.1.2": + version "9.1.2" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz#4eaab737fab77332ab132d396a3c0d364bd0ea8c" + integrity sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw== + dependencies: + "@sinonjs/commons" "^1.7.0" + "@stylelint/postcss-css-in-js@^0.37.2": version "0.37.2" resolved "https://registry.yarnpkg.com/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz#7e5a84ad181f4234a2480803422a47b8749af3d2" From f82aa9a770b11b3b2229b966ba833480592ea9ee Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:52:54 +0100 Subject: [PATCH 37/42] Rename workflow file again Probably better to just call it an element web build --- ...red-build-and-test.yaml => element-build-and-test.yaml} | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) rename .github/workflows/{layered-build-and-test.yaml => element-build-and-test.yaml} (88%) diff --git a/.github/workflows/layered-build-and-test.yaml b/.github/workflows/element-build-and-test.yaml similarity index 88% rename from .github/workflows/layered-build-and-test.yaml rename to .github/workflows/element-build-and-test.yaml index 4ab7cdc1828..f6233b1cac9 100644 --- a/.github/workflows/layered-build-and-test.yaml +++ b/.github/workflows/element-build-and-test.yaml @@ -1,6 +1,7 @@ -# Produce a 'layered build' (a build of element-web with this version of -# react-sdk) and output it as an artifact -name: Layered Preview Build +# Produce a build of element-web with this version of react-sdk +# and any matching branches of element-web and js-sdk, output it +# as an artifact and run integration tests. +name: Element Web: Build and Test on: pull_request: jobs: From d0cbae9bda7c5d4d1756d8f269bc08f84fcdd326 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:53:35 +0100 Subject: [PATCH 38/42] Don't plus + characters in container name --- cypress/plugins/synapsedocker/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 3bc84dae2b8..8b1d622292f 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -90,10 +90,12 @@ async function synapseStart(template: string): Promise { console.log(`Starting synapse with config dir ${synCfg.configDir}...`); + const containerName = `react-sdk-cypress-synapse-${crypto.randomBytes(4).toString("hex")}`; + const synapseId = await new Promise((resolve, reject) => { childProcess.execFile('docker', [ "run", - "--name", `react-sdk-cypress-synapse-${template}-${randB64Bytes(4)}`, + "--name", containerName, "-d", "-v", `${synCfg.configDir}:/data`, "-p", "8008/tcp", From 13ee0829e7f19f261f42682a84220eeefe1de4ed Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 12:56:34 +0100 Subject: [PATCH 39/42] Fix yaml --- .github/workflows/element-build-and-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/element-build-and-test.yaml b/.github/workflows/element-build-and-test.yaml index f6233b1cac9..e88c5105464 100644 --- a/.github/workflows/element-build-and-test.yaml +++ b/.github/workflows/element-build-and-test.yaml @@ -1,7 +1,7 @@ # Produce a build of element-web with this version of react-sdk # and any matching branches of element-web and js-sdk, output it # as an artifact and run integration tests. -name: Element Web: Build and Test +name: Element Web - Build and Test on: pull_request: jobs: From 58f32b7645a115f8b8a134846494ec608e39a1ab Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 15:04:28 +0100 Subject: [PATCH 40/42] Stream logs to file --- cypress/plugins/synapsedocker/index.ts | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 8b1d622292f..91f6d87be52 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -138,17 +138,18 @@ async function synapseStop(id) { const synapseLogsPath = path.join("cypress", "synapselogs", id); await fse.ensureDir(synapseLogsPath); + const stdoutFile = await fse.open(path.join(synapseLogsPath, "stdout.log"), "w"); + const stderrFile = await fse.open(path.join(synapseLogsPath, "stderr.log"), "w"); await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ + childProcess.spawn('docker', [ "logs", id, - ], async (err, stdout, stderr) => { - if (err) reject(err); - await fse.writeFile(path.join(synapseLogsPath, "stdout.log"), stdout); - await fse.writeFile(path.join(synapseLogsPath, "stderr.log"), stderr); - resolve(); - }); + ], { + stdio: ["ignore", stdoutFile, stderrFile], + }).once('close', resolve); }); + await fse.close(stdoutFile); + await fse.close(stderrFile); await new Promise((resolve, reject) => { childProcess.execFile('docker', [ From d5d9aa79cf973a0f400241bbe2c1e5b15716ab3b Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 13 Apr 2022 16:07:23 +0100 Subject: [PATCH 41/42] Add note to end to end tester to sya what's been ported --- test/end-to-end-tests/src/scenario.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/test/end-to-end-tests/src/scenario.ts b/test/end-to-end-tests/src/scenario.ts index e6a588eac96..dc6e1309d78 100644 --- a/test/end-to-end-tests/src/scenario.ts +++ b/test/end-to-end-tests/src/scenario.ts @@ -41,6 +41,7 @@ export async function scenario(createSession: (s: string) => Promise Date: Thu, 14 Apr 2022 10:00:08 +0100 Subject: [PATCH 42/42] Put docker rm in finally block --- cypress/plugins/synapsedocker/index.ts | 68 +++++++++++++------------- 1 file changed, 35 insertions(+), 33 deletions(-) diff --git a/cypress/plugins/synapsedocker/index.ts b/cypress/plugins/synapsedocker/index.ts index 91f6d87be52..0f029e7b2ed 100644 --- a/cypress/plugins/synapsedocker/index.ts +++ b/cypress/plugins/synapsedocker/index.ts @@ -135,41 +135,43 @@ async function synapseStop(id) { if (!synCfg) throw new Error("Unknown synapse ID"); - const synapseLogsPath = path.join("cypress", "synapselogs", id); - await fse.ensureDir(synapseLogsPath); - - const stdoutFile = await fse.open(path.join(synapseLogsPath, "stdout.log"), "w"); - const stderrFile = await fse.open(path.join(synapseLogsPath, "stderr.log"), "w"); - await new Promise((resolve, reject) => { - childProcess.spawn('docker', [ - "logs", - id, - ], { - stdio: ["ignore", stdoutFile, stderrFile], - }).once('close', resolve); - }); - await fse.close(stdoutFile); - await fse.close(stderrFile); - - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "stop", - id, - ], err => { - if (err) reject(err); - resolve(); + try { + const synapseLogsPath = path.join("cypress", "synapselogs", id); + await fse.ensureDir(synapseLogsPath); + + const stdoutFile = await fse.open(path.join(synapseLogsPath, "stdout.log"), "w"); + const stderrFile = await fse.open(path.join(synapseLogsPath, "stderr.log"), "w"); + await new Promise((resolve, reject) => { + childProcess.spawn('docker', [ + "logs", + id, + ], { + stdio: ["ignore", stdoutFile, stderrFile], + }).once('close', resolve); }); - }); - - await new Promise((resolve, reject) => { - childProcess.execFile('docker', [ - "rm", - id, - ], err => { - if (err) reject(err); - resolve(); + await fse.close(stdoutFile); + await fse.close(stderrFile); + + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "stop", + id, + ], err => { + if (err) reject(err); + resolve(); + }); }); - }); + } finally { + await new Promise((resolve, reject) => { + childProcess.execFile('docker', [ + "rm", + id, + ], err => { + if (err) reject(err); + resolve(); + }); + }); + } await fse.remove(synCfg.configDir);