Skip to content

Commit

Permalink
[BUG]Reports flakey test fix for 2.7 (#1729)
Browse files Browse the repository at this point in the history
* 2.7-reports-fix

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* 2.7-reports-fix

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted changes

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted changes

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted workflow

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted workflow

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

* reverted workflow

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>

---------

Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
  • Loading branch information
sumukhswamy authored Feb 21, 2025
1 parent 4ef571b commit 75557b5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-e2e-workflow-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,19 @@ jobs:
command: ${{ inputs.test-command }}
wait-on: 'http://localhost:5601'
# Screenshots are only captured on failure, will change this once we do visual regression tests
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: cypress-test/cypress/screenshots
# Test run video was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-videos
path: cypress-test/cypress/videos
# Test reports was always captured, so this action uses "always()" condition
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
if: always()
with:
name: cypress-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ describe('Cypress', () => {
});

it('Download from reporting homepage', () => {
cy.intercept('GET', `${BASE_PATH}/api/reporting/generateReport/*`).as(
'generateReport'
);
cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, {
waitForGetTenant: true,
});
Expand All @@ -40,13 +43,7 @@ describe('Cypress', () => {
cy.get('[id="landingPageOnDemandDownload"]')
.contains('PDF')
.click({ force: true });
cy.get('body').then(($body) => {
if ($body.find('#downloadInProgressLoadingModal').length > 0) {
return;
} else {
assert(false);
}
});
cy.wait('@generateReport').its('response.statusCode').should('eq', 200);
});

it('Download pdf from in-context menu', () => {
Expand Down

0 comments on commit 75557b5

Please sign in to comment.