feat: Add business hours in downloadable reports (#4674)

Co-authored-by: Aswin Dev P.S <aswindevps@gmail.com>
This commit is contained in:
Pranav Raj S 2022-05-27 09:26:59 +05:30 committed by GitHub
parent dceeb57a1d
commit 52fad886b8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 138 additions and 67 deletions

View file

@ -47,20 +47,25 @@ describe('#Reports API', () => {
});
it('#getAgentReports', () => {
reportsAPI.getAgentReports(1621103400, 1621621800);
reportsAPI.getAgentReports({
from: 1621103400,
to: 1621621800,
businessHours: true,
});
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/agents',
{
params: {
since: 1621103400,
until: 1621621800,
business_hours: true,
},
}
);
});
it('#getLabelReports', () => {
reportsAPI.getLabelReports(1621103400, 1621621800);
reportsAPI.getLabelReports({ from: 1621103400, to: 1621621800 });
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/labels',
{
@ -73,7 +78,7 @@ describe('#Reports API', () => {
});
it('#getInboxReports', () => {
reportsAPI.getInboxReports(1621103400, 1621621800);
reportsAPI.getInboxReports({ from: 1621103400, to: 1621621800 });
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/inboxes',
{
@ -86,7 +91,7 @@ describe('#Reports API', () => {
});
it('#getTeamReports', () => {
reportsAPI.getTeamReports(1621103400, 1621621800);
reportsAPI.getTeamReports({ from: 1621103400, to: 1621621800 });
expect(context.axiosMock.get).toHaveBeenCalledWith(
'/api/v2/reports/teams',
{