fix e2e about compliance test (#23742)

This commit is contained in:
Saturnino Abril 2023-06-15 14:19:38 +08:00 committed by GitHub
parent 44a99d1736
commit 5881c7dac5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 18 additions and 1 deletions

View File

@ -31,6 +31,10 @@ describe('Compliance Export', () => {
teamName = team.name;
});
// # Visit a channel and post a message so it has something to be exported initially
cy.visit('/');
cy.postMessage('hello');
// # Go to compliance page, enable export and do initial export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport();

View File

@ -33,6 +33,10 @@ describe('Compliance Export', () => {
teamName = team.name;
});
// # Visit a channel and post a message so it has something to be exported initially
cy.visit('/');
cy.postMessage('hello');
// # Go to compliance page, enable export and do initial export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport();

View File

@ -37,6 +37,10 @@ describe('Compliance Export', () => {
teamName = team.name;
});
// # Visit a channel and post a message so it has something to be exported initially
cy.visit('/');
cy.postMessage('hello');
// # Go to compliance page, enable export and do export
cy.uiGoToCompliancePage();
cy.uiEnableComplianceExport();

View File

@ -4,12 +4,17 @@
import * as TIMEOUTS from '../../fixtures/timeouts';
Cypress.Commands.add('uiEnableComplianceExport', (exportFormat = 'csv') => {
// * Verify that the page is loaded
cy.findByText('Enable Compliance Export:').should('be.visible');
cy.findByText('Compliance Export time:').should('be.visible');
cy.findByText('Export Format:').should('be.visible');
// # Enable compliance export
cy.findByRole('radio', {name: /false/i}).click();
cy.findByRole('radio', {name: /true/i}).click();
// # Change export format
cy.findByRole('combobox', {name: /export format:/i}).select(exportFormat);
cy.findByTestId('exportFormatdropdown').should('be.visible').select(exportFormat);
// # Save settings
cy.uiSaveConfig({confirm: true});