You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-11-03 00:33:22 +03:00
Improve cypress logging output (#10845)
... by grouping together the output from some custom commands.
This commit is contained in:
committed by
GitHub
parent
2d58489309
commit
9aade5a4d5
@@ -18,6 +18,7 @@ limitations under the License.
|
||||
|
||||
import Chainable = Cypress.Chainable;
|
||||
import { HomeserverInstance } from "../plugins/utils/homeserver";
|
||||
import { collapseLastLogGroup } from "./log";
|
||||
|
||||
export interface UserCredentials {
|
||||
accessToken: string;
|
||||
@@ -100,6 +101,7 @@ Cypress.Commands.add(
|
||||
prelaunchFn?: () => void,
|
||||
userIdPrefix = "user_",
|
||||
): Chainable<UserCredentials> => {
|
||||
Cypress.log({ name: "initTestUser", groupStart: true });
|
||||
// XXX: work around Cypress not clearing IDB between tests
|
||||
cy.window({ log: false }).then((win) => {
|
||||
win.indexedDB.databases()?.then((databases) => {
|
||||
@@ -140,6 +142,13 @@ Cypress.Commands.add(
|
||||
// wait for the app to load
|
||||
return cy.get(".mx_MatrixChat", { timeout: 30000 });
|
||||
})
|
||||
.then(() => {
|
||||
Cypress.log({
|
||||
groupEnd: true,
|
||||
emitOnly: true,
|
||||
});
|
||||
collapseLastLogGroup();
|
||||
})
|
||||
.then(() => ({
|
||||
password,
|
||||
username,
|
||||
|
||||
Reference in New Issue
Block a user