Skip to content

Commit ca33bd3

Browse files
authored
[BUG]Reports flakey test fix for 2.5 (#1728)
* Reports falkey test fix Signed-off-by: sumukhswamy <sumukhhs@amazon.com> * chamged workflow Signed-off-by: sumukhswamy <sumukhhs@amazon.com> --------- Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
1 parent d392ac2 commit ca33bd3

File tree

2 files changed

+7
-10
lines changed

2 files changed

+7
-10
lines changed

.github/workflows/release-e2e-workflow-template.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ jobs:
113113
command: ${{ inputs.test-command }}
114114
wait-on: 'http://localhost:5601'
115115
# Screenshots are only captured on failure, will change this once we do visual regression tests
116-
- uses: actions/upload-artifact@v1
116+
- uses: actions/upload-artifact@v4
117117
if: failure()
118118
with:
119119
name: cypress-screenshots
120120
path: cypress-test/cypress/screenshots
121121
# Test run video was always captured, so this action uses "always()" condition
122-
- uses: actions/upload-artifact@v1
122+
- uses: actions/upload-artifact@v4
123123
if: always()
124124
with:
125125
name: cypress-videos
126126
path: cypress-test/cypress/videos
127127
# Test reports was always captured, so this action uses "always()" condition
128-
- uses: actions/upload-artifact@v1
128+
- uses: actions/upload-artifact@v4
129129
if: always()
130130
with:
131131
name: cypress-results

cypress/integration/plugins/reports-dashboards/04-download.spec.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ describe('Cypress', () => {
2828
});
2929

3030
it('Download from reporting homepage', () => {
31+
cy.intercept('GET', `${BASE_PATH}/api/reporting/generateReport/*`).as(
32+
'generateReport'
33+
);
3134
cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, {
3235
waitForGetTenant: true,
3336
});
@@ -40,13 +43,7 @@ describe('Cypress', () => {
4043
cy.get('[id="landingPageOnDemandDownload"]')
4144
.contains('PDF')
4245
.click({ force: true });
43-
cy.get('body').then(($body) => {
44-
if ($body.find('#downloadInProgressLoadingModal').length > 0) {
45-
return;
46-
} else {
47-
assert(false);
48-
}
49-
});
46+
cy.wait('@generateReport').its('response.statusCode').should('eq', 200);
5047
});
5148

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

0 commit comments

Comments
 (0)