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

Commit

Permalink
test smoke suite
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry Archibald committed Sep 4, 2023
1 parent ce8d07f commit 092748d
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 12 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/cypress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ jobs:
COMMIT_INFO_EMAIL: ${{ needs.prepare.outputs.commit_email }}
CYPRESS_PULL_REQUEST_ID: ${{ needs.prepare.outputs.pr_id }}
CYPRESS_PULL_REQUEST_URL: https://github.com/${{ github.repository }}/pull/${{ needs.prepare.outputs.pr_id }}

CYPRESS_grepTags: smoke

# pass the Percy token as an environment variable
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/composer/composer.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ describe("Composer", () => {
cy.createRoom({ name: "Composing Room" }).then((roomId) => cy.viewRoomById(roomId));
});

it("sends a message when you click send or press Enter", () => {
it("sends a message when you click send or press Enter", { tags: ["smoke"]}, () => {

Check failure on line 43 in cypress/e2e/composer/composer.spec.ts

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

No overload matches this call.
// Type a message
cy.findByRole("textbox", { name: "Send a message…" }).type("my message 0");
// It has not been sent yet
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/create-room/create-room.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function openCreateRoomDialog(): Chainable<JQuery<HTMLElement>> {
return cy.get(".mx_CreateRoomDialog");
}

describe("Create Room", () => {
describe("Create Room", { tags: ["smoke"] }, () => {

Check failure on line 28 in cypress/e2e/create-room/create-room.spec.ts

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Argument of type '{ tags: string[]; }' is not assignable to parameter of type 'SuiteConfigOverrides'.

Check failure on line 28 in cypress/e2e/create-room/create-room.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint

Second argument must be function
let homeserver: HomeserverInstance;

beforeEach(() => {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/crypto/crypto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const verify = function (this: CryptoTestContext) {
});
};

describe("Cryptography", function () {
describe("Cryptography", { tags: ["smoke"]}, function () {

Check failure on line 130 in cypress/e2e/crypto/crypto.spec.ts

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Argument of type '{ tags: string[]; }' is not assignable to parameter of type 'SuiteConfigOverrides'.

Check failure on line 130 in cypress/e2e/crypto/crypto.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint

Second argument must be function
let aliceCredentials: UserCredentials;

beforeEach(function () {
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/invite/invite-dialog.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ limitations under the License.
import type { MatrixClient } from "matrix-js-sdk/src/matrix";
import { HomeserverInstance } from "../../plugins/utils/homeserver";

describe("Invite dialog", function () {
describe("Invite dialog", { tags: ["smoke"] }, function () {

Check failure on line 20 in cypress/e2e/invite/invite-dialog.spec.ts

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Argument of type '{ tags: string[]; }' is not assignable to parameter of type 'SuiteConfigOverrides'.

Check failure on line 20 in cypress/e2e/invite/invite-dialog.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint

Second argument must be function
let homeserver: HomeserverInstance;
let bot: MatrixClient;
const botName = "BotAlice";
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2e/login/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ limitations under the License.
import { HomeserverInstance } from "../../plugins/utils/homeserver";
import { doTokenRegistration } from "./utils";

describe("Login", () => {
describe("Login", { tags: ["smoke"]}, () => {

Check failure on line 22 in cypress/e2e/login/login.spec.ts

View workflow job for this annotation

GitHub Actions / Typescript Syntax Check

Argument of type '{ tags: string[]; }' is not assignable to parameter of type 'SuiteConfigOverrides'.

Check failure on line 22 in cypress/e2e/login/login.spec.ts

View workflow job for this annotation

GitHub Actions / ESLint

Second argument must be function
let homeserver: HomeserverInstance;

afterEach(() => {
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/spotlight/spotlight.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ describe("Spotlight", () => {
cy.stopHomeserver(homeserver);
});

it("should be able to add and remove filters via keyboard", () => {
it.skip("should be able to add and remove filters via keyboard", () => {
cy.openSpotlightDialog().within(() => {
cy.wait(1000); // wait for the dialog to settle, otherwise our keypresses might race with an update

Expand All @@ -237,7 +237,7 @@ describe("Spotlight", () => {
});
});

it("should find joined rooms", () => {
it("kerry sshould find joined rooms", () => {
cy.openSpotlightDialog()
.within(() => {
cy.spotlightSearch().clear().type(room1Name);
Expand Down
3 changes: 3 additions & 0 deletions cypress/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
/// <reference types="cypress" />
import installLogsPrinter from "cypress-terminal-report/src/installLogsPrinter";

const registerCypressGrep = require('@cypress/grep/src/plugin')

Check failure on line 20 in cypress/plugins/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

Require statement not part of import statement

Check failure on line 20 in cypress/plugins/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

`@cypress/grep/src/plugin` import should occur after import of `./mailhog`

import PluginEvents = Cypress.PluginEvents;

Check failure on line 22 in cypress/plugins/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

Import in body of module; reorder to top
import PluginConfigOptions = Cypress.PluginConfigOptions;

Check failure on line 23 in cypress/plugins/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

Import in body of module; reorder to top
import { synapseDocker } from "./synapsedocker";

Check failure on line 24 in cypress/plugins/index.ts

View workflow job for this annotation

GitHub Actions / ESLint

Import in body of module; reorder to top
Expand All @@ -32,6 +34,7 @@ import { mailhogDocker } from "./mailhog";
* @type {Cypress.PluginConfig}
*/
export default function (on: PluginEvents, config: PluginConfigOptions) {
registerCypressGrep(config);
docker(on, config);
synapseDocker(on, config);
dendriteDocker(on, config);
Expand Down
2 changes: 2 additions & 0 deletions cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ import "./axe";
import "./mailhog";
import "./promise";



installLogsCollector({
// specify the types of logs to collect (and report to the node console at the end of the test)
collectTypes: [
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"lint:types": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p cypress",
"lint:style": "stylelint \"res/css/**/*.pcss\"",
"test": "jest",
"test:cypress": "cypress run",
"test:cypress": "cypress run --env grepTags=\"core\"",
"test:cypress:open": "cypress open",
"coverage": "yarn test --coverage"
},
Expand Down Expand Up @@ -142,6 +142,7 @@
"@babel/register": "^7.12.10",
"@babel/traverse": "^7.12.12",
"@casualbot/jest-sonar-reporter": "^2.2.5",
"@cypress/grep": "^4.0.0",
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
"@peculiar/webcrypto": "^1.4.3",
"@percy/cli": "^1.11.0",
Expand Down
39 changes: 35 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,11 @@
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.10.tgz#e37634f9a12a1716136c44624ef54283cabd3f55"
integrity sha512-lNbdGsQb9ekfsnjFGhEiF4hfFqGgfOP3H3d27re3n+CGhNuTSUEQdfWk556sTLNTloczcdM5TYF2LhzmDQKyvQ==

"@babel/parser@^7.21.2":
version "7.22.14"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.14.tgz#c7de58e8de106e88efca42ce17f0033209dfd245"
integrity sha512-1KucTHgOvaw/LzCVrEOAyXkr9rQlp0A1HiHRYnSUE9dmb8PvPW7o5sscg+5169r54n3vGlbx6GevTE/Iw/P3AQ==

"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.22.5.tgz#87245a21cd69a73b0b81bcda98d443d6df08f05e"
Expand Down Expand Up @@ -575,7 +580,7 @@
dependencies:
"@babel/helper-plugin-utils" "^7.8.0"

"@babel/plugin-syntax-jsx@^7.22.5":
"@babel/plugin-syntax-jsx@^7.18.6", "@babel/plugin-syntax-jsx@^7.22.5":
version "7.22.5"
resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz#a6b68e84fb76e759fc3b93e901876ffabbe1d918"
integrity sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==
Expand Down Expand Up @@ -1372,6 +1377,15 @@
resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-3.0.0.tgz#798622546b63847e82389e473fd67f2707d82247"
integrity sha512-hBI9tfBtuPIi885ZsZ32IMEU/5nlZH/KOVYJCOh7gyMxaVLGmLedYqFN6Ui1LXkI8JlC8IsuC0rF0btcRZKd5g==

"@cypress/grep@^4.0.0":
version "4.0.0"
resolved "https://registry.yarnpkg.com/@cypress/grep/-/grep-4.0.0.tgz#d219259c62704d86651deceb0bd2d2e80ec5b559"
integrity sha512-5+X1P+GJmLp2IgX/OjoktJxFrezy4pYGI2wmi+574OTZ99yhNTesjKhMm0UJeEMAv9MjfihagroKbjdKNp/+og==
dependencies:
debug "^4.3.4"
find-test-names "^1.19.0"
globby "^11.0.4"

"@cypress/request@^2.88.11":
version "2.88.12"
resolved "https://registry.yarnpkg.com/@cypress/request/-/request-2.88.12.tgz#ba4911431738494a85e93fb04498cb38bc55d590"
Expand Down Expand Up @@ -3105,7 +3119,7 @@ acorn-jsx@^5.3.2:
resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937"
integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==

acorn-walk@^8.0.2, acorn-walk@^8.1.1:
acorn-walk@^8.0.2, acorn-walk@^8.1.1, acorn-walk@^8.2.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1"
integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==
Expand Down Expand Up @@ -4342,7 +4356,7 @@ [email protected]:
dependencies:
ms "2.0.0"

debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.4:
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
Expand Down Expand Up @@ -5460,6 +5474,18 @@ find-cache-dir@^2.0.0:
make-dir "^2.0.0"
pkg-dir "^3.0.0"

find-test-names@^1.19.0:
version "1.28.13"
resolved "https://registry.yarnpkg.com/find-test-names/-/find-test-names-1.28.13.tgz#871d5585d1f618ed772ffe544ea475ab4657ca83"
integrity sha512-hVatCLbiZmvBwqYNGTkVNbeJwK/8pvkXKQGji+23GzW8fVFHcEaRID77eQYItLKGwa1Tmu0AK2LjcUtuid57FQ==
dependencies:
"@babel/parser" "^7.21.2"
"@babel/plugin-syntax-jsx" "^7.18.6"
acorn-walk "^8.2.0"
debug "^4.3.3"
globby "^11.0.4"
simple-bin-help "^1.8.0"

find-up@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/find-up/-/find-up-3.0.0.tgz#49169f1d7993430646da61ecc5ae355c21c97b73"
Expand Down Expand Up @@ -5796,7 +5822,7 @@ globalthis@^1.0.3:
dependencies:
define-properties "^1.1.3"

globby@^11.1.0:
globby@^11.0.4, globby@^11.1.0:
version "11.1.0"
resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b"
integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==
Expand Down Expand Up @@ -9066,6 +9092,11 @@ signal-exit@^4.0.1:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.2.tgz#ff55bb1d9ff2114c13b400688fa544ac63c36967"
integrity sha512-MY2/qGx4enyjprQnFaZsHib3Yadh3IXyV2C321GY0pjGfVBu4un0uDJkwgdxqO+Rdx8JMT8IfJIRwbYVz3Ob3Q==

simple-bin-help@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/simple-bin-help/-/simple-bin-help-1.8.0.tgz#21bb82c6bccd9fa8678f9c0fadf2956b54e2160a"
integrity sha512-0LxHn+P1lF5r2WwVB/za3hLRIsYoLaNq1CXqjbrs3ZvLuvlWnRKrUjEWzV7umZL7hpQ7xULiQMV+0iXdRa5iFg==

sisteransi@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
Expand Down

0 comments on commit 092748d

Please sign in to comment.