From ffd48149404f4a5d6cd00128be244b44aea4bb2a Mon Sep 17 00:00:00 2001 From: Maria A Nunez Date: Mon, 8 Jun 2026 22:23:20 -0400 Subject: [PATCH] MM-T3436: add Cypress E2E for Actiance XML compliance export download (#36970) Add a Cypress test covering Zephyr case MM-T3436, verifying that with DownloadExportResults enabled and the Actiance XML export format, a compliance export provides a Download link and the downloaded archive contains the posted message content and the file attachment. Reuses existing compliance helpers (uiEnableComplianceExport, uiExportCompliance, gotoTeamAndPostImage, downloadAndUnzipExportFile, verifyActianceXMLFile); modeled on MM-T1173 without the delete step. Co-authored-by: Cursor Agent --- .../download_compliance_export_file_spec.js | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/compliance/download_compliance_export_file_spec.js b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/compliance/download_compliance_export_file_spec.js index 5418ff4c744..c37650ef15d 100644 --- a/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/compliance/download_compliance_export_file_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/enterprise/system_console/compliance/download_compliance_export_file_spec.js @@ -121,6 +121,39 @@ describe('Compliance Export', () => { }); }); + it('MM-T3436 - Download Compliance Export Files - Actiance XML Format', () => { + // # Go to compliance page and enable export in Actiance XML format + cy.uiGoToCompliancePage(); + cy.uiEnableComplianceExport(ExportFormatActiance); + + // # Navigate to a team and post a message with an attachment + cy.visit(`/${newTeam.name}/channels/town-square`); + gotoTeamAndPostImage(); + + // # Go to compliance page and start export + cy.uiGoToCompliancePage(); + cy.uiExportCompliance(); + + // * Verify the Download option is provided for the export job + cy.get('@firstRow').findByText('Download').should('exist'); + + // # Download and extract exported zip file + const targetFolder = `${downloadsFolder}/${Date.now().toString()}`; + downloadAndUnzipExportFile(targetFolder); + + // * Verifying if export file contains the posted message content + verifyActianceXMLFile( + targetFolder, + 'have.string', + 'file uploaded-image-400x400.jpg', + ); + + // * Verifying if the attached file is included in the export + cy.shellFind(targetFolder, /image-400x400.jpg/).then((files) => { + expect(files.length).not.to.equal(0); + }); + }); + it('MM-T1176 - Compliance export should include updated post after editing', () => { // # Go to compliance page and enable export cy.uiGoToCompliancePage();