Use cypress-terminal-report (#11226)
* Use cypress-terminal-report This cypress plugin gives nice console logs about what is happening: I hope it will help us debug mysteriously failing tests. In its default config, it only logs for failing tests. * another anti-morgan hack * Disable collection of `console.debug` * `ctr:info` is not real
This commit is contained in:
@@ -15,6 +15,7 @@ limitations under the License.
|
||||
*/
|
||||
|
||||
/// <reference types="cypress" />
|
||||
import installLogsPrinter from "cypress-terminal-report/src/installLogsPrinter";
|
||||
|
||||
import PluginEvents = Cypress.PluginEvents;
|
||||
import PluginConfigOptions = Cypress.PluginConfigOptions;
|
||||
@@ -35,4 +36,7 @@ export default function (on: PluginEvents, config: PluginConfigOptions) {
|
||||
slidingSyncProxyDocker(on, config);
|
||||
webserver(on, config);
|
||||
log(on, config);
|
||||
installLogsPrinter(on, {
|
||||
// printLogsToConsole: "always",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ limitations under the License.
|
||||
import "@percy/cypress";
|
||||
import "cypress-real-events";
|
||||
import "@testing-library/cypress/add-commands";
|
||||
import installLogsCollector from "cypress-terminal-report/src/installLogsCollector";
|
||||
|
||||
import "./config.json";
|
||||
import "./homeserver";
|
||||
@@ -39,3 +40,20 @@ import "./network";
|
||||
import "./composer";
|
||||
import "./proxy";
|
||||
import "./axe";
|
||||
|
||||
installLogsCollector({
|
||||
// specify the types of logs to collect (and report to the node console at the end of the test)
|
||||
collectTypes: [
|
||||
"cons:log",
|
||||
"cons:info",
|
||||
"cons:warn",
|
||||
"cons:error",
|
||||
// "cons:debug",
|
||||
"cy:log",
|
||||
"cy:xhr",
|
||||
"cy:fetch",
|
||||
"cy:request",
|
||||
"cy:intercept",
|
||||
"cy:command",
|
||||
],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user