Skip to content

Commit c00e851

Browse files
authored
[Bug]Updated flakey test from reporting homepage (#1722)
* Updated flakey test from reporting homepage Signed-off-by: sumukhswamy <sumukhhs@amazon.com> * Updated flakey test from reporting homepage Signed-off-by: sumukhswamy <sumukhhs@amazon.com> * updated artifact and url in test Signed-off-by: sumukhswamy <sumukhhs@amazon.com> --------- Signed-off-by: sumukhswamy <sumukhhs@amazon.com>
1 parent 57c0761 commit c00e851

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

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

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

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

+5-3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ describe('Cypress', () => {
3131
cy.visit(`${BASE_PATH}/app/reports-dashboards#/`, {
3232
waitForGetTenant: true,
3333
});
34+
cy.intercept('GET', `${BASE_PATH}/api/reporting/generateReport/*`).as(
35+
'generateReport'
36+
);
37+
3438
cy.location('pathname', { timeout: TIMEOUT }).should(
3539
'include',
3640
'/reports-dashboards'
@@ -40,9 +44,7 @@ describe('Cypress', () => {
4044
cy.get('[id="landingPageOnDemandDownload"]')
4145
.contains('PDF')
4246
.click({ force: true });
43-
cy.get('.euiToastHeader__title')
44-
.contains('Successfully generated report')
45-
.should('exist');
47+
cy.wait('@generateReport').its('response.statusCode').should('eq', 200);
4648
});
4749

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

0 commit comments

Comments
 (0)