Skip to content

Commit

Permalink
chore(RHINENG-15653): Cleanup ReportsComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
LightOfHeaven1994 committed Feb 3, 2025
1 parent 7dba1c6 commit 563dd82
Show file tree
Hide file tree
Showing 7 changed files with 446 additions and 419 deletions.
89 changes: 0 additions & 89 deletions cypress/fixtures/reports.json

This file was deleted.

14 changes: 14 additions & 0 deletions cypress/utils/interceptors.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,17 @@ export const featureFlagsInterceptors = {
});
},
};

export const interceptReportsBatch = (endpoint, offset, dataSlice, total, limit=10) => {
cy.intercept(new RegExp(`/api/compliance/v2/${endpoint}?.*limit=${limit}.*offset=${offset}.*`), {
statusCode: 200,
body: {
data: dataSlice,
meta: {
limit: 10,
offset,
total: total,
}
}
}).as(`getReportsBatch${offset / 10 + 1}`); // getReportsBatch1, getReportsBatch2, etc
};
Loading

0 comments on commit 563dd82

Please sign in to comment.