Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Cypress/cypress/integration/Performance/performance.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import * as user from "../../fixtures/Users.json";

describe('Lighthouse', () => {
before("Clearing the Cookies and deleting the Cookies", () => {
cy.requestLogin(user.AdminName, user.AdminPassword);
cy.waitForCluster("Self-Agent");
cy.visit("/create-workflow");
});

it('should run performance audits', () => {
cy.lighthouse();
});
});
2 changes: 1 addition & 1 deletion Cypress/cypress/integration/smoke/smoke.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* It will go through the sub smoke tests written in smoke.js
*/

import { customWorkflowSmokeTest, loginSmokeTest, preDefinedWorkflowSmokeTest, templateWorkflowSmokeTest, uploadWorkflowSmokeTest } from './smoke';
import { customWorkflowSmokeTest, loginSmokeTest, preDefinedWorkflowSmokeTest, setup, templateWorkflowSmokeTest, uploadWorkflowSmokeTest } from './smoke';

it('Smoke Test Login Page', () => {
loginSmokeTest();
Expand Down
16 changes: 13 additions & 3 deletions Cypress/cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,17 @@
/**
* @type {Cypress.PluginConfig}
*/

const { lighthouse, prepareAudit } = require('cypress-audit');

module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
}
on('before:browser:launch', (browser = {}, launchOptions) => {
prepareAudit(launchOptions);
});

on("task", {
lighthouse: lighthouse((lighthouseReport) => {
console.log(lighthouseReport); // raw lighthouse reports
})
});
};
3 changes: 2 additions & 1 deletion Cypress/cypress/support/commands.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
//This Script provides plugins and common utilities for tests.

//// ******************* Plugins Added *****************************
import "cypress-wait-until";
import "cypress-audit/commands";
import "cypress-file-upload";
import "cypress-wait-until";

//Custom Command for waiting for required Agent to come in active state.
Cypress.Commands.add("waitForCluster", (agentName) => {
Expand Down
Loading