Standardize UI typography, charts and empty states
This commit is contained in:
@@ -41,12 +41,17 @@ it('shows a summary and one paginated breakdown, preserving scope on range links
|
||||
expect(body).toContain('Partial previous history');
|
||||
expect(body).toContain('About this report');
|
||||
expect(body).not.toContain('Explore this period');
|
||||
expect(body).toContain('Updates every minute');
|
||||
expect(body).not.toContain('>Refresh<');
|
||||
const heatmap = body.slice(body.indexOf('class="heatmap'), body.indexOf('aria-label="Metrics breakdown"'));
|
||||
expect(heatmap).toContain('<h2'); expect(heatmap).toContain('Activity by weekday and hour');
|
||||
expect(body).not.toContain('class="weekly');
|
||||
});
|
||||
|
||||
it('keeps percentage points, relative changes and unavailable capacity distinct', () => {
|
||||
const data = report();
|
||||
let body = render(MetricsSummary, { props: { report: data } }).body;
|
||||
expect(body).toContain('+10 pp'); expect(body).toContain('+100%');
|
||||
expect(body).toContain('+10 percentage points'); expect(body).toContain('+100%');
|
||||
data.pooledPressure = { value: null, fullMapHours: 0, knownMapHours: 0, coveredMaps: 0, totalMaps: 24 };
|
||||
data.maps = [map(1, { capacityObserved: 0 })];
|
||||
data.previous.summary.playerHours = 0;
|
||||
@@ -116,6 +121,9 @@ it('keeps accessible chart selection, partial periods and gaps while collapsing
|
||||
expect(body).toContain('Inspect a period');
|
||||
expect(body).toContain('Partial period');
|
||||
expect(body).not.toMatch(/<details[^>]*open/);
|
||||
expect(body).toContain('Weekdays show when each period starts in America/New York.');
|
||||
expect(body).toContain('Daily periods are 24-hour windows.');
|
||||
expect(body).toContain('Server activity over time');
|
||||
});
|
||||
|
||||
it('uses shallow URL state for the selected breakdown while retaining the common summary', () => {
|
||||
|
||||
Reference in New Issue
Block a user