diff --git a/screenshot-test/App.screenshot.js b/screenshot-test/App.screenshot.js index b81f79f9e..0d43ed4c9 100644 --- a/screenshot-test/App.screenshot.js +++ b/screenshot-test/App.screenshot.js @@ -393,7 +393,7 @@ describe('Tests with login', () => { it('Usage Analysis Page#User Overview', async () => { await page.goto(`${CLIENT_URL}admin/usage-analysis`); await page.setViewport(VIEW_PORT_1080); - await page.waitFor(WAITING_TIME); + await page.waitFor(LONG_WAITING_TIME); let image = await page.screenshot( getScreenshotConfig('Usage Analysis Page#User Overview') ); diff --git a/screenshot-test/data/api-usage-summary-users.json b/screenshot-test/data/api-usage-summary-users.json index 5a9e86579..5b0b222e2 100644 --- a/screenshot-test/data/api-usage-summary-users.json +++ b/screenshot-test/data/api-usage-summary-users.json @@ -3,207 +3,215 @@ "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/v1/annotate/mutations/byProteinChange", "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 100, - "noPrivateMaxUsage" : 100, - "totalUsage" : 132 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 1284.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint7" : 1.0, + "/api/example/endpoint8" : 2.0, + "/api/example/endpoint9" : 2.0, + "/api/example/endpoint10" : 11.0, + "/api/example/endpoint11" : 12.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint11" : 444432.0, + "/api/example/endpoint12" : 8324461.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1460", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/v1/utils/allCuratedGenes", "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 1, - "noPrivateMaxUsage" : 1, - "totalUsage" : 2 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-04" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2124.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + }, + "2020-09-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint11" : 1234890.0, + "/api/example/endpoint12" : 8324461.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1217", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/v1/utils/allCuratedGenes", "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 3, - "noPrivateMaxUsage" : 3, - "totalUsage" : 6 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint7" : 1.0, + "/api/example/endpoint8" : 2.0, + "/api/example/endpoint9" : 2.0, + "/api/example/endpoint10" : 11.0, + "/api/example/endpoint11" : 12.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint12" : 8324461.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1216", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/v1/utils/allCuratedGenes", "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 1, - "noPrivateMaxUsage" : 1, - "totalUsage" : 2 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint12" : 8324461.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1699", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/private/search/typeahead", "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 7, - "noPrivateMaxUsage" : 6, - "totalUsage" : 68 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint11" : 124.0, + "/api/example/endpoint12" : 4.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1698", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/private/search/typeahead", "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 28, - "noPrivateMaxUsage" : 5, - "totalUsage" : 146 + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint11" : 14.0, + "/api/example/endpoint12" : 144.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } }, { "userId" : "1213", "userEmail" : "screenshot-mock-user@email.com", "endpoint" : "/api/private/utils/numbers/levels/", "noPrivateEndpoint" : "", - "maxUsage" : 1, - "noPrivateMaxUsage" : 0, - "totalUsage" : 2 - }, { - "userId" : "1696", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 30005, - "noPrivateMaxUsage" : 30005, - "totalUsage" : 30184 - }, { - "userId" : "1210", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 36744, - "noPrivateMaxUsage" : 36744, - "totalUsage" : 37040 - }, { - "userId" : "1219", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 1174895, - "noPrivateMaxUsage" : 1174895, - "totalUsage" : 1174895 - }, { - "userId" : "1218", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 3786, - "noPrivateMaxUsage" : 3786, - "totalUsage" : 4034 - }, { - "userId" : "1473", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/private/search/typeahead", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 69, - "noPrivateMaxUsage" : 46, - "totalUsage" : 539 - }, { - "userId" : "1230", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 164191, - "noPrivateMaxUsage" : 164191, - "totalUsage" : 164677 - }, { - "userId" : "1470", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/utils/allCuratedGenes", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 3, - "noPrivateMaxUsage" : 3, - "totalUsage" : 6 - }, { - "userId" : "1228", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/private/search/variants/clinical", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 11, - "noPrivateMaxUsage" : 4, - "totalUsage" : 100 - }, { - "userId" : "1226", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 1948, - "noPrivateMaxUsage" : 1948, - "totalUsage" : 1951 - }, { - "userId" : "1468", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 3839, - "noPrivateMaxUsage" : 3839, - "totalUsage" : 3935 - }, { - "userId" : "1225", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 1384, - "noPrivateMaxUsage" : 1384, - "totalUsage" : 1770 - }, { - "userId" : "4", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/utils/allCuratedGenes", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 3, - "noPrivateMaxUsage" : 3, - "totalUsage" : 6 - }, { - "userId" : "1224", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/utils/allCuratedGenes", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 1, - "noPrivateMaxUsage" : 1, - "totalUsage" : 2 - }, { - "userId" : "1466", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/structuralVariants", - "noPrivateEndpoint" : "/api/v1/annotate/structuralVariants", - "maxUsage" : 1011, - "noPrivateMaxUsage" : 1011, - "totalUsage" : 1334 - }, { - "userId" : "5", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/private/search/typeahead", - "noPrivateEndpoint" : "/api/v1/utils/cancerGeneList", - "maxUsage" : 499410, - "noPrivateMaxUsage" : 39288, - "totalUsage" : 2917827 - }, { - "userId" : "1465", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/utils/allCuratedGenes", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 1, - "noPrivateMaxUsage" : 1, - "totalUsage" : 2 - }, { - "userId" : "6", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/annotate/mutations/byProteinChange", - "noPrivateEndpoint" : "/api/v1/annotate/mutations/byProteinChange", - "maxUsage" : 286647, - "noPrivateMaxUsage" : 286647, - "totalUsage" : 298818 - }, { - "userId" : "1222", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/private/search/typeahead", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 14, - "noPrivateMaxUsage" : 8, - "totalUsage" : 71 - }, { - "userId" : "1464", - "userEmail" : "screenshot-mock-user@email.com", - "endpoint" : "/api/v1/utils/allCuratedGenes", - "noPrivateEndpoint" : "/api/v1/utils/allCuratedGenes", - "maxUsage" : 1, - "noPrivateMaxUsage" : 1, - "totalUsage" : 2 - }] \ No newline at end of file + "maxUsageProportion" : 55.6, + "noPrivateMaxUsageProportion" : 55.6, + "totalUsage" : 132, + "dayUsage" : { + "2020-12-01" : { + "/api/example/endpoint1" : 2.0, + "/api/example/endpoint2" : 3.0, + "/api/example/endpoint3" : 2.0, + "/api/example/endpoint4" : 2.0, + "/api/example/endpoint5" : 3.0, + "/api/example/endpoint6" : 2.0, + "/api/example/endpoint13" : 1.0 + }, + "2020-11-01" : { + "/api/example/endpoint10" : 1.0, + "/api/example/endpoint11" : 431.0, + "/api/example/endpoint12" : 4.0 + } + }, + "monthUsage" : { + "2020-12" : { + }, + "2020-11" : { + } + } + }]