mirror of
https://github.com/Zakkaus/doona.git
synced 2026-12-06 16:01:00 +00:00
feat(activity): open the connections traffic from the rate tiles
This commit is contained in:
1 parent
eba80c7c47
commit
894c312aa2
2 files changed
+14
-4
No files matched your search
@@ -646,6 +646,15 @@ test('the active connections tile opens the connection list', async ({page}) =>
|
||||
await expect(page.getByRole('tab', {name: 'Connections', exact: true})).toHaveAttribute('aria-selected', 'true');
|
||||
});
|
||||
|
||||
test('the download and upload tiles open the connections traffic', async ({page}) => {
|
||||
for (const name of ['Download', 'Upload']) {
|
||||
await page.goto('/#/activity');
|
||||
await page.getByRole('link', {name, exact: true}).click();
|
||||
await expect(page).toHaveURL(/#\/connections\?tab=traffic$/);
|
||||
await expect(page.getByRole('tab', {name: 'Traffic', exact: true})).toHaveAttribute('aria-selected', 'true');
|
||||
}
|
||||
});
|
||||
|
||||
test('the rankings, outbound usage and latency tile open the connections and node they name', async ({page}) => {
|
||||
await page.setViewportSize({width: 1440, height: 900});
|
||||
await page.goto('/#/activity');
|
||||
|
||||
@@ -41,8 +41,9 @@ export function Activity() {
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
{/* Each tile opens what it measures: the rates open the connections' traffic, the count opens their list. */}
|
||||
<div className="rp-strip">
|
||||
<Card title={t('act.download')} tile={{icon: <Download />, tint: 1, kind: 'metric'}}>
|
||||
<CardLink href={href('connections', {tab: 'traffic'})} label={t('act.download')} tile={{icon: <Download />, tint: 1}}>
|
||||
<div className="rp-tile-body">
|
||||
<span className="rp-tile-val">
|
||||
<span className="rp-big">{vm.download}</span>
|
||||
@@ -51,8 +52,8 @@ export function Activity() {
|
||||
<Spark values={spark.down} timestamps={spark.timestamps} color={p.cat[0]} floor={100} fmt={chartRate} locale={locale} />
|
||||
</span>
|
||||
</div>
|
||||
</Card>
|
||||
<Card title={t('act.upload')} tile={{icon: <Upload />, tint: 4, kind: 'metric'}}>
|
||||
</CardLink>
|
||||
<CardLink href={href('connections', {tab: 'traffic'})} label={t('act.upload')} tile={{icon: <Upload />, tint: 4}}>
|
||||
<div className="rp-tile-body">
|
||||
<span className="rp-tile-val">
|
||||
<span className="rp-big">{vm.upload}</span>
|
||||
@@ -61,7 +62,7 @@ export function Activity() {
|
||||
<Spark values={spark.up} timestamps={spark.timestamps} color={p.cat[3]} floor={100} fmt={chartRate} locale={locale} />
|
||||
</span>
|
||||
</div>
|
||||
</Card>
|
||||
</CardLink>
|
||||
<CardLink href={href('connections', {tab: 'list'})} label={t('act.active')} tile={{icon: <LinkIcon />, tint: 3}}>
|
||||
<div className="rp-tile-body">
|
||||
<span className="rp-tile-val">
|
||||
|
||||
Reference in new issue
Block a user