From a2dc03bfb0b33b0a16e6cc125e488d3d3f261721 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 6 Mar 2025 10:57:40 -0500 Subject: [PATCH 01/21] initial commit of poc --- .gitignore | 1 + packages/manager/cypress.config.ts | 4 +- .../e2e/core/longview/longview.spec.ts | 565 +++++++++--------- packages/manager/cypress/support/e2e.ts | 3 +- .../support/plugins/configure-test-suite.ts | 3 +- .../cypress/support/plugins/html-report.ts | 19 + packages/manager/package.json | 1 + pnpm-lock.yaml | 276 +++++++++ 8 files changed, 589 insertions(+), 283 deletions(-) create mode 100644 packages/manager/cypress/support/plugins/html-report.ts diff --git a/.gitignore b/.gitignore index 7e58fb3e68e..fe569e46f54 100644 --- a/.gitignore +++ b/.gitignore @@ -128,6 +128,7 @@ packages/manager/test-report.xml **/manager/cypress/downloads/ **/manager/cypress/results/ **/manager/cypress/screenshots/ +**/manager/cypress/reports/ packages/manager/cypress/fixtures/example.json diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index b8596bed4d9..f466f313edf 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -20,7 +20,7 @@ import cypressViteConfig from './cypress/vite.config'; import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-override'; import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; - +import {enableHtmlReport} from './cypress/support/plugins/html-report' /** * Exports a Cypress configuration object. * @@ -101,6 +101,8 @@ export default defineConfig({ enableJunitReport(), generateTestWeights, postRunCleanup, + // html page not generated if enableHtmlReport before postRunCleanup + enableHtmlReport, ]); }, }, diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index 78db13b4ed6..5c04f58f44d 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -128,286 +128,291 @@ const longviewGetLatestValueInstalled = longviewResponseFactory.build({ VERSION: 0.4, }); -authenticate(); +// authenticate(); describe('longview', () => { - before(() => { - cleanUp(['linodes', 'longview-clients']); - }); - - /* - * - Tests Longview installation end-to-end using mock API data. - * - Confirms that Cloud Manager UI updates to reflect Longview installation and data. - */ - - it('can install Longview client on a Linode', () => { - const client: LongviewClient = longviewClientFactory.build({ - api_key: '01AE82DD-6F99-44F6-95781512B64FFBC3', - apps: longviewAppsFactory.build(), - created: new Date().toISOString(), - id: 338283, - install_code: '748632FC-E92B-491F-A29D44019039017C', - label: 'longview-client-longview338283', - updated: new Date().toISOString(), - }); - - mockGetLongviewClients([client]).as('getLongviewClients'); - mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueWaiting - ).as('fetchLongview'); - - const installCommand = getInstallCommand(client.install_code); - - cy.visitWithLogin('/longview'); - cy.wait('@getLongviewClients'); - - // Confirm that Longview landing page lists a client that is still waiting for data... - cy.get(`[data-qa-longview-client="${client.id}"]`) - .should('be.visible') - .within(() => { - cy.findByText(client.label).should('be.visible'); - cy.findByText(client.api_key).should('be.visible'); - cy.contains(installCommand).should('be.visible'); - cy.findByText('Waiting for data...'); - }); - - // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - mockFetchLongviewStatus( - client, - 'lastUpdated', - longviewLastUpdatedInstalled - ); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueInstalled - ); - }); - - // Confirms that UI updates to show that data has been retrieved. - cy.findByText(`${client.label}`).should('be.visible'); - cy.get(`[data-qa-longview-client="${client.id}"]`) - .should('be.visible') - .within(() => { - cy.findByText('Waiting for data...').should('not.exist'); - cy.findByText('CPU').should('be.visible'); - cy.findByText('RAM').should('be.visible'); - cy.findByText('Swap').should('be.visible'); - cy.findByText('Load').should('be.visible'); - cy.findByText('Network').should('be.visible'); - cy.findByText('Storage').should('be.visible'); - }); - }); - - /* - * - Confirms that the landing page empty state message is displayed when no Longview clients are present. - * - Confirms that UI updates to show the new client when creating one. - */ - it('displays empty state message when no clients are present and shows the new client when creating one', () => { - const client: LongviewClient = longviewClientFactory.build(); - mockGetLongviewClients([]).as('getLongviewClients'); - mockCreateLongviewClient(client).as('createLongviewClient'); - mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueWaiting - ).as('fetchLongview'); - + // before(() => { + // cleanUp(['linodes', 'longview-clients']); + // }); + + // /* + // * - Tests Longview installation end-to-end using mock API data. + // * - Confirms that Cloud Manager UI updates to reflect Longview installation and data. + // */ + + // it('can install Longview client on a Linode', () => { + // const client: LongviewClient = longviewClientFactory.build({ + // api_key: '01AE82DD-6F99-44F6-95781512B64FFBC3', + // apps: longviewAppsFactory.build(), + // created: new Date().toISOString(), + // id: 338283, + // install_code: '748632FC-E92B-491F-A29D44019039017C', + // label: 'longview-client-longview338283', + // updated: new Date().toISOString(), + // }); + + // mockGetLongviewClients([client]).as('getLongviewClients'); + // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueWaiting + // ).as('fetchLongview'); + + // const installCommand = getInstallCommand(client.install_code); + + // cy.visitWithLogin('/longview'); + // cy.wait('@getLongviewClients'); + + // // Confirm that Longview landing page lists a client that is still waiting for data... + // cy.get(`[data-qa-longview-client="${client.id}"]`) + // .should('be.visible') + // .within(() => { + // cy.findByText(client.label).should('be.visible'); + // cy.findByText(client.api_key).should('be.visible'); + // cy.contains(installCommand).should('be.visible'); + // cy.findByText('Waiting for data...'); + // }); + + // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. + // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. + // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. + // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 + // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { + // mockFetchLongviewStatus( + // client, + // 'lastUpdated', + // longviewLastUpdatedInstalled + // ); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueInstalled + // ); + // }); + + // // Confirms that UI updates to show that data has been retrieved. + // cy.findByText(`${client.label}`).should('be.visible'); + // cy.get(`[data-qa-longview-client="${client.id}"]`) + // .should('be.visible') + // .within(() => { + // cy.findByText('Waiting for data...').should('not.exist'); + // cy.findByText('CPU').should('be.visible'); + // cy.findByText('RAM').should('be.visible'); + // cy.findByText('Swap').should('be.visible'); + // cy.findByText('Load').should('be.visible'); + // cy.findByText('Network').should('be.visible'); + // cy.findByText('Storage').should('be.visible'); + // }); + // }); + + // /* + // * - Confirms that the landing page empty state message is displayed when no Longview clients are present. + // * - Confirms that UI updates to show the new client when creating one. + // */ + // it('displays empty state message when no clients are present and shows the new client when creating one', () => { + // const client: LongviewClient = longviewClientFactory.build(); + // mockGetLongviewClients([]).as('getLongviewClients'); + // mockCreateLongviewClient(client).as('createLongviewClient'); + // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueWaiting + // ).as('fetchLongview'); + + // cy.visitWithLogin('/longview'); + // cy.wait('@getLongviewClients'); + + // // Confirms that a landing page empty state message is displayed + // cy.findByText(longviewEmptyStateMessage).should('be.visible'); + // cy.findByText(longviewAddClientButtonText).should('be.visible'); + + // ui.button + // .findByTitle(longviewAddClientButtonText) + // .should('be.visible') + // .should('be.enabled') + // .click(); + // cy.wait('@createLongviewClient'); + + // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. + // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. + // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. + // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 + // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { + // mockFetchLongviewStatus( + // client, + // 'lastUpdated', + // longviewLastUpdatedInstalled + // ); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueInstalled + // ); + // }); + + // // Confirms that UI updates to show the new client when creating one. + // cy.findByText(`${client.label}`).should('be.visible'); + // cy.get(`[data-qa-longview-client="${client.id}"]`) + // .should('be.visible') + // .within(() => { + // cy.findByText('Waiting for data...').should('not.exist'); + // cy.findByText('CPU').should('be.visible'); + // cy.findByText('RAM').should('be.visible'); + // cy.findByText('Swap').should('be.visible'); + // cy.findByText('Load').should('be.visible'); + // cy.findByText('Network').should('be.visible'); + // cy.findByText('Storage').should('be.visible'); + // }); + // }); + + // /* + // * - Tests Longview installation end-to-end using mock API data. + // * - Confirms that Cloud Manager UI can rename longview client. + // */ + + // it('can rename a Longview client on a Linode', () => { + // const client: LongviewClient = longviewClientFactory.build(); + + // const newClient: LongviewClient = longviewClientFactory.build({ + // ...client, + // label: randomLabel(), + // }); + + // mockGetLongviewClients([client]).as('getLongviewClients'); + // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueWaiting + // ).as('fetchLongview'); + + // cy.visitWithLogin('/longview'); + // cy.wait('@getLongviewClients'); + + // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. + // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. + // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. + // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 + // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { + // mockFetchLongviewStatus( + // client, + // 'lastUpdated', + // longviewLastUpdatedInstalled + // ); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueInstalled + // ); + // }); + + // mockUpdateLongviewClient(newClient.id, newClient).as('updateLongview'); + + // // Confirms that Cloud Manager UI can rename longview client. + // cy.get(`[data-testid="editable-text"] > [data-testid="button"]`) + // .should('be.visible') + // .click(); + + // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { + // cy.get(`[data-testid="textfield-input"]`).clear(); + // cy.focused().type(newClient.label); + // cy.get(`[aria-label="Save new label"]`).should('be.visible').click(); + // }); + + // cy.wait('@updateLongview'); + // cy.findAllByText(newClient.label).should('be.visible'); + // }); + + // /* + // * - Tests Longview installation end-to-end using mock API data. + // * - Confirms that Cloud Manager UI can delete longview client. + // */ + + // it('can delete a Longview client on a Linode', () => { + // const client: LongviewClient = longviewClientFactory.build(); + // const deleteWarnMessage = + // 'Are you sure you want to delete this Longview Client?'; + + // mockGetLongviewClients([client]).as('getLongviewClients'); + // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueWaiting + // ).as('fetchLongview'); + + // cy.visitWithLogin('/longview'); + // cy.wait('@getLongviewClients'); + + // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. + // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. + // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. + // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 + // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { + // mockFetchLongviewStatus( + // client, + // 'lastUpdated', + // longviewLastUpdatedInstalled + // ); + // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); + // mockFetchLongviewStatus( + // client, + // 'getLatestValue', + // longviewGetLatestValueInstalled + // ); + // }); + + // mockDeleteLongviewClient(client.id).as('deleteLongview'); + + // // Confirms that Cloud Manager UI has delete option. + // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { + // ui.actionMenu + // .findByTitle(`Action menu for Longview Client ${client.label}`) + // .should('be.visible') + // .click(); + // }); + // ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); + + // // Confirms that Cloud Manager UI has delete warning message and can cancel deletion. + // ui.dialog + // .findByTitle(`Delete ${client.label}?`) + // .should('be.visible') + // .within(() => { + // cy.findByText(deleteWarnMessage).should('be.visible'); + // ui.buttonGroup.findButtonByTitle('Cancel').should('be.visible').click(); + // }); + + // // Confirms that Cloud Manager UI can delete a Longview Client. + // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { + // ui.actionMenu + // .findByTitle(`Action menu for Longview Client ${client.label}`) + // .click(); + // }); + // ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); + + // ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { + // ui.buttonGroup + // .findButtonByTitle('Delete') + // .should('be.visible') + // .should('be.enabled') + // .click(); + // }); + + // // Confirm that Longview Client is deleted. + // cy.wait('@deleteLongview'); + // cy.findByText(client.label).should('not.exist'); + // }); + + // the test run still works w/ all the above actual tests, they just take a long time + it("simple test", () => { cy.visitWithLogin('/longview'); - cy.wait('@getLongviewClients'); - - // Confirms that a landing page empty state message is displayed - cy.findByText(longviewEmptyStateMessage).should('be.visible'); - cy.findByText(longviewAddClientButtonText).should('be.visible'); - - ui.button - .findByTitle(longviewAddClientButtonText) - .should('be.visible') - .should('be.enabled') - .click(); - cy.wait('@createLongviewClient'); - - // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - mockFetchLongviewStatus( - client, - 'lastUpdated', - longviewLastUpdatedInstalled - ); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueInstalled - ); - }); - - // Confirms that UI updates to show the new client when creating one. - cy.findByText(`${client.label}`).should('be.visible'); - cy.get(`[data-qa-longview-client="${client.id}"]`) - .should('be.visible') - .within(() => { - cy.findByText('Waiting for data...').should('not.exist'); - cy.findByText('CPU').should('be.visible'); - cy.findByText('RAM').should('be.visible'); - cy.findByText('Swap').should('be.visible'); - cy.findByText('Load').should('be.visible'); - cy.findByText('Network').should('be.visible'); - cy.findByText('Storage').should('be.visible'); - }); - }); - - /* - * - Tests Longview installation end-to-end using mock API data. - * - Confirms that Cloud Manager UI can rename longview client. - */ - - it('can rename a Longview client on a Linode', () => { - const client: LongviewClient = longviewClientFactory.build(); - - const newClient: LongviewClient = longviewClientFactory.build({ - ...client, - label: randomLabel(), - }); - - mockGetLongviewClients([client]).as('getLongviewClients'); - mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueWaiting - ).as('fetchLongview'); - - cy.visitWithLogin('/longview'); - cy.wait('@getLongviewClients'); - - // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - mockFetchLongviewStatus( - client, - 'lastUpdated', - longviewLastUpdatedInstalled - ); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueInstalled - ); - }); - - mockUpdateLongviewClient(newClient.id, newClient).as('updateLongview'); - - // Confirms that Cloud Manager UI can rename longview client. - cy.get(`[data-testid="editable-text"] > [data-testid="button"]`) - .should('be.visible') - .click(); - - cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - cy.get(`[data-testid="textfield-input"]`).clear(); - cy.focused().type(newClient.label); - cy.get(`[aria-label="Save new label"]`).should('be.visible').click(); - }); - - cy.wait('@updateLongview'); - cy.findAllByText(newClient.label).should('be.visible'); - }); - - /* - * - Tests Longview installation end-to-end using mock API data. - * - Confirms that Cloud Manager UI can delete longview client. - */ - - it('can delete a Longview client on a Linode', () => { - const client: LongviewClient = longviewClientFactory.build(); - const deleteWarnMessage = - 'Are you sure you want to delete this Longview Client?'; - - mockGetLongviewClients([client]).as('getLongviewClients'); - mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueWaiting - ).as('fetchLongview'); - - cy.visitWithLogin('/longview'); - cy.wait('@getLongviewClients'); - - // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - mockFetchLongviewStatus( - client, - 'lastUpdated', - longviewLastUpdatedInstalled - ); - mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - mockFetchLongviewStatus( - client, - 'getLatestValue', - longviewGetLatestValueInstalled - ); - }); - - mockDeleteLongviewClient(client.id).as('deleteLongview'); - - // Confirms that Cloud Manager UI has delete option. - cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - ui.actionMenu - .findByTitle(`Action menu for Longview Client ${client.label}`) - .should('be.visible') - .click(); - }); - ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); - - // Confirms that Cloud Manager UI has delete warning message and can cancel deletion. - ui.dialog - .findByTitle(`Delete ${client.label}?`) - .should('be.visible') - .within(() => { - cy.findByText(deleteWarnMessage).should('be.visible'); - ui.buttonGroup.findButtonByTitle('Cancel').should('be.visible').click(); - }); - - // Confirms that Cloud Manager UI can delete a Longview Client. - cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - ui.actionMenu - .findByTitle(`Action menu for Longview Client ${client.label}`) - .click(); - }); - ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); - - ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { - ui.buttonGroup - .findButtonByTitle('Delete') - .should('be.visible') - .should('be.enabled') - .click(); - }); - - // Confirm that Longview Client is deleted. - cy.wait('@deleteLongview'); - cy.findByText(client.label).should('not.exist'); - }); + }) }); diff --git a/packages/manager/cypress/support/e2e.ts b/packages/manager/cypress/support/e2e.ts index 5996d3d71aa..60e275f3e77 100644 --- a/packages/manager/cypress/support/e2e.ts +++ b/packages/manager/cypress/support/e2e.ts @@ -12,7 +12,8 @@ // You can read more here: // https://on.cypress.io/configuration // *********************************************************** - +// mochaawesome doc says this is necessary but it seems to work w/out this step +// import 'cypress-mochawesome-reporter/register'; import '@testing-library/cypress/add-commands'; // Cypress command and assertion setup. import chaiString from 'chai-string'; diff --git a/packages/manager/cypress/support/plugins/configure-test-suite.ts b/packages/manager/cypress/support/plugins/configure-test-suite.ts index 0e431ee07a9..11fcb5a3147 100644 --- a/packages/manager/cypress/support/plugins/configure-test-suite.ts +++ b/packages/manager/cypress/support/plugins/configure-test-suite.ts @@ -33,6 +33,7 @@ export const configureTestSuite: CypressPlugin = (_on, config) => { })(); config.env['cypress_test_suite'] = suiteName; - config.specPattern = `cypress/e2e/${suiteName}/**/*.spec.{ts,tsx}`; + // TODO: remove this, just doing this to shorten test run + config.specPattern = `cypress/e2e/${suiteName}/longview/longview.spec.{ts,tsx}`; return config; }; diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts new file mode 100644 index 00000000000..122565517a2 --- /dev/null +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -0,0 +1,19 @@ +import { CypressPlugin } from './plugin'; +// @ts-expect-error cant figure out how to declare module for /lib +import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; +const { beforeRunHook, afterRunHook } = cypressReporterLib; + +export const enableHtmlReport: CypressPlugin = async ( + on, + config +) => { + config.reporter = 'cypress-mochawesome-reporter'; + on('before:run', async (results) => { + await beforeRunHook(results); + }); + + on('after:run', async () => { + await afterRunHook(); + }); + return config; +}; \ No newline at end of file diff --git a/packages/manager/package.json b/packages/manager/package.json index 020b408a424..836e9281683 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -180,6 +180,7 @@ "cypress": "14.0.1", "cypress-axe": "^1.6.0", "cypress-file-upload": "^5.0.8", + "cypress-mochawesome-reporter": "^3.8.2", "cypress-real-events": "^1.14.0", "cypress-vite": "^1.6.0", "dotenv": "^16.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f93ee8fbd2b..d68a8a65309 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -476,6 +476,9 @@ importers: cypress-file-upload: specifier: ^5.0.8 version: 5.0.8(cypress@14.0.1) + cypress-mochawesome-reporter: + specifier: ^3.8.2 + version: 3.8.2(cypress@14.0.1)(mocha@10.8.2) cypress-real-events: specifier: ^1.14.0 version: 1.14.0(cypress@14.0.1) @@ -3285,6 +3288,10 @@ packages: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} @@ -3417,6 +3424,9 @@ packages: resolution: {integrity: sha512-ouuZd4/dm2Sw5Gmqy6bGyNNNe1qt9RpmxveLSO7KcgsTnU7RXfsw+/bukWGo1abgBiMAic068rclZsO4IWmmxQ==} engines: {node: '>= 12'} + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} @@ -3459,6 +3469,10 @@ packages: comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + commander@12.1.0: resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} @@ -3586,6 +3600,13 @@ packages: peerDependencies: cypress: '>3.0.0' + cypress-mochawesome-reporter@3.8.2: + resolution: {integrity: sha512-oJZkNzhNmN9ZD+LmZyFuPb8aWaIijyHyqYh52YOBvR6B6ckfJNCHP3A98a+/nG0H4t46CKTNwo+wNpMa4d2kjA==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + cypress: '>=6.2.0' + cypress-real-events@1.14.0: resolution: {integrity: sha512-XmI8y3OZLh6cjRroPalzzS++iv+pGCaD9G9kfIbtspgv7GVsDt30dkZvSXfgZb4rAN+3pOkMVB7e0j4oXydW7Q==} peerDependencies: @@ -3668,6 +3689,9 @@ packages: resolution: {integrity: sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==} engines: {node: '>= 0.4'} + dateformat@4.6.3: + resolution: {integrity: sha512-2P0p0pFGzHS5EMnhdxQi7aJN+iMheud0UhG4dlE1DLAlvL8JHjJJTX/CSm4JXwV0Ka5nGk3zC5mcb5bUQUxxMA==} + dayjs@1.11.13: resolution: {integrity: sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==} @@ -3697,6 +3721,10 @@ packages: supports-color: optional: true + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + decamelize@4.0.0: resolution: {integrity: sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==} engines: {node: '>=10'} @@ -3886,6 +3914,9 @@ packages: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + escape-string-regexp@1.0.5: resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} engines: {node: '>=0.8.0'} @@ -4168,6 +4199,10 @@ packages: find-root@1.1.0: resolution: {integrity: sha512-NKfW6bec6GfKc0SGx1e07QZY9PE99u0Bft/0rzSD5k3sO/vwkVUpDUKVm5Gpp5Ue3YfShPFTX2070tDs5kB9Ng==} + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -4230,6 +4265,14 @@ packages: framebus@6.0.0: resolution: {integrity: sha512-bL9V68hVaVBCY9rveoWbPFFI9hAXIJtESs51B+9XmzvMt38+wP8b4VdiJsavjMS6NfPZ/afQ/jc2qaHmSGI1kQ==} + fs-extra@10.1.0: + resolution: {integrity: sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==} + engines: {node: '>=12'} + + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + fs-extra@9.1.0: resolution: {integrity: sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==} engines: {node: '>=10'} @@ -4242,6 +4285,9 @@ packages: engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + fsu@1.1.1: + resolution: {integrity: sha512-xQVsnjJ/5pQtcKh+KjUoZGzVWn4uNkchxTF6Lwjr4Gf7nQr8fmUfhKJ62zE77+xQg9xnxi5KUps7XGs+VC986A==} + function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} @@ -4822,6 +4868,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + jsonfile@6.1.0: resolution: {integrity: sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==} @@ -4928,6 +4977,10 @@ packages: localforage@1.10.0: resolution: {integrity: sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} @@ -4940,10 +4993,23 @@ packages: lodash.get@4.4.2: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + + lodash.isempty@4.4.0: + resolution: {integrity: sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==} + + lodash.isfunction@3.0.9: + resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} + + lodash.isobject@3.0.2: + resolution: {integrity: sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA==} lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} + lodash.isstring@4.0.1: + resolution: {integrity: sha512-0wJxfxH1wgO3GrbuP+dTTk7op+6L41QCXbGINEmD+ny/G/eCqGzxyCsh7159S+mgDDcoarnBw6PC1PS5+wUGgw==} + lodash.merge@4.6.2: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} @@ -5236,6 +5302,20 @@ packages: engines: {node: '>= 14.0.0'} hasBin: true + mochawesome-merge@4.4.1: + resolution: {integrity: sha512-QCzsXrfH5ewf4coUGvrAOZSpRSl9Vg39eqL2SpKKGkUw390f18hx9C90BNWTA4f/teD2nA0Inb1yxYPpok2gvg==} + engines: {node: '>=10.0.0'} + hasBin: true + + mochawesome-report-generator@6.2.0: + resolution: {integrity: sha512-Ghw8JhQFizF0Vjbtp9B0i//+BOkV5OWcQCPpbO0NGOoxV33o+gKDYU0Pr2pGxkIHnqZ+g5mYiXF7GMNgAcDpSg==} + hasBin: true + + mochawesome@7.1.3: + resolution: {integrity: sha512-Vkb3jR5GZ1cXohMQQ73H3cZz7RoxGjjUo0G5hu0jLaW+0FdUxUwg3Cj29bqQdh0rFcnyV06pWmqmi5eBPnEuNQ==} + peerDependencies: + mocha: '>=7' + moment@2.30.1: resolution: {integrity: sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==} @@ -5367,6 +5447,10 @@ packages: resolution: {integrity: sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ==} engines: {node: '>=12'} + opener@1.5.2: + resolution: {integrity: sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==} + hasBin: true + optionator@0.8.3: resolution: {integrity: sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==} engines: {node: '>= 0.8.0'} @@ -5385,10 +5469,18 @@ packages: outvariant@1.4.3: resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==} + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -5397,6 +5489,10 @@ packages: resolution: {integrity: sha512-/bjOqmgETBYB5BoEeGVea8dmvHb2m9GLy1E9W43yeyfP6QQCZGFNa+XRceJEuDB6zqr+gKpIAmlLebMpykw/MQ==} engines: {node: '>=10'} + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + package-json-from-dist@1.0.1: resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} @@ -5843,6 +5939,9 @@ packages: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + requireindex@1.1.0: resolution: {integrity: sha512-LBnkqsDE7BZKvqylbmn7lTIVdpx4K/QCduRATpO5R+wtPmky/a8pN1bO2D6wXppn1497AJF9mNjqAXr6bdl9jg==} engines: {node: '>=0.10.5'} @@ -5973,6 +6072,9 @@ packages: serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-function-length@1.2.2: resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} engines: {node: '>= 0.4'} @@ -6248,6 +6350,12 @@ packages: resolution: {integrity: sha512-w2sfv80nrAh2VCbqR5AK27wswXhqcck2AhfnNW76beQXskGZ1V12GwS//yYVa3d3fcvAip2OUnbDAjW2k3v9fA==} engines: {node: '>=10.0.0'} + tcomb-validation@3.4.1: + resolution: {integrity: sha512-urVVMQOma4RXwiVCa2nM2eqrAomHROHvWPuj6UkDGz/eb5kcy0x6P0dVt6kzpUZtYMNoAqJLWmz1BPtxrtjtrA==} + + tcomb@3.2.29: + resolution: {integrity: sha512-di2Hd1DB2Zfw6StGv861JoAF5h/uQVu/QJp2g8KVbtfKnoHdBQl5M32YWq6mnSYBQ1vFFrns5B1haWJL7rKaOQ==} + terser@5.36.0: resolution: {integrity: sha512-IYV9eNMuFAV4THUspIRXkLakHnV6XO7FEdtKjf/mDyrnqUg9LnlOn6/RwRvM9SZjR4GUq8Nk8zj67FzVARr74w==} engines: {node: '>=10'} @@ -6544,6 +6652,10 @@ packages: unist-util-visit@5.0.0: resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + universalify@0.2.0: resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} engines: {node: '>= 4.0.0'} @@ -6594,6 +6706,10 @@ packages: v8-compile-cache@2.4.0: resolution: {integrity: sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw==} + validator@13.12.0: + resolution: {integrity: sha512-c1Q0mCiPlgdTVVVIJIrBuxNicYE+t/7oKeI9MWLj3fh/uq2Pxh/3eeWbVZ4OcGW1TUf53At0njHw5SMdA3tmMg==} + engines: {node: '>= 0.10'} + value-equal@1.0.1: resolution: {integrity: sha512-NOJ6JZCAWr0zlxZt+xqCHNTEKOsrks2HQd4MqhP1qy4z1SkbEP467eNx6TgDKXMvUOb+OENfJCZwM+16n7fRfw==} @@ -6745,6 +6861,9 @@ packages: resolution: {integrity: sha512-K4jVyjnBdgvc86Y6BkaLZEN933SwYOuBFkdmBu9ZfkcAbdVbpITnDmjvZ/aQjRXQrv5EPkTnD1s39GiiqbngCw==} engines: {node: '>= 0.4'} + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + which-typed-array@1.1.15: resolution: {integrity: sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==} engines: {node: '>= 0.4'} @@ -6823,6 +6942,9 @@ packages: xmlchars@2.2.0: resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} @@ -6835,6 +6957,10 @@ packages: engines: {node: '>= 14'} hasBin: true + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} + yargs-parser@20.2.9: resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} engines: {node: '>=10'} @@ -6847,6 +6973,10 @@ packages: resolution: {integrity: sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==} engines: {node: '>=10'} + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + yargs@16.2.0: resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} engines: {node: '>=10'} @@ -9441,6 +9571,8 @@ snapshots: callsites@3.1.0: {} + camelcase@5.3.1: {} + camelcase@6.3.0: {} caniuse-lite@1.0.30001680: {} @@ -9583,6 +9715,12 @@ snapshots: cli-width@4.1.0: {} + cliui@6.0.0: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + cliui@7.0.4: dependencies: string-width: 4.2.3 @@ -9625,6 +9763,8 @@ snapshots: comma-separated-tokens@2.0.3: {} + commander@10.0.1: {} + commander@12.1.0: {} commander@13.1.0: {} @@ -9738,6 +9878,17 @@ snapshots: dependencies: cypress: 14.0.1 + cypress-mochawesome-reporter@3.8.2(cypress@14.0.1)(mocha@10.8.2): + dependencies: + commander: 10.0.1 + cypress: 14.0.1 + fs-extra: 10.1.0 + mochawesome: 7.1.3(mocha@10.8.2) + mochawesome-merge: 4.4.1 + mochawesome-report-generator: 6.2.0 + transitivePeerDependencies: + - mocha + cypress-real-events@1.14.0(cypress@14.0.1): dependencies: cypress: 14.0.1 @@ -9863,6 +10014,8 @@ snapshots: es-errors: 1.3.0 is-data-view: 1.0.1 + dateformat@4.6.3: {} + dayjs@1.11.13: {} debug@3.2.7(supports-color@8.1.1): @@ -9881,6 +10034,8 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + decamelize@1.2.0: {} + decamelize@4.0.0: {} decimal.js-light@2.5.1: {} @@ -10182,6 +10337,8 @@ snapshots: escalade@3.2.0: {} + escape-html@1.0.3: {} + escape-string-regexp@1.0.5: {} escape-string-regexp@4.0.0: {} @@ -10575,6 +10732,11 @@ snapshots: find-root@1.1.0: {} + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -10639,6 +10801,18 @@ snapshots: dependencies: '@braintree/uuid': 0.1.0 + fs-extra@10.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 6.1.0 + universalify: 2.0.1 + + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + fs-extra@9.1.0: dependencies: at-least-node: 1.0.0 @@ -10651,6 +10825,8 @@ snapshots: fsevents@2.3.3: optional: true + fsu@1.1.1: {} + function-bind@1.1.2: {} function.prototype.name@1.1.6: @@ -11226,6 +11402,10 @@ snapshots: json5@2.2.3: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + jsonfile@6.1.0: dependencies: universalify: 2.0.1 @@ -11370,6 +11550,10 @@ snapshots: dependencies: lie: 3.1.1 + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 @@ -11380,8 +11564,16 @@ snapshots: lodash.get@4.4.2: {} + lodash.isempty@4.4.0: {} + + lodash.isfunction@3.0.9: {} + + lodash.isobject@3.0.2: {} + lodash.isplainobject@4.0.6: {} + lodash.isstring@4.0.1: {} + lodash.merge@4.6.2: {} lodash.once@4.1.1: {} @@ -11873,6 +12065,41 @@ snapshots: yargs-parser: 20.2.9 yargs-unparser: 2.0.0 + mochawesome-merge@4.4.1: + dependencies: + fs-extra: 7.0.1 + glob: 7.2.3 + yargs: 15.4.1 + + mochawesome-report-generator@6.2.0: + dependencies: + chalk: 4.1.2 + dateformat: 4.6.3 + escape-html: 1.0.3 + fs-extra: 10.1.0 + fsu: 1.1.1 + lodash.isfunction: 3.0.9 + opener: 1.5.2 + prop-types: 15.8.1 + tcomb: 3.2.29 + tcomb-validation: 3.4.1 + validator: 13.12.0 + yargs: 17.7.2 + + mochawesome@7.1.3(mocha@10.8.2): + dependencies: + chalk: 4.1.2 + diff: 5.2.0 + json-stringify-safe: 5.0.1 + lodash.isempty: 4.4.0 + lodash.isfunction: 3.0.9 + lodash.isobject: 3.0.2 + lodash.isstring: 4.0.1 + mocha: 10.8.2 + mochawesome-report-generator: 6.2.0 + strip-ansi: 6.0.1 + uuid: 8.3.2 + moment@2.30.1: {} mrmime@2.0.0: {} @@ -12014,6 +12241,8 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 + opener@1.5.2: {} + optionator@0.8.3: dependencies: deep-is: 0.1.4 @@ -12038,10 +12267,18 @@ snapshots: outvariant@1.4.3: {} + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 @@ -12050,6 +12287,8 @@ snapshots: dependencies: aggregate-error: 3.1.0 + p-try@2.2.0: {} + package-json-from-dist@1.0.1: {} parent-module@1.0.1: @@ -12500,6 +12739,8 @@ snapshots: require-from-string@2.0.2: {} + require-main-filename@2.0.0: {} + requireindex@1.1.0: {} requires-port@1.0.0: {} @@ -12660,6 +12901,8 @@ snapshots: dependencies: randombytes: 2.1.0 + set-blocking@2.0.0: {} + set-function-length@1.2.2: dependencies: define-data-property: 1.1.4 @@ -12992,6 +13235,12 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + tcomb-validation@3.4.1: + dependencies: + tcomb: 3.2.29 + + tcomb@3.2.29: {} + terser@5.36.0: dependencies: '@jridgewell/source-map': 0.3.6 @@ -13286,6 +13535,8 @@ snapshots: unist-util-is: 6.0.0 unist-util-visit-parents: 6.0.1 + universalify@0.1.2: {} + universalify@0.2.0: {} universalify@2.0.1: {} @@ -13335,6 +13586,8 @@ snapshots: v8-compile-cache@2.4.0: {} + validator@13.12.0: {} + value-equal@1.0.1: {} verror@1.10.0: @@ -13536,6 +13789,8 @@ snapshots: is-weakmap: 2.0.2 is-weakset: 2.0.3 + which-module@2.0.1: {} + which-typed-array@1.1.15: dependencies: available-typed-arrays: 1.0.7 @@ -13606,12 +13861,19 @@ snapshots: xmlchars@2.2.0: {} + y18n@4.0.3: {} + y18n@5.0.8: {} yallist@3.1.1: {} yaml@2.6.1: {} + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + yargs-parser@20.2.9: {} yargs-parser@21.1.1: {} @@ -13623,6 +13885,20 @@ snapshots: flat: 5.0.2 is-plain-obj: 2.1.0 + yargs@15.4.1: + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + yargs@16.2.0: dependencies: cliui: 7.0.4 From ce9a0343a9dc7c9f7b4adba36a84b0e2d06b763c Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 10 Mar 2025 09:39:12 -0400 Subject: [PATCH 02/21] initial commit --- packages/manager/cypress.config.ts | 9 ++--- packages/manager/cypress/support/e2e.ts | 2 -- .../support/plugins/configure-test-suite.ts | 2 +- .../cypress/support/plugins/html-report.ts | 33 ++++++++++--------- packages/manager/package.json | 7 ++-- pnpm-lock.yaml | 25 +++++++++++--- 6 files changed, 49 insertions(+), 29 deletions(-) diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index f466f313edf..811fba111ed 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -17,10 +17,11 @@ import { enableJunitReport } from './cypress/support/plugins/junit-report'; import { generateTestWeights } from './cypress/support/plugins/generate-weights'; import { logTestTagInfo } from './cypress/support/plugins/test-tagging-info'; import cypressViteConfig from './cypress/vite.config'; +import { enableHtmlReport } from './cypress/support/plugins/html-report'; import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-override'; import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; -import {enableHtmlReport} from './cypress/support/plugins/html-report' +import cypressOnFix from 'cypress-on-fix'; /** * Exports a Cypress configuration object. * @@ -81,7 +82,8 @@ export default defineConfig({ // See `cypress/support/plugins/configure-test-suite.ts`. specPattern: 'cypress/e2e/core/**/*.spec.{ts,tsx}', - setupNodeEvents(on, config) { + setupNodeEvents(cypressOn, config) { + const on = cypressOnFix(cypressOn); return setupPlugins(on, config, [ loadEnvironmentConfig, nodeVersionCheck, @@ -100,9 +102,8 @@ export default defineConfig({ splitCypressRun, enableJunitReport(), generateTestWeights, - postRunCleanup, - // html page not generated if enableHtmlReport before postRunCleanup enableHtmlReport, + postRunCleanup, ]); }, }, diff --git a/packages/manager/cypress/support/e2e.ts b/packages/manager/cypress/support/e2e.ts index 60e275f3e77..e6b0d1d854b 100644 --- a/packages/manager/cypress/support/e2e.ts +++ b/packages/manager/cypress/support/e2e.ts @@ -12,8 +12,6 @@ // You can read more here: // https://on.cypress.io/configuration // *********************************************************** -// mochaawesome doc says this is necessary but it seems to work w/out this step -// import 'cypress-mochawesome-reporter/register'; import '@testing-library/cypress/add-commands'; // Cypress command and assertion setup. import chaiString from 'chai-string'; diff --git a/packages/manager/cypress/support/plugins/configure-test-suite.ts b/packages/manager/cypress/support/plugins/configure-test-suite.ts index 11fcb5a3147..edce6eefcbc 100644 --- a/packages/manager/cypress/support/plugins/configure-test-suite.ts +++ b/packages/manager/cypress/support/plugins/configure-test-suite.ts @@ -34,6 +34,6 @@ export const configureTestSuite: CypressPlugin = (_on, config) => { config.env['cypress_test_suite'] = suiteName; // TODO: remove this, just doing this to shorten test run - config.specPattern = `cypress/e2e/${suiteName}/longview/longview.spec.{ts,tsx}`; + config.specPattern = `cypress/e2e/${suiteName}/**/**.spec.{ts,tsx}`; return config; }; diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts index 122565517a2..17c5d3d8df4 100644 --- a/packages/manager/cypress/support/plugins/html-report.ts +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -1,19 +1,22 @@ import { CypressPlugin } from './plugin'; // @ts-expect-error cant figure out how to declare module for /lib import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; -const { beforeRunHook, afterRunHook } = cypressReporterLib; - -export const enableHtmlReport: CypressPlugin = async ( - on, - config -) => { - config.reporter = 'cypress-mochawesome-reporter'; - on('before:run', async (results) => { - await beforeRunHook(results); - }); +const { beforeRunHook, afterRunHook } = cypressReporterLib; - on('after:run', async () => { - await afterRunHook(); - }); - return config; -}; \ No newline at end of file +export const enableHtmlReport: CypressPlugin = async function (on, config) { + config.reporter = 'cypress-mochawesome-reporter'; + config.reporterOptions = { + embeddedScreenshots: true, + charts: true, + videoOnFailOnly: true, + quiet: true, + }; + on('before:run', async (results) => { + await beforeRunHook(results); + }); + + on('after:run', async () => { + await afterRunHook(); + }); + return config; +}; diff --git a/packages/manager/package.json b/packages/manager/package.json index 836e9281683..172c97c365b 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -27,8 +27,8 @@ "@linode/design-language-system": "^4.0.0", "@linode/search": "workspace:*", "@linode/ui": "workspace:*", - "@linode/validation": "workspace:*", "@linode/utilities": "workspace:*", + "@linode/validation": "workspace:*", "@lukemorales/query-key-factory": "^1.3.4", "@mui/icons-material": "^6.4.5", "@mui/material": "^6.4.5", @@ -119,7 +119,9 @@ "prettier --write", "eslint --ext .js,.ts,.tsx --quiet" ], - "*.{ts,tsx}": ["sh -c 'pnpm typecheck'"] + "*.{ts,tsx}": [ + "sh -c 'pnpm typecheck'" + ] }, "devDependencies": { "@4tw/cypress-drag-drop": "^2.3.0", @@ -181,6 +183,7 @@ "cypress-axe": "^1.6.0", "cypress-file-upload": "^5.0.8", "cypress-mochawesome-reporter": "^3.8.2", + "cypress-on-fix": "^1.1.0", "cypress-real-events": "^1.14.0", "cypress-vite": "^1.6.0", "dotenv": "^16.0.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d68a8a65309..11dda1a711f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -479,6 +479,9 @@ importers: cypress-mochawesome-reporter: specifier: ^3.8.2 version: 3.8.2(cypress@14.0.1)(mocha@10.8.2) + cypress-on-fix: + specifier: ^1.1.0 + version: 1.1.0 cypress-real-events: specifier: ^1.14.0 version: 1.14.0(cypress@14.0.1) @@ -545,6 +548,9 @@ importers: mocha-junit-reporter: specifier: ^2.2.1 version: 2.2.1(mocha@10.8.2) + mochawesome: + specifier: ^7.1.3 + version: 7.1.3(mocha@10.8.2) msw: specifier: ^2.2.3 version: 2.6.5(@types/node@20.17.6)(typescript@5.7.3) @@ -3607,6 +3613,9 @@ packages: peerDependencies: cypress: '>=6.2.0' + cypress-on-fix@1.1.0: + resolution: {integrity: sha512-qGdbC0vZLmR3lYPpWWZvMqgDTeA2v04zu3DBdBmJHbG+BjwlFNYGnL7Y+X4LBrB+AyCCCeCuXhV80UXA90UhWg==} + cypress-real-events@1.14.0: resolution: {integrity: sha512-XmI8y3OZLh6cjRroPalzzS++iv+pGCaD9G9kfIbtspgv7GVsDt30dkZvSXfgZb4rAN+3pOkMVB7e0j4oXydW7Q==} peerDependencies: @@ -7614,7 +7623,7 @@ snapshots: '@eslint/eslintrc@0.4.3': dependencies: ajv: 6.12.6 - debug: 4.3.7 + debug: 4.4.0(supports-color@8.1.1) espree: 7.3.1 globals: 13.24.0 ignore: 4.0.6 @@ -7636,7 +7645,7 @@ snapshots: '@humanwhocodes/config-array@0.5.0': dependencies: '@humanwhocodes/object-schema': 1.2.1 - debug: 4.3.7 + debug: 4.4.0(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -7813,7 +7822,7 @@ snapshots: '@kwsites/file-exists@1.1.1': dependencies: - debug: 4.3.7 + debug: 4.4.0(supports-color@8.1.1) transitivePeerDependencies: - supports-color @@ -9030,7 +9039,7 @@ snapshots: dependencies: '@typescript-eslint/typescript-estree': 6.21.0(typescript@5.7.3) '@typescript-eslint/utils': 6.21.0(eslint@7.32.0)(typescript@5.7.3) - debug: 4.3.7 + debug: 4.4.0(supports-color@8.1.1) eslint: 7.32.0 ts-api-utils: 1.4.0(typescript@5.7.3) optionalDependencies: @@ -9077,7 +9086,7 @@ snapshots: dependencies: '@typescript-eslint/types': 6.21.0 '@typescript-eslint/visitor-keys': 6.21.0 - debug: 4.3.7 + debug: 4.4.0(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -9889,6 +9898,12 @@ snapshots: transitivePeerDependencies: - mocha + cypress-on-fix@1.1.0: + dependencies: + debug: 4.4.0(supports-color@8.1.1) + transitivePeerDependencies: + - supports-color + cypress-real-events@1.14.0(cypress@14.0.1): dependencies: cypress: 14.0.1 From c52a127d67a482dc2f02fa0041bc9ad4a1d46687 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 10 Mar 2025 09:40:08 -0400 Subject: [PATCH 03/21] fix --- .../e2e/core/longview/longview.spec.ts | 456 ++---------------- 1 file changed, 49 insertions(+), 407 deletions(-) diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index 5c04f58f44d..def2a6a8b67 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -1,418 +1,60 @@ -import type { LongviewClient } from '@linode/api-v4'; -import { DateTime } from 'luxon'; -import { - longviewResponseFactory, - longviewClientFactory, - longviewAppsFactory, - longviewLatestStatsFactory, - longviewPackageFactory, -} from 'src/factories'; +import type { ActiveLongviewPlan } from '@linode/api-v4'; +import { longviewActivePlanFactory } from 'src/factories'; import { authenticate } from 'support/api/authentication'; import { - longviewStatusTimeout, - longviewEmptyStateMessage, - longviewAddClientButtonText, -} from 'support/constants/longview'; -import { - interceptFetchLongviewStatus, - mockGetLongviewClients, - mockFetchLongviewStatus, - mockCreateLongviewClient, - mockDeleteLongviewClient, - mockUpdateLongviewClient, + mockGetLongviewPlan, + mockUpdateLongviewPlan, } from 'support/intercepts/longview'; import { ui } from 'support/ui'; import { cleanUp } from 'support/util/cleanup'; -import { randomLabel } from 'support/util/random'; - -/** - * Returns the command used to install Longview which is shown in Cloud's UI. - * - * @param installCode - Longview client install code. - * - * @returns Install command string. - */ -const getInstallCommand = (installCode: string): string => { - return `curl -s https://lv.linode.com/${installCode} | sudo bash`; -}; - -/** - * Waits for Cloud Manager to fetch Longview data and receive updates. - * - * Cloud Manager makes repeated requests to the `/fetch` endpoint, and this - * function waits until one of these requests receives a response for the - * desired Longview client indicating that its data has been updated. - * - * @param alias - Alias assigned to the initial HTTP intercept. - * @param apiKey - API key for Longview client. - */ -const waitForLongviewData = ( - alias: string, - apiKey: string, - attempt: number = 0 -) => { - const maxAttempts = 50; - // Escape route in case expected response is never received. - if (attempt > maxAttempts) { - throw new Error( - `Timed out waiting for Longview client update after ${maxAttempts} attempts` - ); - } - cy.wait(`@${alias}`, { timeout: longviewStatusTimeout }).then( - (interceptedRequest) => { - const responseBody = interceptedRequest.response?.body?.[0]; - const apiKeyMatches = (interceptedRequest?.request?.body ?? '').includes( - apiKey - ); - const containsUpdate = - responseBody?.ACTION === 'lastUpdated' && - responseBody?.DATA?.updated !== 0; - - if (!(apiKeyMatches && containsUpdate)) { - interceptFetchLongviewStatus().as(alias); - waitForLongviewData(alias, apiKey, attempt + 1); - } - } - ); -}; - -/* - * Mocks that represent the state of Longview while waiting for client to be installed. - */ -const longviewLastUpdatedWaiting = longviewResponseFactory.build({ - ACTION: 'lastUpdated', - DATA: { updated: 0 }, - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -const longviewGetValuesWaiting = longviewResponseFactory.build({ - ACTION: 'getValues', - DATA: {}, - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -const longviewGetLatestValueWaiting = longviewResponseFactory.build({ - ACTION: 'getLatestValue', - DATA: {}, - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -/* - * Mocks that represent the state of Longview once client is installed and data is received. - */ -const longviewLastUpdatedInstalled = longviewResponseFactory.build({ - ACTION: 'lastUpdated', - DATA: { - updated: DateTime.now().plus({ minutes: 1 }).toSeconds(), - }, - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -const longviewGetValuesInstalled = longviewResponseFactory.build({ - ACTION: 'getValues', - DATA: { - Packages: longviewPackageFactory.buildList(5), - }, - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -const longviewGetLatestValueInstalled = longviewResponseFactory.build({ - ACTION: 'getLatestValue', - DATA: longviewLatestStatsFactory.build(), - NOTIFICATIONS: [], - VERSION: 0.4, -}); - -// authenticate(); -describe('longview', () => { - // before(() => { - // cleanUp(['linodes', 'longview-clients']); - // }); - - // /* - // * - Tests Longview installation end-to-end using mock API data. - // * - Confirms that Cloud Manager UI updates to reflect Longview installation and data. - // */ - - // it('can install Longview client on a Linode', () => { - // const client: LongviewClient = longviewClientFactory.build({ - // api_key: '01AE82DD-6F99-44F6-95781512B64FFBC3', - // apps: longviewAppsFactory.build(), - // created: new Date().toISOString(), - // id: 338283, - // install_code: '748632FC-E92B-491F-A29D44019039017C', - // label: 'longview-client-longview338283', - // updated: new Date().toISOString(), - // }); - - // mockGetLongviewClients([client]).as('getLongviewClients'); - // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueWaiting - // ).as('fetchLongview'); - - // const installCommand = getInstallCommand(client.install_code); - - // cy.visitWithLogin('/longview'); - // cy.wait('@getLongviewClients'); - - // // Confirm that Longview landing page lists a client that is still waiting for data... - // cy.get(`[data-qa-longview-client="${client.id}"]`) - // .should('be.visible') - // .within(() => { - // cy.findByText(client.label).should('be.visible'); - // cy.findByText(client.api_key).should('be.visible'); - // cy.contains(installCommand).should('be.visible'); - // cy.findByText('Waiting for data...'); - // }); - - // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - // mockFetchLongviewStatus( - // client, - // 'lastUpdated', - // longviewLastUpdatedInstalled - // ); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueInstalled - // ); - // }); - - // // Confirms that UI updates to show that data has been retrieved. - // cy.findByText(`${client.label}`).should('be.visible'); - // cy.get(`[data-qa-longview-client="${client.id}"]`) - // .should('be.visible') - // .within(() => { - // cy.findByText('Waiting for data...').should('not.exist'); - // cy.findByText('CPU').should('be.visible'); - // cy.findByText('RAM').should('be.visible'); - // cy.findByText('Swap').should('be.visible'); - // cy.findByText('Load').should('be.visible'); - // cy.findByText('Network').should('be.visible'); - // cy.findByText('Storage').should('be.visible'); - // }); - // }); - - // /* - // * - Confirms that the landing page empty state message is displayed when no Longview clients are present. - // * - Confirms that UI updates to show the new client when creating one. - // */ - // it('displays empty state message when no clients are present and shows the new client when creating one', () => { - // const client: LongviewClient = longviewClientFactory.build(); - // mockGetLongviewClients([]).as('getLongviewClients'); - // mockCreateLongviewClient(client).as('createLongviewClient'); - // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueWaiting - // ).as('fetchLongview'); - - // cy.visitWithLogin('/longview'); - // cy.wait('@getLongviewClients'); - - // // Confirms that a landing page empty state message is displayed - // cy.findByText(longviewEmptyStateMessage).should('be.visible'); - // cy.findByText(longviewAddClientButtonText).should('be.visible'); - - // ui.button - // .findByTitle(longviewAddClientButtonText) - // .should('be.visible') - // .should('be.enabled') - // .click(); - // cy.wait('@createLongviewClient'); - - // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - // mockFetchLongviewStatus( - // client, - // 'lastUpdated', - // longviewLastUpdatedInstalled - // ); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueInstalled - // ); - // }); - - // // Confirms that UI updates to show the new client when creating one. - // cy.findByText(`${client.label}`).should('be.visible'); - // cy.get(`[data-qa-longview-client="${client.id}"]`) - // .should('be.visible') - // .within(() => { - // cy.findByText('Waiting for data...').should('not.exist'); - // cy.findByText('CPU').should('be.visible'); - // cy.findByText('RAM').should('be.visible'); - // cy.findByText('Swap').should('be.visible'); - // cy.findByText('Load').should('be.visible'); - // cy.findByText('Network').should('be.visible'); - // cy.findByText('Storage').should('be.visible'); - // }); - // }); - - // /* - // * - Tests Longview installation end-to-end using mock API data. - // * - Confirms that Cloud Manager UI can rename longview client. - // */ - - // it('can rename a Longview client on a Linode', () => { - // const client: LongviewClient = longviewClientFactory.build(); - - // const newClient: LongviewClient = longviewClientFactory.build({ - // ...client, - // label: randomLabel(), - // }); - - // mockGetLongviewClients([client]).as('getLongviewClients'); - // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueWaiting - // ).as('fetchLongview'); - - // cy.visitWithLogin('/longview'); - // cy.wait('@getLongviewClients'); - - // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - // mockFetchLongviewStatus( - // client, - // 'lastUpdated', - // longviewLastUpdatedInstalled - // ); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueInstalled - // ); - // }); - - // mockUpdateLongviewClient(newClient.id, newClient).as('updateLongview'); - - // // Confirms that Cloud Manager UI can rename longview client. - // cy.get(`[data-testid="editable-text"] > [data-testid="button"]`) - // .should('be.visible') - // .click(); - - // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - // cy.get(`[data-testid="textfield-input"]`).clear(); - // cy.focused().type(newClient.label); - // cy.get(`[aria-label="Save new label"]`).should('be.visible').click(); - // }); - - // cy.wait('@updateLongview'); - // cy.findAllByText(newClient.label).should('be.visible'); - // }); - - // /* - // * - Tests Longview installation end-to-end using mock API data. - // * - Confirms that Cloud Manager UI can delete longview client. - // */ - - // it('can delete a Longview client on a Linode', () => { - // const client: LongviewClient = longviewClientFactory.build(); - // const deleteWarnMessage = - // 'Are you sure you want to delete this Longview Client?'; - - // mockGetLongviewClients([client]).as('getLongviewClients'); - // mockFetchLongviewStatus(client, 'lastUpdated', longviewLastUpdatedWaiting); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesWaiting); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueWaiting - // ).as('fetchLongview'); - - // cy.visitWithLogin('/longview'); - // cy.wait('@getLongviewClients'); - - // // Update mocks after initial Longview fetch to simulate client installation and data retrieval. - // // The next time Cloud makes a request to the fetch endpoint, data will start being returned. - // // 3 fetches is necessary because the Longview landing page fires 3 requests to the Longview fetch endpoint for each client. - // // See https://github.com/linode/manager/pull/10579#discussion_r1647945160 - // cy.wait(['@fetchLongview', '@fetchLongview', '@fetchLongview']).then(() => { - // mockFetchLongviewStatus( - // client, - // 'lastUpdated', - // longviewLastUpdatedInstalled - // ); - // mockFetchLongviewStatus(client, 'getValues', longviewGetValuesInstalled); - // mockFetchLongviewStatus( - // client, - // 'getLatestValue', - // longviewGetLatestValueInstalled - // ); - // }); - - // mockDeleteLongviewClient(client.id).as('deleteLongview'); - - // // Confirms that Cloud Manager UI has delete option. - // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - // ui.actionMenu - // .findByTitle(`Action menu for Longview Client ${client.label}`) - // .should('be.visible') - // .click(); - // }); - // ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); - - // // Confirms that Cloud Manager UI has delete warning message and can cancel deletion. - // ui.dialog - // .findByTitle(`Delete ${client.label}?`) - // .should('be.visible') - // .within(() => { - // cy.findByText(deleteWarnMessage).should('be.visible'); - // ui.buttonGroup.findButtonByTitle('Cancel').should('be.visible').click(); - // }); - // // Confirms that Cloud Manager UI can delete a Longview Client. - // cy.get(`[data-qa-longview-client="${client.id}"]`).within(() => { - // ui.actionMenu - // .findByTitle(`Action menu for Longview Client ${client.label}`) - // .click(); - // }); - // ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); +authenticate(); +describe('longview plan', () => { + before(() => { + cleanUp(['linodes', 'longview-clients']); + }); - // ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { - // ui.buttonGroup - // .findButtonByTitle('Delete') - // .should('be.visible') - // .should('be.enabled') - // .click(); - // }); + /* + * - Tests Longview change plan end-to-end using mock API data. + * - Confirm UI flow when a user changes their Longview plan. + */ + it('can change longview plan', () => { + const newPlan: ActiveLongviewPlan = longviewActivePlanFactory.build(); - // // Confirm that Longview Client is deleted. - // cy.wait('@deleteLongview'); - // cy.findByText(client.label).should('not.exist'); - // }); + mockGetLongviewPlan({}).as('getLongviewPlan'); - // the test run still works w/ all the above actual tests, they just take a long time - it("simple test", () => { cy.visitWithLogin('/longview'); - }) + cy.wait('@getLongviewPlan'); + + // Confirms that Longview Plan Details tab is visible on the page. + cy.findByText('Plan Details').should('be.visible').click(); + + // Confirms that Longview current plan is visible and enabled by default. + cy.findByTestId('lv-sub-radio-longview-free').should('be.enabled'); + cy.findByTestId('current-plan-longview-free').should('be.visible'); + ui.button + .findByTitle('Change Plan') + .should('be.visible') + .should('be.disabled'); + + mockUpdateLongviewPlan(newPlan).as('updateLongviewPlan'); + + // Confirms that Longview plan can be changed. + cy.findByTestId('lv-sub-table-row-longview-3').click(); + ui.button + .findByTitle('Change Plan') + .should('be.visible') + .should('be.enabled') + .click(); + + // Confirms the Longview plan details shown correctly after plan changed + cy.wait('@updateLongviewPlan'); + cy.findByText('Plan updated successfully.').should('be.visible'); + cy.findByTestId('lv-sub-table-row-longview-3').should('be.enabled'); + cy.findByTestId('current-plan-longview-3').should('be.visible'); + ui.button + .findByTitle('Change Plan') + .should('be.visible') + .should('be.disabled'); + }); }); From 509eec8ebb5b0e0d9fa7b5966d1cfc5812985d07 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 10 Mar 2025 15:29:38 -0400 Subject: [PATCH 04/21] Added changeset: html presentation for cypress test results --- packages/manager/.changeset/pr-11795-tests-1741634978355.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 packages/manager/.changeset/pr-11795-tests-1741634978355.md diff --git a/packages/manager/.changeset/pr-11795-tests-1741634978355.md b/packages/manager/.changeset/pr-11795-tests-1741634978355.md new file mode 100644 index 00000000000..ccb15fb62b6 --- /dev/null +++ b/packages/manager/.changeset/pr-11795-tests-1741634978355.md @@ -0,0 +1,5 @@ +--- +"@linode/manager": Tests +--- + +html presentation for cypress test results ([#11795](https://github.com/linode/manager/pull/11795)) From b83100a7ee7d808aa6bea3a5118e6a942fb4f310 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 13 Mar 2025 09:06:38 -0400 Subject: [PATCH 05/21] cleanup packages --- packages/manager/package.json | 5 ++--- pnpm-lock.yaml | 27 ++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 12e2f688819..0e94418fcdd 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -25,7 +25,6 @@ "@hookform/resolvers": "3.9.1", "@linode/api-v4": "workspace:*", "@linode/design-language-system": "^4.0.0", - "@linode/validation": "workspace:*", "@linode/queries": "workspace:*", "@linode/search": "workspace:*", "@linode/ui": "workspace:*", @@ -46,7 +45,7 @@ "@tanstack/react-router": "^1.111.11", "@xterm/xterm": "^5.5.0", "algoliasearch": "^4.14.3", - "axios": "~1.7.4", + "axios": "~1.8.3", "braintree-web": "^3.92.2", "chart.js": "~2.9.4", "copy-to-clipboard": "^3.0.8", @@ -223,4 +222,4 @@ "Firefox ESR", "not dead" ] -} +} \ No newline at end of file diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 854d4b6ff65..ff6ae7aad0f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -164,8 +164,8 @@ importers: specifier: ^4.14.3 version: 4.24.0 axios: - specifier: ~1.7.4 - version: 1.7.7 + specifier: ~1.8.3 + version: 1.8.3 braintree-web: specifier: ^3.92.2 version: 3.112.1 @@ -551,9 +551,6 @@ importers: mocha-junit-reporter: specifier: ^2.2.1 version: 2.2.1(mocha@10.8.2) - mochawesome: - specifier: ^7.1.3 - version: 7.1.3(mocha@10.8.2) msw: specifier: ^2.2.3 version: 2.6.5(@types/node@20.17.6)(typescript@5.7.3) @@ -3298,6 +3295,9 @@ packages: axios@1.7.7: resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axios@1.8.3: + resolution: {integrity: sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==} + axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -5113,6 +5113,15 @@ packages: resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} deprecated: This package is deprecated. Use the optional chaining (?.) operator instead. + lodash.isempty@4.4.0: + resolution: {integrity: sha512-oKMuF3xEeqDltrGMfDxAPGIVMSSRv8tbRSODbrs4KGsRRLEhrW8N8Rd4DRgB2+621hY8A8XwwrTVhXWpxFvMzg==} + + lodash.isfunction@3.0.9: + resolution: {integrity: sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw==} + + lodash.isobject@3.0.2: + resolution: {integrity: sha512-3/Qptq2vr7WeJbB4KHUSKlq8Pl7ASXi3UG6CMbBm8WRtXi8+GHm7mKaU3urfpSEzWe2wCIChs6/sdocUsTKJiA==} + lodash.isplainobject@4.0.6: resolution: {integrity: sha512-oSXzaWypCMHkPC3NvBEaPHf0KsA5mvPrOPgQWDsbg8n7orZ290M0BmC/jgRZ4vcJ6DTAhjrsSYgdsW/F+MFOBA==} @@ -9563,6 +9572,14 @@ snapshots: transitivePeerDependencies: - debug + axios@1.8.3: + dependencies: + follow-redirects: 1.15.9 + form-data: 4.0.1 + proxy-from-env: 1.1.0 + transitivePeerDependencies: + - debug + axobject-query@4.1.0: {} babel-eslint@10.1.0(eslint@7.32.0): From 46b6f1eb152ce9db417391b814e909affafce208 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 13 Mar 2025 09:08:28 -0400 Subject: [PATCH 06/21] cleanup --- .../manager/cypress/support/plugins/configure-test-suite.ts | 2 -- packages/manager/cypress/support/plugins/html-report.ts | 1 - 2 files changed, 3 deletions(-) diff --git a/packages/manager/cypress/support/plugins/configure-test-suite.ts b/packages/manager/cypress/support/plugins/configure-test-suite.ts index edce6eefcbc..ad0ca6094c9 100644 --- a/packages/manager/cypress/support/plugins/configure-test-suite.ts +++ b/packages/manager/cypress/support/plugins/configure-test-suite.ts @@ -33,7 +33,5 @@ export const configureTestSuite: CypressPlugin = (_on, config) => { })(); config.env['cypress_test_suite'] = suiteName; - // TODO: remove this, just doing this to shorten test run - config.specPattern = `cypress/e2e/${suiteName}/**/**.spec.{ts,tsx}`; return config; }; diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts index 17c5d3d8df4..5d9a51e0366 100644 --- a/packages/manager/cypress/support/plugins/html-report.ts +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -18,5 +18,4 @@ export const enableHtmlReport: CypressPlugin = async function (on, config) { on('after:run', async () => { await afterRunHook(); }); - return config; }; From 7e6b3b2a7ba2aceb79bbfc2f46159e19855f1bdd Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Fri, 14 Mar 2025 09:21:49 -0400 Subject: [PATCH 07/21] fix lock file --- pnpm-lock.yaml | 205 +++++++++---------------------------------------- 1 file changed, 38 insertions(+), 167 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index ff07839c6f2..f95c7546b0b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1741,10 +1741,6 @@ packages: resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} - '@jridgewell/gen-mapping@0.3.8': - resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} - engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -3117,11 +3113,6 @@ packages: engines: {node: '>=0.4.0'} hasBin: true - acorn@8.14.1: - resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} - engines: {node: '>=0.4.0'} - hasBin: true - agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -3304,9 +3295,6 @@ packages: axios@1.8.3: resolution: {integrity: sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==} - axios@1.8.3: - resolution: {integrity: sha512-iP4DebzoNlP/YN2dpwCgb8zoCmhtkajzS48JvwmkSkXvPI3DHc7m+XYL5tGnSlJtR6nImXZmdCuN5aP8dh1d8A==} - axobject-query@4.1.0: resolution: {integrity: sha512-qIj0G9wZbMGNLjLmg1PT6v2mE9AH2zlnADJD/2tC6E00hgmhUOfEB6greHPAfLRSufHqROIUTkw6E+M3lH0PTQ==} engines: {node: '>= 0.4'} @@ -3404,10 +3392,6 @@ packages: resolution: {integrity: sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==} engines: {node: '>=6'} - call-bind-apply-helpers@1.0.2: - resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} - engines: {node: '>= 0.4'} - call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -3938,10 +3922,6 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} - dunder-proto@1.0.1: - resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} - engines: {node: '>= 0.4'} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -3996,10 +3976,6 @@ packages: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} - es-define-property@1.0.1: - resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} - engines: {node: '>= 0.4'} - es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -4015,18 +3991,10 @@ packages: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} - es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} - engines: {node: '>= 0.4'} - es-set-tostringtag@2.0.3: resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} engines: {node: '>= 0.4'} - es-set-tostringtag@2.1.0: - resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} - engines: {node: '>= 0.4'} - es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} @@ -4404,10 +4372,6 @@ packages: resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} - form-data@4.0.2: - resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} - engines: {node: '>= 6'} - formik@2.1.7: resolution: {integrity: sha512-n1wviIh0JsvHqj9PufNvOV+fS7mFwh9FfMxxTMnTrKR/uVYMS06DKaivXBlJdDF0qEwTcPHxSmIQ3deFHL3Hsg==} peerDependencies: @@ -4468,14 +4432,6 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} - get-intrinsic@1.3.0: - resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} - engines: {node: '>= 0.4'} - - get-proto@1.0.1: - resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} - engines: {node: '>= 0.4'} - get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -4546,10 +4502,6 @@ packages: gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} - gopd@1.2.0: - resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} - engines: {node: '>= 0.4'} - graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -4582,10 +4534,6 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} - has-symbols@1.1.0: - resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} - engines: {node: '>= 0.4'} - has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} @@ -5264,10 +5212,6 @@ packages: markdown-table@3.0.4: resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} - math-intrinsics@1.1.0: - resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} - engines: {node: '>= 0.4'} - md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} @@ -7428,7 +7372,7 @@ snapshots: combined-stream: 1.0.8 extend: 3.0.2 forever-agent: 0.6.1 - form-data: 4.0.2 + form-data: 4.0.1 http-signature: 1.4.0 is-typedarray: 1.0.0 isstream: 0.1.2 @@ -7965,20 +7909,13 @@ snapshots: '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 - '@jridgewell/gen-mapping@0.3.8': - dependencies: - '@jridgewell/set-array': 1.2.1 - '@jridgewell/sourcemap-codec': 1.5.0 - '@jridgewell/trace-mapping': 0.3.25 - optional: true - '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/set-array@1.2.1': {} '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.8 + '@jridgewell/gen-mapping': 0.3.5 '@jridgewell/trace-mapping': 0.3.25 optional: true @@ -9428,9 +9365,6 @@ snapshots: acorn@8.14.0: {} - acorn@8.14.1: - optional: true - agent-base@7.1.1: dependencies: debug: 4.4.0(supports-color@8.1.1) @@ -9577,7 +9511,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 @@ -9627,14 +9561,6 @@ snapshots: fast-deep-equal: 3.1.3 is-buffer: 2.0.5 - axios@1.8.3: - dependencies: - follow-redirects: 1.15.9 - form-data: 4.0.2 - proxy-from-env: 1.1.0 - transitivePeerDependencies: - - debug - axios@1.8.3: dependencies: follow-redirects: 1.15.9 @@ -9748,17 +9674,12 @@ snapshots: cachedir@2.4.0: {} - call-bind-apply-helpers@1.0.2: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - call-bind@1.0.7: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 set-function-length: 1.2.2 callsites@3.1.0: {} @@ -10252,9 +10173,9 @@ snapshots: define-data-property@1.1.4: dependencies: - es-define-property: 1.0.1 + es-define-property: 1.0.0 es-errors: 1.3.0 - gopd: 1.2.0 + gopd: 1.0.1 define-lazy-prop@2.0.0: {} @@ -10306,12 +10227,6 @@ snapshots: dotenv@16.4.5: {} - dunder-proto@1.0.1: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-errors: 1.3.0 - gopd: 1.2.0 - eastasianwidth@0.2.0: {} ecc-jsbn@0.1.2: @@ -10365,16 +10280,16 @@ snapshots: es-define-property: 1.0.0 es-errors: 1.3.0 es-object-atoms: 1.0.0 - es-set-tostringtag: 2.1.0 + es-set-tostringtag: 2.0.3 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 get-symbol-description: 1.0.2 globalthis: 1.0.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 has-proto: 1.0.3 - has-symbols: 1.1.0 + has-symbols: 1.0.3 hasown: 2.0.2 internal-slot: 1.0.7 is-array-buffer: 3.0.4 @@ -10404,9 +10319,7 @@ snapshots: es-define-property@1.0.0: dependencies: - get-intrinsic: 1.3.0 - - es-define-property@1.0.1: {} + get-intrinsic: 1.2.4 es-errors@1.3.0: {} @@ -10434,20 +10347,9 @@ snapshots: dependencies: es-errors: 1.3.0 - es-object-atoms@1.1.1: - dependencies: - es-errors: 1.3.0 - es-set-tostringtag@2.0.3: dependencies: - get-intrinsic: 1.3.0 - has-tostringtag: 1.0.2 - hasown: 2.0.2 - - es-set-tostringtag@2.1.0: - dependencies: - es-errors: 1.3.0 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -11002,13 +10904,6 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 - form-data@4.0.2: - dependencies: - asynckit: 0.4.0 - combined-stream: 1.0.8 - es-set-tostringtag: 2.1.0 - mime-types: 2.1.35 - formik@2.1.7(react@18.3.1): dependencies: deepmerge: 2.2.1 @@ -11075,26 +10970,8 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 has-proto: 1.0.3 - has-symbols: 1.1.0 - hasown: 2.0.2 - - get-intrinsic@1.3.0: - dependencies: - call-bind-apply-helpers: 1.0.2 - es-define-property: 1.0.1 - es-errors: 1.3.0 - es-object-atoms: 1.1.1 - function-bind: 1.1.2 - get-proto: 1.0.1 - gopd: 1.2.0 - has-symbols: 1.1.0 + has-symbols: 1.0.3 hasown: 2.0.2 - math-intrinsics: 1.1.0 - - get-proto@1.0.1: - dependencies: - dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 get-stream@5.2.0: dependencies: @@ -11106,7 +10983,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 get-tsconfig@4.8.1: dependencies: @@ -11167,7 +11044,7 @@ snapshots: globalthis@1.0.4: dependencies: define-properties: 1.2.1 - gopd: 1.2.0 + gopd: 1.0.1 globby@11.1.0: dependencies: @@ -11184,9 +11061,7 @@ snapshots: gopd@1.0.1: dependencies: - get-intrinsic: 1.3.0 - - gopd@1.2.0: {} + get-intrinsic: 1.2.4 graceful-fs@4.2.11: {} @@ -11202,17 +11077,15 @@ snapshots: has-property-descriptors@1.0.2: dependencies: - es-define-property: 1.0.1 + es-define-property: 1.0.0 has-proto@1.0.3: {} has-symbols@1.0.3: {} - has-symbols@1.1.0: {} - has-tostringtag@1.0.2: dependencies: - has-symbols: 1.1.0 + has-symbols: 1.0.3 hasown@2.0.2: dependencies: @@ -11386,7 +11259,7 @@ snapshots: is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 is-arrayish@0.2.1: {} @@ -11501,7 +11374,7 @@ snapshots: is-symbol@1.0.4: dependencies: - has-symbols: 1.1.0 + has-symbols: 1.0.3 is-typed-array@1.1.13: dependencies: @@ -11520,7 +11393,7 @@ snapshots: is-weakset@2.0.3: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 is-wsl@2.2.0: dependencies: @@ -11567,8 +11440,8 @@ snapshots: iterator.prototype@1.1.3: dependencies: define-properties: 1.2.1 - get-intrinsic: 1.3.0 - has-symbols: 1.1.0 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 @@ -11911,8 +11784,6 @@ snapshots: markdown-table@3.0.4: {} - math-intrinsics@1.1.0: {} - md5@2.3.0: dependencies: charenc: 0.0.2 @@ -12439,7 +12310,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - has-symbols: 1.1.0 + has-symbols: 1.0.3 object-keys: 1.1.1 object.entries@1.1.8: @@ -12921,7 +12792,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 globalthis: 1.0.4 which-builtin-type: 1.1.4 @@ -13112,8 +12983,8 @@ snapshots: safe-array-concat@1.1.2: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.3.0 - has-symbols: 1.1.0 + get-intrinsic: 1.2.4 + has-symbols: 1.0.3 isarray: 2.0.5 safe-buffer@5.2.1: {} @@ -13156,8 +13027,8 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.3.0 - gopd: 1.2.0 + get-intrinsic: 1.2.4 + gopd: 1.0.1 has-property-descriptors: 1.0.2 set-function-name@2.0.2: @@ -13202,7 +13073,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.3.0 + get-intrinsic: 1.2.4 object-inspect: 1.13.3 siginfo@2.0.0: {} @@ -13386,19 +13257,19 @@ snapshots: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.5 - es-object-atoms: 1.1.1 + es-object-atoms: 1.0.0 string.prototype.trimend@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-object-atoms: 1.1.1 + es-object-atoms: 1.0.0 string.prototype.trimstart@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-object-atoms: 1.1.1 + es-object-atoms: 1.0.0 stringify-entities@4.0.4: dependencies: @@ -13492,7 +13363,7 @@ snapshots: terser@5.36.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.14.1 + acorn: 8.14.0 commander: 2.20.3 source-map-support: 0.5.21 optional: true @@ -13705,7 +13576,7 @@ snapshots: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.2.0 + gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 @@ -13714,7 +13585,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.2.0 + gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 @@ -13722,7 +13593,7 @@ snapshots: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.2.0 + gopd: 1.0.1 has-proto: 1.0.3 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 @@ -13745,7 +13616,7 @@ snapshots: dependencies: call-bind: 1.0.7 has-bigints: 1.0.2 - has-symbols: 1.1.0 + has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 undici-types@6.19.8: {} @@ -14044,7 +13915,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.2.0 + gopd: 1.0.1 has-tostringtag: 1.0.2 which@1.3.1: From 57f5a801a189603f11d6091757f26d36a3d4168c Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Fri, 14 Mar 2025 09:37:51 -0400 Subject: [PATCH 08/21] trying to fix lock file --- packages/manager/package.json | 2 +- pnpm-lock.yaml | 196 +++++++++++++++++++++++++++------- 2 files changed, 158 insertions(+), 40 deletions(-) diff --git a/packages/manager/package.json b/packages/manager/package.json index 0e94418fcdd..9f9fb8f08c8 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -222,4 +222,4 @@ "Firefox ESR", "not dead" ] -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f95c7546b0b..6ef8f684960 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1741,6 +1741,10 @@ packages: resolution: {integrity: sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==} engines: {node: '>=6.0.0'} + '@jridgewell/gen-mapping@0.3.8': + resolution: {integrity: sha512-imAbBGkb+ebQyxKgzv5Hu2nmROxoDOXHh80evxdoXNOrvAnVx7zimzc1Oo5h9RlfV4vPXaE2iM5pOFbvOCClWA==} + engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -3113,6 +3117,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.14.1: + resolution: {integrity: sha512-OvQ/2pUDKmgfCg++xsTX1wGxfTaszcHVcTctW4UJB4hibJx2HXxxO5UmVgyjMa+ZDsiaf5wWLXYpRWMmBI0QHg==} + engines: {node: '>=0.4.0'} + hasBin: true + agent-base@7.1.1: resolution: {integrity: sha512-H0TSyFNDMomMNJQBn8wFV5YC/2eJ+VXECwOadZJT554xP6cODZHPX3H9QMQECxvrgiSOP1pHjy1sMWQVYJOUOA==} engines: {node: '>= 14'} @@ -3392,6 +3401,10 @@ packages: resolution: {integrity: sha512-9EtFOZR8g22CL7BWjJ9BUx1+A/djkofnyW3aOXZORNW2kxoUpx2h+uN2cOqwPmFhnpVmxg+KW2OjOSgChTEvsQ==} engines: {node: '>=6'} + call-bind-apply-helpers@1.0.2: + resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} + engines: {node: '>= 0.4'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -3922,6 +3935,10 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} + dunder-proto@1.0.1: + resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} + engines: {node: '>= 0.4'} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -3976,6 +3993,10 @@ packages: resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} engines: {node: '>= 0.4'} + es-define-property@1.0.1: + resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} + engines: {node: '>= 0.4'} + es-errors@1.3.0: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} @@ -3991,10 +4012,18 @@ packages: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} + es-object-atoms@1.1.1: + resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + engines: {node: '>= 0.4'} + es-set-tostringtag@2.0.3: resolution: {integrity: sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==} engines: {node: '>= 0.4'} + es-set-tostringtag@2.1.0: + resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} + engines: {node: '>= 0.4'} + es-shim-unscopables@1.0.2: resolution: {integrity: sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==} @@ -4372,6 +4401,10 @@ packages: resolution: {integrity: sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==} engines: {node: '>= 6'} + form-data@4.0.2: + resolution: {integrity: sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w==} + engines: {node: '>= 6'} + formik@2.1.7: resolution: {integrity: sha512-n1wviIh0JsvHqj9PufNvOV+fS7mFwh9FfMxxTMnTrKR/uVYMS06DKaivXBlJdDF0qEwTcPHxSmIQ3deFHL3Hsg==} peerDependencies: @@ -4432,6 +4465,14 @@ packages: resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} engines: {node: '>= 0.4'} + get-intrinsic@1.3.0: + resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} + engines: {node: '>= 0.4'} + + get-proto@1.0.1: + resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} + engines: {node: '>= 0.4'} + get-stream@5.2.0: resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} engines: {node: '>=8'} @@ -4502,6 +4543,10 @@ packages: gopd@1.0.1: resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + gopd@1.2.0: + resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} + engines: {node: '>= 0.4'} + graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} @@ -4534,6 +4579,10 @@ packages: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} + has-symbols@1.1.0: + resolution: {integrity: sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==} + engines: {node: '>= 0.4'} + has-tostringtag@1.0.2: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} @@ -5212,6 +5261,10 @@ packages: markdown-table@3.0.4: resolution: {integrity: sha512-wiYz4+JrLyb/DqW2hkFJxP7Vd7JuTDm77fvbM8VfEQdmSMqcImWeeRbHwZjBjIFki/VaMK2BhFi7oUUZeM5bqw==} + math-intrinsics@1.1.0: + resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} + engines: {node: '>= 0.4'} + md5@2.3.0: resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} @@ -7372,7 +7425,7 @@ snapshots: combined-stream: 1.0.8 extend: 3.0.2 forever-agent: 0.6.1 - form-data: 4.0.1 + form-data: 4.0.2 http-signature: 1.4.0 is-typedarray: 1.0.0 isstream: 0.1.2 @@ -7909,13 +7962,20 @@ snapshots: '@jridgewell/sourcemap-codec': 1.5.0 '@jridgewell/trace-mapping': 0.3.25 + '@jridgewell/gen-mapping@0.3.8': + dependencies: + '@jridgewell/set-array': 1.2.1 + '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/trace-mapping': 0.3.25 + optional: true + '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/set-array@1.2.1': {} '@jridgewell/source-map@0.3.6': dependencies: - '@jridgewell/gen-mapping': 0.3.5 + '@jridgewell/gen-mapping': 0.3.8 '@jridgewell/trace-mapping': 0.3.25 optional: true @@ -9365,6 +9425,9 @@ snapshots: acorn@8.14.0: {} + acorn@8.14.1: + optional: true + agent-base@7.1.1: dependencies: debug: 4.4.0(supports-color@8.1.1) @@ -9511,7 +9574,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 is-array-buffer: 3.0.4 is-shared-array-buffer: 1.0.3 @@ -9564,7 +9627,7 @@ snapshots: axios@1.8.3: dependencies: follow-redirects: 1.15.9 - form-data: 4.0.1 + form-data: 4.0.2 proxy-from-env: 1.1.0 transitivePeerDependencies: - debug @@ -9674,12 +9737,17 @@ snapshots: cachedir@2.4.0: {} + call-bind-apply-helpers@1.0.2: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 set-function-length: 1.2.2 callsites@3.1.0: {} @@ -10173,9 +10241,9 @@ snapshots: define-data-property@1.1.4: dependencies: - es-define-property: 1.0.0 + es-define-property: 1.0.1 es-errors: 1.3.0 - gopd: 1.0.1 + gopd: 1.2.0 define-lazy-prop@2.0.0: {} @@ -10227,6 +10295,12 @@ snapshots: dotenv@16.4.5: {} + dunder-proto@1.0.1: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-errors: 1.3.0 + gopd: 1.2.0 + eastasianwidth@0.2.0: {} ecc-jsbn@0.1.2: @@ -10280,16 +10354,16 @@ snapshots: es-define-property: 1.0.0 es-errors: 1.3.0 es-object-atoms: 1.0.0 - es-set-tostringtag: 2.0.3 + es-set-tostringtag: 2.1.0 es-to-primitive: 1.2.1 function.prototype.name: 1.1.6 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 get-symbol-description: 1.0.2 globalthis: 1.0.4 gopd: 1.0.1 has-property-descriptors: 1.0.2 has-proto: 1.0.3 - has-symbols: 1.0.3 + has-symbols: 1.1.0 hasown: 2.0.2 internal-slot: 1.0.7 is-array-buffer: 3.0.4 @@ -10319,7 +10393,9 @@ snapshots: es-define-property@1.0.0: dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 + + es-define-property@1.0.1: {} es-errors@1.3.0: {} @@ -10347,9 +10423,20 @@ snapshots: dependencies: es-errors: 1.3.0 + es-object-atoms@1.1.1: + dependencies: + es-errors: 1.3.0 + es-set-tostringtag@2.0.3: dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 + has-tostringtag: 1.0.2 + hasown: 2.0.2 + + es-set-tostringtag@2.1.0: + dependencies: + es-errors: 1.3.0 + get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 hasown: 2.0.2 @@ -10904,6 +10991,13 @@ snapshots: combined-stream: 1.0.8 mime-types: 2.1.35 + form-data@4.0.2: + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + es-set-tostringtag: 2.1.0 + mime-types: 2.1.35 + formik@2.1.7(react@18.3.1): dependencies: deepmerge: 2.2.1 @@ -10970,9 +11064,27 @@ snapshots: es-errors: 1.3.0 function-bind: 1.1.2 has-proto: 1.0.3 - has-symbols: 1.0.3 + has-symbols: 1.1.0 hasown: 2.0.2 + get-intrinsic@1.3.0: + dependencies: + call-bind-apply-helpers: 1.0.2 + es-define-property: 1.0.1 + es-errors: 1.3.0 + es-object-atoms: 1.1.1 + function-bind: 1.1.2 + get-proto: 1.0.1 + gopd: 1.2.0 + has-symbols: 1.1.0 + hasown: 2.0.2 + math-intrinsics: 1.1.0 + + get-proto@1.0.1: + dependencies: + dunder-proto: 1.0.1 + es-object-atoms: 1.1.1 + get-stream@5.2.0: dependencies: pump: 3.0.2 @@ -10983,7 +11095,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 get-tsconfig@4.8.1: dependencies: @@ -11044,7 +11156,7 @@ snapshots: globalthis@1.0.4: dependencies: define-properties: 1.2.1 - gopd: 1.0.1 + gopd: 1.2.0 globby@11.1.0: dependencies: @@ -11061,7 +11173,9 @@ snapshots: gopd@1.0.1: dependencies: - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 + + gopd@1.2.0: {} graceful-fs@4.2.11: {} @@ -11077,15 +11191,17 @@ snapshots: has-property-descriptors@1.0.2: dependencies: - es-define-property: 1.0.0 + es-define-property: 1.0.1 has-proto@1.0.3: {} has-symbols@1.0.3: {} + has-symbols@1.1.0: {} + has-tostringtag@1.0.2: dependencies: - has-symbols: 1.0.3 + has-symbols: 1.1.0 hasown@2.0.2: dependencies: @@ -11259,7 +11375,7 @@ snapshots: is-array-buffer@3.0.4: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 is-arrayish@0.2.1: {} @@ -11374,7 +11490,7 @@ snapshots: is-symbol@1.0.4: dependencies: - has-symbols: 1.0.3 + has-symbols: 1.1.0 is-typed-array@1.1.13: dependencies: @@ -11393,7 +11509,7 @@ snapshots: is-weakset@2.0.3: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 is-wsl@2.2.0: dependencies: @@ -11440,8 +11556,8 @@ snapshots: iterator.prototype@1.1.3: dependencies: define-properties: 1.2.1 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 + get-intrinsic: 1.3.0 + has-symbols: 1.1.0 reflect.getprototypeof: 1.0.6 set-function-name: 2.0.2 @@ -11784,6 +11900,8 @@ snapshots: markdown-table@3.0.4: {} + math-intrinsics@1.1.0: {} + md5@2.3.0: dependencies: charenc: 0.0.2 @@ -12310,7 +12428,7 @@ snapshots: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - has-symbols: 1.0.3 + has-symbols: 1.1.0 object-keys: 1.1.1 object.entries@1.1.8: @@ -12792,7 +12910,7 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.23.5 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 globalthis: 1.0.4 which-builtin-type: 1.1.4 @@ -12983,8 +13101,8 @@ snapshots: safe-array-concat@1.1.2: dependencies: call-bind: 1.0.7 - get-intrinsic: 1.2.4 - has-symbols: 1.0.3 + get-intrinsic: 1.3.0 + has-symbols: 1.1.0 isarray: 2.0.5 safe-buffer@5.2.1: {} @@ -13027,8 +13145,8 @@ snapshots: define-data-property: 1.1.4 es-errors: 1.3.0 function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 + get-intrinsic: 1.3.0 + gopd: 1.2.0 has-property-descriptors: 1.0.2 set-function-name@2.0.2: @@ -13073,7 +13191,7 @@ snapshots: dependencies: call-bind: 1.0.7 es-errors: 1.3.0 - get-intrinsic: 1.2.4 + get-intrinsic: 1.3.0 object-inspect: 1.13.3 siginfo@2.0.0: {} @@ -13257,19 +13375,19 @@ snapshots: call-bind: 1.0.7 define-properties: 1.2.1 es-abstract: 1.23.5 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 string.prototype.trimend@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 string.prototype.trimstart@1.0.8: dependencies: call-bind: 1.0.7 define-properties: 1.2.1 - es-object-atoms: 1.0.0 + es-object-atoms: 1.1.1 stringify-entities@4.0.4: dependencies: @@ -13363,7 +13481,7 @@ snapshots: terser@5.36.0: dependencies: '@jridgewell/source-map': 0.3.6 - acorn: 8.14.0 + acorn: 8.14.1 commander: 2.20.3 source-map-support: 0.5.21 optional: true @@ -13576,7 +13694,7 @@ snapshots: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.2.0 has-proto: 1.0.3 is-typed-array: 1.1.13 @@ -13585,7 +13703,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.2.0 has-proto: 1.0.3 is-typed-array: 1.1.13 @@ -13593,7 +13711,7 @@ snapshots: dependencies: call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.2.0 has-proto: 1.0.3 is-typed-array: 1.1.13 possible-typed-array-names: 1.0.0 @@ -13616,7 +13734,7 @@ snapshots: dependencies: call-bind: 1.0.7 has-bigints: 1.0.2 - has-symbols: 1.0.3 + has-symbols: 1.1.0 which-boxed-primitive: 1.0.2 undici-types@6.19.8: {} @@ -13915,7 +14033,7 @@ snapshots: available-typed-arrays: 1.0.7 call-bind: 1.0.7 for-each: 0.3.3 - gopd: 1.0.1 + gopd: 1.2.0 has-tostringtag: 1.0.2 which@1.3.1: From e85a09a4e5add74ef7efd760c4493c9c56c8c53f Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Fri, 14 Mar 2025 10:05:27 -0400 Subject: [PATCH 09/21] cleanup --- packages/manager/cypress/support/e2e.ts | 1 + packages/manager/cypress/support/plugins/configure-test-suite.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/packages/manager/cypress/support/e2e.ts b/packages/manager/cypress/support/e2e.ts index e6b0d1d854b..5996d3d71aa 100644 --- a/packages/manager/cypress/support/e2e.ts +++ b/packages/manager/cypress/support/e2e.ts @@ -12,6 +12,7 @@ // You can read more here: // https://on.cypress.io/configuration // *********************************************************** + import '@testing-library/cypress/add-commands'; // Cypress command and assertion setup. import chaiString from 'chai-string'; diff --git a/packages/manager/cypress/support/plugins/configure-test-suite.ts b/packages/manager/cypress/support/plugins/configure-test-suite.ts index ad0ca6094c9..0e431ee07a9 100644 --- a/packages/manager/cypress/support/plugins/configure-test-suite.ts +++ b/packages/manager/cypress/support/plugins/configure-test-suite.ts @@ -33,5 +33,6 @@ export const configureTestSuite: CypressPlugin = (_on, config) => { })(); config.env['cypress_test_suite'] = suiteName; + config.specPattern = `cypress/e2e/${suiteName}/**/*.spec.{ts,tsx}`; return config; }; From 4e118119cd6eab0689ac6ab3cf243139c1a13336 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Fri, 14 Mar 2025 10:41:57 -0400 Subject: [PATCH 10/21] fix ts error for mochawesome --- packages/manager/cypress/support/plugins/html-report.ts | 1 - .../cypress/support/util/cypress-mochawesome-reporter.d.ts | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 packages/manager/cypress/support/util/cypress-mochawesome-reporter.d.ts diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts index 5d9a51e0366..4c6273746ba 100644 --- a/packages/manager/cypress/support/plugins/html-report.ts +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -1,5 +1,4 @@ import { CypressPlugin } from './plugin'; -// @ts-expect-error cant figure out how to declare module for /lib import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; const { beforeRunHook, afterRunHook } = cypressReporterLib; diff --git a/packages/manager/cypress/support/util/cypress-mochawesome-reporter.d.ts b/packages/manager/cypress/support/util/cypress-mochawesome-reporter.d.ts new file mode 100644 index 00000000000..383f99e586b --- /dev/null +++ b/packages/manager/cypress/support/util/cypress-mochawesome-reporter.d.ts @@ -0,0 +1 @@ +declare module 'cypress-mochawesome-reporter/lib'; From ee96bdec306ba650b0ab1c87d5685161972dda85 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Wed, 19 Mar 2025 15:03:05 -0400 Subject: [PATCH 11/21] enable multiple cypress reporters --- packages/manager/cypress.config.ts | 5 +-- packages/manager/cypress/support/e2e.ts | 2 + .../plugins/configure-multi-reporters.ts | 37 +++++++++++++++++++ .../cypress/support/plugins/html-report.ts | 20 ---------- packages/manager/package.json | 1 + pnpm-lock.yaml | 18 +++++++++ 6 files changed, 60 insertions(+), 23 deletions(-) create mode 100644 packages/manager/cypress/support/plugins/configure-multi-reporters.ts delete mode 100644 packages/manager/cypress/support/plugins/html-report.ts diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index 811fba111ed..393f523cde0 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -17,10 +17,10 @@ import { enableJunitReport } from './cypress/support/plugins/junit-report'; import { generateTestWeights } from './cypress/support/plugins/generate-weights'; import { logTestTagInfo } from './cypress/support/plugins/test-tagging-info'; import cypressViteConfig from './cypress/vite.config'; -import { enableHtmlReport } from './cypress/support/plugins/html-report'; import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-override'; import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; +import { configureMultiReporters } from './cypress/support/plugins/configure-multi-reporters'; import cypressOnFix from 'cypress-on-fix'; /** * Exports a Cypress configuration object. @@ -100,9 +100,8 @@ export default defineConfig({ featureFlagOverrides, logTestTagInfo, splitCypressRun, - enableJunitReport(), generateTestWeights, - enableHtmlReport, + configureMultiReporters, postRunCleanup, ]); }, diff --git a/packages/manager/cypress/support/e2e.ts b/packages/manager/cypress/support/e2e.ts index 5996d3d71aa..0c614affa44 100644 --- a/packages/manager/cypress/support/e2e.ts +++ b/packages/manager/cypress/support/e2e.ts @@ -14,6 +14,8 @@ // *********************************************************** import '@testing-library/cypress/add-commands'; +// reporter needs to register for events in order to attach media to test results in html report +import 'cypress-mochawesome-reporter/register'; // Cypress command and assertion setup. import chaiString from 'chai-string'; import 'cypress-axe'; diff --git a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts new file mode 100644 index 00000000000..3166c3e7931 --- /dev/null +++ b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts @@ -0,0 +1,37 @@ +import { CypressPlugin } from './plugin'; +import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; +const { beforeRunHook, afterRunHook } = cypressReporterLib; + +/** + * Configure multiple reporters to be used by Cypress + * + * @returns Cypress configuration object. + */ +export const configureMultiReporters: CypressPlugin = (on, config) => { + config.reporter = 'cypress-multi-reporters'; + config.reporterOptions = { + reporterEnabled: 'mocha-junit-reporter, cypress-mochawesome-reporter', + mochaJunitReporterReporterOptions: { + mochaFile: 'cypress/results/test-results-[hash].xml', + rootSuiteTitle: 'Cloud Manager Cypress Tests', + testsuitesTitle: 'core', + jenkinsMode: false, + suiteTitleSeparatedBy: ' ', + }, + cypressMochawesomeReporterReporterOptions: { + embeddedScreenshots: true, + charts: true, + quiet: true, + }, + }; + + // need hooks to insert results into html file by cypress-mochawesome-reporter + on('before:run', async (results) => { + await beforeRunHook(results); + }); + + on('after:run', async () => { + await afterRunHook(); + }); + return config; +}; diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts deleted file mode 100644 index 4c6273746ba..00000000000 --- a/packages/manager/cypress/support/plugins/html-report.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { CypressPlugin } from './plugin'; -import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; -const { beforeRunHook, afterRunHook } = cypressReporterLib; - -export const enableHtmlReport: CypressPlugin = async function (on, config) { - config.reporter = 'cypress-mochawesome-reporter'; - config.reporterOptions = { - embeddedScreenshots: true, - charts: true, - videoOnFailOnly: true, - quiet: true, - }; - on('before:run', async (results) => { - await beforeRunHook(results); - }); - - on('after:run', async () => { - await afterRunHook(); - }); -}; diff --git a/packages/manager/package.json b/packages/manager/package.json index 9f9fb8f08c8..f03164e7786 100644 --- a/packages/manager/package.json +++ b/packages/manager/package.json @@ -184,6 +184,7 @@ "cypress-axe": "^1.6.0", "cypress-file-upload": "^5.0.8", "cypress-mochawesome-reporter": "^3.8.2", + "cypress-multi-reporters": "^2.0.5", "cypress-on-fix": "^1.1.0", "cypress-real-events": "^1.14.0", "cypress-vite": "^1.6.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6ef8f684960..40d68206446 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -482,6 +482,9 @@ importers: cypress-mochawesome-reporter: specifier: ^3.8.2 version: 3.8.2(cypress@14.0.1)(mocha@10.8.2) + cypress-multi-reporters: + specifier: ^2.0.5 + version: 2.0.5(mocha@10.8.2) cypress-on-fix: specifier: ^1.1.0 version: 1.1.0 @@ -3732,6 +3735,12 @@ packages: peerDependencies: cypress: '>=6.2.0' + cypress-multi-reporters@2.0.5: + resolution: {integrity: sha512-5ReXlNE7C/9/rpDI3z0tAJbPXsTHK7P3ogvUtBntQlmctRQ+sSMts7dIQY5MTb0XfBSge3CuwvNvaoqtw90KSQ==} + engines: {node: '>=6.0.0'} + peerDependencies: + mocha: '>=3.1.2' + cypress-on-fix@1.1.0: resolution: {integrity: sha512-qGdbC0vZLmR3lYPpWWZvMqgDTeA2v04zu3DBdBmJHbG+BjwlFNYGnL7Y+X4LBrB+AyCCCeCuXhV80UXA90UhWg==} @@ -10070,6 +10079,15 @@ snapshots: transitivePeerDependencies: - mocha + cypress-multi-reporters@2.0.5(mocha@10.8.2): + dependencies: + debug: 4.4.0(supports-color@8.1.1) + lodash: 4.17.21 + mocha: 10.8.2 + semver: 7.6.3 + transitivePeerDependencies: + - supports-color + cypress-on-fix@1.1.0: dependencies: debug: 4.4.0(supports-color@8.1.1) From 141e9b86ab6a92d2d429c00bfd99357f5a4618da Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Wed, 19 Mar 2025 16:53:19 -0400 Subject: [PATCH 12/21] fix junit config --- packages/manager/cypress.config.ts | 1 + .../plugins/configure-multi-reporters.ts | 9 ++------- .../cypress/support/plugins/junit-report.ts | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index 393f523cde0..af51d3cb2c6 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -21,6 +21,7 @@ import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-ove import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; import { configureMultiReporters } from './cypress/support/plugins/configure-multi-reporters'; +// TODO: fix ts types import cypressOnFix from 'cypress-on-fix'; /** * Exports a Cypress configuration object. diff --git a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts index 3166c3e7931..1193229f0e1 100644 --- a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts +++ b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts @@ -1,6 +1,7 @@ import { CypressPlugin } from './plugin'; import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; const { beforeRunHook, afterRunHook } = cypressReporterLib; +import { jUnitReportOptions } from './junit-report'; /** * Configure multiple reporters to be used by Cypress @@ -11,13 +12,7 @@ export const configureMultiReporters: CypressPlugin = (on, config) => { config.reporter = 'cypress-multi-reporters'; config.reporterOptions = { reporterEnabled: 'mocha-junit-reporter, cypress-mochawesome-reporter', - mochaJunitReporterReporterOptions: { - mochaFile: 'cypress/results/test-results-[hash].xml', - rootSuiteTitle: 'Cloud Manager Cypress Tests', - testsuitesTitle: 'core', - jenkinsMode: false, - suiteTitleSeparatedBy: ' ', - }, + mochaJunitReporterReporterOptions: jUnitReportOptions(config), cypressMochawesomeReporterReporterOptions: { embeddedScreenshots: true, charts: true, diff --git a/packages/manager/cypress/support/plugins/junit-report.ts b/packages/manager/cypress/support/plugins/junit-report.ts index 33117a64823..1a1dd56f7d6 100644 --- a/packages/manager/cypress/support/plugins/junit-report.ts +++ b/packages/manager/cypress/support/plugins/junit-report.ts @@ -47,3 +47,22 @@ export const enableJunitReport = ( return config; }; }; + +export const jUnitReportOptions = ( + config: Cypress.PluginConfigOptions, + suiteName?: string, + jenkinsMode: boolean = false +) => { + if (!!config.env[envVarName]) { + const testSuite = suiteName || config.env['cypress_test_suite'] || 'core'; + const testSuiteName = `${capitalize(testSuite)} Test Suite`; + return { + mochaFile: 'cypress/results/test-results-[hash].xml', + rootSuiteTitle: 'Cloud Manager Cypress Tests', + testsuitesTitle: testSuiteName, + jenkinsMode, + suiteTitleSeparatedBy: jenkinsMode ? '→' : ' ', + }; + } + return {}; +}; From d44cb10f57ba11252b4b541e41242f15596f13c0 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 20 Mar 2025 09:45:02 -0400 Subject: [PATCH 13/21] fix junit reporting --- .gitignore | 1 + packages/manager/cypress.config.ts | 1 - .../cypress/support/plugins/configure-multi-reporters.ts | 2 ++ packages/manager/cypress/support/plugins/junit-report.ts | 8 ++++++++ 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index fe569e46f54..a93e3f682f2 100644 --- a/.gitignore +++ b/.gitignore @@ -108,6 +108,7 @@ localStorage.json **/storybook-test-results/*.xml .tmp*.status **/e2e/creds.js +packages/manager/test-results.xml # storybook static files .out diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index af51d3cb2c6..393f523cde0 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -21,7 +21,6 @@ import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-ove import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; import { configureMultiReporters } from './cypress/support/plugins/configure-multi-reporters'; -// TODO: fix ts types import cypressOnFix from 'cypress-on-fix'; /** * Exports a Cypress configuration object. diff --git a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts index 1193229f0e1..7d62e19a4d2 100644 --- a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts +++ b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts @@ -14,7 +14,9 @@ export const configureMultiReporters: CypressPlugin = (on, config) => { reporterEnabled: 'mocha-junit-reporter, cypress-mochawesome-reporter', mochaJunitReporterReporterOptions: jUnitReportOptions(config), cypressMochawesomeReporterReporterOptions: { + reportPageTitle: 'Cloud Manager E2e Test Results', embeddedScreenshots: true, + videoOnFailOnly: true, charts: true, quiet: true, }, diff --git a/packages/manager/cypress/support/plugins/junit-report.ts b/packages/manager/cypress/support/plugins/junit-report.ts index 1a1dd56f7d6..366c463bc7c 100644 --- a/packages/manager/cypress/support/plugins/junit-report.ts +++ b/packages/manager/cypress/support/plugins/junit-report.ts @@ -48,6 +48,14 @@ export const enableJunitReport = ( }; }; +/** + * Used to get config options for E2E test suite + * @param config - Cypress ConfigOptions object + * @param suiteName - Optional suite name in the JUnit output. + * @param jenkinsMode - If test is execute in Jenkins env + * + * @returns object. + */ export const jUnitReportOptions = ( config: Cypress.PluginConfigOptions, suiteName?: string, From 17aa60b1ab23df88d03e17cc38cee309efa9f25c Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 20 Mar 2025 11:03:35 -0400 Subject: [PATCH 14/21] fix junit rpt --- .gitignore | 1 - .../support/plugins/configure-multi-reporters.ts | 8 ++++++-- .../manager/cypress/support/plugins/junit-report.ts | 12 +++++------- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index a93e3f682f2..fe569e46f54 100644 --- a/.gitignore +++ b/.gitignore @@ -108,7 +108,6 @@ localStorage.json **/storybook-test-results/*.xml .tmp*.status **/e2e/creds.js -packages/manager/test-results.xml # storybook static files .out diff --git a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts index 7d62e19a4d2..d5768691b9c 100644 --- a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts +++ b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts @@ -1,7 +1,7 @@ import { CypressPlugin } from './plugin'; import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; const { beforeRunHook, afterRunHook } = cypressReporterLib; -import { jUnitReportOptions } from './junit-report'; +import { jUnitE2EReportOptions } from './junit-report'; /** * Configure multiple reporters to be used by Cypress @@ -12,7 +12,11 @@ export const configureMultiReporters: CypressPlugin = (on, config) => { config.reporter = 'cypress-multi-reporters'; config.reporterOptions = { reporterEnabled: 'mocha-junit-reporter, cypress-mochawesome-reporter', - mochaJunitReporterReporterOptions: jUnitReportOptions(config), + //config.env['cypress_test_suite'] = 'core' + mochaJunitReporterReporterOptions: jUnitE2EReportOptions( + config.env['cypress_test_suite'], + false + ), cypressMochawesomeReporterReporterOptions: { reportPageTitle: 'Cloud Manager E2e Test Results', embeddedScreenshots: true, diff --git a/packages/manager/cypress/support/plugins/junit-report.ts b/packages/manager/cypress/support/plugins/junit-report.ts index 366c463bc7c..639353aa041 100644 --- a/packages/manager/cypress/support/plugins/junit-report.ts +++ b/packages/manager/cypress/support/plugins/junit-report.ts @@ -50,19 +50,16 @@ export const enableJunitReport = ( /** * Used to get config options for E2E test suite - * @param config - Cypress ConfigOptions object * @param suiteName - Optional suite name in the JUnit output. * @param jenkinsMode - If test is execute in Jenkins env * * @returns object. */ -export const jUnitReportOptions = ( - config: Cypress.PluginConfigOptions, - suiteName?: string, +export const jUnitE2EReportOptions = ( + testSuite?: string, jenkinsMode: boolean = false ) => { - if (!!config.env[envVarName]) { - const testSuite = suiteName || config.env['cypress_test_suite'] || 'core'; + if (testSuite) { const testSuiteName = `${capitalize(testSuite)} Test Suite`; return { mochaFile: 'cypress/results/test-results-[hash].xml', @@ -71,6 +68,7 @@ export const jUnitReportOptions = ( jenkinsMode, suiteTitleSeparatedBy: jenkinsMode ? '→' : ' ', }; + } else { + return {}; } - return {}; }; From c9922a2c8a92fa1f28405400a9c9b28d5de0bd09 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Tue, 25 Mar 2025 13:22:33 -0400 Subject: [PATCH 15/21] refactor component vs core test suites --- docker-compose.yml | 1 + docs/development-guide/08-testing.md | 1 + packages/manager/cypress.config.ts | 24 ++++--- .../plugins/configure-multi-reporters.ts | 53 +++++++------- .../support/plugins/configure-test-suite.ts | 38 ---------- .../cypress/support/plugins/html-report.ts | 32 +++++++++ .../cypress/support/plugins/junit-report.ts | 70 ++++++------------- 7 files changed, 92 insertions(+), 127 deletions(-) delete mode 100644 packages/manager/cypress/support/plugins/configure-test-suite.ts create mode 100644 packages/manager/cypress/support/plugins/html-report.ts diff --git a/docker-compose.yml b/docker-compose.yml index d7ccac0bb01..f37da3eaccd 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,6 +49,7 @@ x-e2e-env: # Cypress reporting. CY_TEST_JUNIT_REPORT: ${CY_TEST_JUNIT_REPORT} + CY_TEST_HTML_REPORT: ${CY_TEST_HTML_REPORT} CY_TEST_USER_REPORT: ${CY_TEST_USER_REPORT} # Cloud Manager build environment. diff --git a/docs/development-guide/08-testing.md b/docs/development-guide/08-testing.md index 8d51f0c4208..ac2e8fe9db4 100644 --- a/docs/development-guide/08-testing.md +++ b/docs/development-guide/08-testing.md @@ -210,6 +210,7 @@ Environment variables related to Cypress logging and reporting, as well as repor |---------------------------------|----------------------------------------------------|------------------|----------------------------| | `CY_TEST_USER_REPORT` | Log test account information when tests begin | `1` | Unset; disabled by default | | `CY_TEST_JUNIT_REPORT` | Enable JUnit reporting | `1` | Unset; disabled by default | +| `CY_TEST_HTML_REPORT` | Generate html report containing E2E test results | `1` | Unset; disabled by default | | `CY_TEST_DISABLE_FILE_WATCHING` | Disable file watching in Cypress UI | `1` | Unset; disabled by default | | `CY_TEST_DISABLE_RETRIES` | Disable test retries on failure in CI | `1` | Unset; disabled by default | | `CY_TEST_FAIL_ON_MANAGED` | Fail affected tests when Managed is enabled | `1` | Unset; disabled by default | diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index 393f523cde0..aa8b6d036d9 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -3,7 +3,10 @@ import { defineConfig } from 'cypress'; import { setupPlugins } from './cypress/support/plugins'; import { configureBrowser } from './cypress/support/plugins/configure-browser'; import { configureFileWatching } from './cypress/support/plugins/configure-file-watching'; -import { configureTestSuite } from './cypress/support/plugins/configure-test-suite'; +import { + enableJunitE2eReport, + enableJunitComponentReport, +} from './cypress/support/plugins/junit-report'; import { discardPassedTestRecordings } from './cypress/support/plugins/discard-passed-test-recordings'; import { loadEnvironmentConfig } from './cypress/support/plugins/load-env-config'; import { nodeVersionCheck } from './cypress/support/plugins/node-version-check'; @@ -13,13 +16,13 @@ import { configureApi } from './cypress/support/plugins/configure-api'; import { fetchAccount } from './cypress/support/plugins/fetch-account'; import { fetchLinodeRegions } from './cypress/support/plugins/fetch-linode-regions'; import { splitCypressRun } from './cypress/support/plugins/split-run'; -import { enableJunitReport } from './cypress/support/plugins/junit-report'; import { generateTestWeights } from './cypress/support/plugins/generate-weights'; import { logTestTagInfo } from './cypress/support/plugins/test-tagging-info'; import cypressViteConfig from './cypress/vite.config'; import { featureFlagOverrides } from './cypress/support/plugins/feature-flag-override'; import { postRunCleanup } from './cypress/support/plugins/post-run-cleanup'; import { resetUserPreferences } from './cypress/support/plugins/reset-user-preferences'; +import { enableHtmlReport } from './cypress/support/plugins/html-report'; import { configureMultiReporters } from './cypress/support/plugins/configure-multi-reporters'; import cypressOnFix from 'cypress-on-fix'; /** @@ -59,15 +62,18 @@ export default defineConfig({ }, indexHtmlFile: './cypress/support/component/index.html', supportFile: './cypress/support/component/setup.tsx', - specPattern: './cypress/component/**/*.spec.tsx', + specPattern: './cypress/component/components/beta-chip.spec.tsx', viewportWidth: 500, viewportHeight: 500, - setupNodeEvents(on, config) { + setupNodeEvents(cypressOn, config) { + const on = cypressOnFix(cypressOn); return setupPlugins(on, config, [ loadEnvironmentConfig, discardPassedTestRecordings, - enableJunitReport('Component', true), + enableJunitComponentReport, + enableHtmlReport, + configureMultiReporters, ]); }, }, @@ -77,10 +83,7 @@ export default defineConfig({ // This can be overridden using `CYPRESS_BASE_URL`. baseUrl: 'http://localhost:3000', - - // This is overridden when `CY_TEST_SUITE` is defined. - // See `cypress/support/plugins/configure-test-suite.ts`. - specPattern: 'cypress/e2e/core/**/*.spec.{ts,tsx}', + specPattern: 'cypress/e2e/core/longview/longview.spec.{ts,tsx}', setupNodeEvents(cypressOn, config) { const on = cypressOnFix(cypressOn); @@ -89,7 +92,6 @@ export default defineConfig({ nodeVersionCheck, configureApi, configureFileWatching, - configureTestSuite, configureBrowser, vitePreprocess, discardPassedTestRecordings, @@ -101,6 +103,8 @@ export default defineConfig({ logTestTagInfo, splitCypressRun, generateTestWeights, + enableJunitE2eReport, + enableHtmlReport, configureMultiReporters, postRunCleanup, ]); diff --git a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts index d5768691b9c..262f50fc223 100644 --- a/packages/manager/cypress/support/plugins/configure-multi-reporters.ts +++ b/packages/manager/cypress/support/plugins/configure-multi-reporters.ts @@ -1,38 +1,33 @@ import { CypressPlugin } from './plugin'; -import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; -const { beforeRunHook, afterRunHook } = cypressReporterLib; -import { jUnitE2EReportOptions } from './junit-report'; +// The name of the environment variable to read when checking report configuration. +const envVarJunit = 'CY_TEST_JUNIT_REPORT'; +const envVarHtml = 'CY_TEST_HTML_REPORT'; /** * Configure multiple reporters to be used by Cypress + * Multireporter uses between 0 and 2 reporters (junit, html) + * and for either core or component directory * * @returns Cypress configuration object. */ -export const configureMultiReporters: CypressPlugin = (on, config) => { - config.reporter = 'cypress-multi-reporters'; - config.reporterOptions = { - reporterEnabled: 'mocha-junit-reporter, cypress-mochawesome-reporter', - //config.env['cypress_test_suite'] = 'core' - mochaJunitReporterReporterOptions: jUnitE2EReportOptions( - config.env['cypress_test_suite'], - false - ), - cypressMochawesomeReporterReporterOptions: { - reportPageTitle: 'Cloud Manager E2e Test Results', - embeddedScreenshots: true, - videoOnFailOnly: true, - charts: true, - quiet: true, - }, - }; - - // need hooks to insert results into html file by cypress-mochawesome-reporter - on('before:run', async (results) => { - await beforeRunHook(results); - }); - - on('after:run', async () => { - await afterRunHook(); - }); +export const configureMultiReporters: CypressPlugin = (_on, config) => { + const arrReporters = []; + if (config.env[envVarJunit]) { + console.log('Junit reporting configuration added.'); + arrReporters.push('mocha-junit-reporter'); + } + if (config.env[envVarHtml]) { + console.log('Html reporting configuration added.'); + arrReporters.push('cypress-mochawesome-reporter'); + } + if (arrReporters.length > 0) { + config.reporter = 'cypress-multi-reporters'; + if (!config.reporterOptions) { + config.reporterOptions = {}; + } + config.reporterOptions.reporterEnabled = arrReporters.join(', '); + } else { + console.log('No reporters configured.'); + } return config; }; diff --git a/packages/manager/cypress/support/plugins/configure-test-suite.ts b/packages/manager/cypress/support/plugins/configure-test-suite.ts deleted file mode 100644 index 0e431ee07a9..00000000000 --- a/packages/manager/cypress/support/plugins/configure-test-suite.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { CypressPlugin } from './plugin'; - -// The name of the environment variable to read when checking suite configuration. -const envVarName = 'CY_TEST_SUITE'; - -/** - * Overrides the Cypress test suite according to `CY_TEST_SUITE` environment variable. - * - * If `CY_TEST_SUITE` is undefined or invalid, the 'core' test suite will be run - * by default. - * - * The resolved test suite name can be read by tests and other plugins via - * `Cypress.env('cypress_test_suite')`. - * - * @returns Cypress configuration object. - */ -export const configureTestSuite: CypressPlugin = (_on, config) => { - const suiteName = (() => { - switch (config.env[envVarName]) { - case 'synthetic': - return 'synthetic'; - - case 'core': - default: - if (!!config.env[envVarName] && config.env[envVarName] !== 'core') { - const desiredSuite = config.env[envVarName]; - console.warn( - `Unknown test suite '${desiredSuite}'. Running 'core' test suite instead.` - ); - } - return 'core'; - } - })(); - - config.env['cypress_test_suite'] = suiteName; - config.specPattern = `cypress/e2e/${suiteName}/**/*.spec.{ts,tsx}`; - return config; -}; diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts new file mode 100644 index 00000000000..2b36e3602fb --- /dev/null +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -0,0 +1,32 @@ +import { CypressPlugin } from './plugin'; +import cypressReporterLib from 'cypress-mochawesome-reporter/lib'; +const { beforeRunHook, afterRunHook } = cypressReporterLib; + +// The name of the environment variable to read when checking report configuration. +const envVarName = 'CY_TEST_HTML_REPORT'; + +/** + * @returns Cypress configuration object. + */ +export const enableHtmlReport: CypressPlugin = async function (on, config) { + if (!!config.env[envVarName]) { + if (!config.reporterOptions) { + config.reporterOptions = {}; + } + config.reporterOptions.cypressMochawesomeReporterReporterOptions = { + reportPageTitle: 'Cloud Manager E2e Test Results', + embeddedScreenshots: true, + videoOnFailOnly: true, + charts: true, + quiet: true, + }; + on('before:run', async (results) => { + await beforeRunHook(results); + }); + + on('after:run', async () => { + await afterRunHook(); + }); + } + return config; +}; diff --git a/packages/manager/cypress/support/plugins/junit-report.ts b/packages/manager/cypress/support/plugins/junit-report.ts index 639353aa041..e2d1b3393ef 100644 --- a/packages/manager/cypress/support/plugins/junit-report.ts +++ b/packages/manager/cypress/support/plugins/junit-report.ts @@ -8,67 +8,37 @@ const capitalize = (str: string): string => { }; /** - * Returns a plugin to enable JUnit reporting when `CY_TEST_JUNIT_REPORT` is defined. - * - * If no suite name is specified, this function will attempt to determine the - * suite name using the Cypress configuration object. - * - * @param suiteName - Optional suite name in the JUnit output. - * * @returns Cypress configuration object. */ -export const enableJunitReport = ( - suiteName?: string, - jenkinsMode: boolean = false -): CypressPlugin => { - return (_on, config) => { - if (!!config.env[envVarName]) { - // Use `suiteName` if it is specified. - // Otherwise, attempt to determine the test suite name using - // our Cypress configuration. - const testSuite = suiteName || config.env['cypress_test_suite'] || 'core'; - - const testSuiteName = `${capitalize(testSuite)} Test Suite`; - - // Cypress doesn't know to look for modules in the root `node_modules` - // directory, so we have to pass a relative path. - // See also: https://github.com/cypress-io/cypress/issues/6406 - config.reporter = 'node_modules/mocha-junit-reporter'; - - // See also: https://www.npmjs.com/package/mocha-junit-reporter#full-configuration-options - config.reporterOptions = { - mochaFile: 'cypress/results/test-results-[hash].xml', - rootSuiteTitle: 'Cloud Manager Cypress Tests', - testsuitesTitle: testSuiteName, - jenkinsMode, - suiteTitleSeparatedBy: jenkinsMode ? '→' : ' ', - }; - } - return config; - }; +export const enableJunitE2eReport: CypressPlugin = (_on, config) => { + const testSuiteName = 'core'; + return getCommonJunitConfig(testSuiteName, config); }; /** - * Used to get config options for E2E test suite - * @param suiteName - Optional suite name in the JUnit output. - * @param jenkinsMode - If test is execute in Jenkins env - * - * @returns object. + * @returns Cypress configuration object. */ -export const jUnitE2EReportOptions = ( - testSuite?: string, - jenkinsMode: boolean = false +export const enableJunitComponentReport: CypressPlugin = (_on, config) => { + const testSuiteName = 'component'; + return getCommonJunitConfig(testSuiteName, config); +}; + +const getCommonJunitConfig = ( + testSuite: string, + config: Cypress.PluginConfigOptions ) => { - if (testSuite) { + if (!!config.env[envVarName]) { + if (!config.reporterOptions) { + config.reporterOptions = {}; + } const testSuiteName = `${capitalize(testSuite)} Test Suite`; - return { + config.reporterOptions.mochaJunitReporterReporterOptions = { mochaFile: 'cypress/results/test-results-[hash].xml', rootSuiteTitle: 'Cloud Manager Cypress Tests', testsuitesTitle: testSuiteName, - jenkinsMode, - suiteTitleSeparatedBy: jenkinsMode ? '→' : ' ', + jenkinsMode: true, + suiteTitleSeparatedBy: '→', }; - } else { - return {}; } + return config; }; From 6a6ac63cd3d0bb3f4926451d14d67837f9f0fe83 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Tue, 25 Mar 2025 14:13:10 -0400 Subject: [PATCH 16/21] remove debug code --- packages/manager/cypress.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index aa8b6d036d9..d3c582dff3b 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -62,7 +62,7 @@ export default defineConfig({ }, indexHtmlFile: './cypress/support/component/index.html', supportFile: './cypress/support/component/setup.tsx', - specPattern: './cypress/component/components/beta-chip.spec.tsx', + specPattern: './cypress/component/**/*.spec.tsx', viewportWidth: 500, viewportHeight: 500, @@ -83,7 +83,7 @@ export default defineConfig({ // This can be overridden using `CYPRESS_BASE_URL`. baseUrl: 'http://localhost:3000', - specPattern: 'cypress/e2e/core/longview/longview.spec.{ts,tsx}', + specPattern: 'cypress/e2e/core/**/*.spec.{ts,tsx}', setupNodeEvents(cypressOn, config) { const on = cypressOnFix(cypressOn); From bbdbbec64748590675afb2465c0d290a9658b253 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 27 Mar 2025 12:23:56 -0400 Subject: [PATCH 17/21] inline assets option --- packages/manager/cypress/support/plugins/html-report.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/manager/cypress/support/plugins/html-report.ts b/packages/manager/cypress/support/plugins/html-report.ts index 2b36e3602fb..ebcd7a528c2 100644 --- a/packages/manager/cypress/support/plugins/html-report.ts +++ b/packages/manager/cypress/support/plugins/html-report.ts @@ -15,6 +15,7 @@ export const enableHtmlReport: CypressPlugin = async function (on, config) { } config.reporterOptions.cypressMochawesomeReporterReporterOptions = { reportPageTitle: 'Cloud Manager E2e Test Results', + inlineAssets: true, embeddedScreenshots: true, videoOnFailOnly: true, charts: true, From 4136c3435dcdd7cad4dfd003e798c4594194c767 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Thu, 27 Mar 2025 12:32:56 -0400 Subject: [PATCH 18/21] demo changes --- packages/manager/cypress.config.ts | 3 ++- packages/manager/cypress/e2e/core/longview/longview.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index d3c582dff3b..79a722bc7ee 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -83,7 +83,8 @@ export default defineConfig({ // This can be overridden using `CYPRESS_BASE_URL`. baseUrl: 'http://localhost:3000', - specPattern: 'cypress/e2e/core/**/*.spec.{ts,tsx}', + // TODO: only runa few tests for presentation + specPattern: 'cypress/e2e/core/longview/*.spec.{ts,tsx}', setupNodeEvents(cypressOn, config) { const on = cypressOnFix(cypressOn); diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index e14eac42563..eadf294e0dd 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -399,8 +399,8 @@ describe('longview', () => { .click(); }); ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); - - ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { + // TODO: intentionally fail test + ui.dialog.findByTitle(`ABCDEFDelete ${client.label}?`).within(() => { ui.buttonGroup .findButtonByTitle('Delete') .should('be.visible') From 81ce68b774556283f78f762956bb3104b9d5f50e Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 31 Mar 2025 09:27:58 -0400 Subject: [PATCH 19/21] remove debug code --- packages/manager/cypress.config.ts | 3 +-- packages/manager/cypress/e2e/core/longview/longview.spec.ts | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/manager/cypress.config.ts b/packages/manager/cypress.config.ts index 79a722bc7ee..d3c582dff3b 100644 --- a/packages/manager/cypress.config.ts +++ b/packages/manager/cypress.config.ts @@ -83,8 +83,7 @@ export default defineConfig({ // This can be overridden using `CYPRESS_BASE_URL`. baseUrl: 'http://localhost:3000', - // TODO: only runa few tests for presentation - specPattern: 'cypress/e2e/core/longview/*.spec.{ts,tsx}', + specPattern: 'cypress/e2e/core/**/*.spec.{ts,tsx}', setupNodeEvents(cypressOn, config) { const on = cypressOnFix(cypressOn); diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index eadf294e0dd..8d5cd633d12 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -399,8 +399,7 @@ describe('longview', () => { .click(); }); ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); - // TODO: intentionally fail test - ui.dialog.findByTitle(`ABCDEFDelete ${client.label}?`).within(() => { + ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { ui.buttonGroup .findButtonByTitle('Delete') .should('be.visible') From 78dab3bf82b60aadd39c54d5a4d056f16a567e04 Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 31 Mar 2025 10:37:32 -0400 Subject: [PATCH 20/21] revert change --- packages/manager/cypress/e2e/core/longview/longview.spec.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index 8d5cd633d12..f2394891c20 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -398,6 +398,7 @@ describe('longview', () => { .findByTitle(`Action menu for Longview Client ${client.label}`) .click(); }); + ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { ui.buttonGroup From 3a1da2643c02cb05f12589d46814cf053069b07e Mon Sep 17 00:00:00 2001 From: dmcintyr-akamai Date: Mon, 31 Mar 2025 10:41:36 -0400 Subject: [PATCH 21/21] revert format change --- packages/manager/cypress/e2e/core/longview/longview.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/manager/cypress/e2e/core/longview/longview.spec.ts b/packages/manager/cypress/e2e/core/longview/longview.spec.ts index f2394891c20..e14eac42563 100644 --- a/packages/manager/cypress/e2e/core/longview/longview.spec.ts +++ b/packages/manager/cypress/e2e/core/longview/longview.spec.ts @@ -398,8 +398,8 @@ describe('longview', () => { .findByTitle(`Action menu for Longview Client ${client.label}`) .click(); }); - ui.actionMenuItem.findByTitle('Delete').should('be.visible').click(); + ui.dialog.findByTitle(`Delete ${client.label}?`).within(() => { ui.buttonGroup .findButtonByTitle('Delete')