fix(usage): introduce consented v4 without changing historical reports
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import catalog from './usageFeatures.v3.json';
|
||||
import catalog from './usageFeatures.v4.json';
|
||||
|
||||
/** Local, static disclosure: opening it never contacts the collector. */
|
||||
export function UsageCatalog() {
|
||||
|
||||
@@ -69,7 +69,7 @@ beforeEach(() => {
|
||||
};
|
||||
});
|
||||
afterEach(cleanup);
|
||||
it('shows every v2 signal locally before participation, without collector calls', async () => {
|
||||
it('shows every v4 signal locally before participation, without collector calls', async () => {
|
||||
mount();
|
||||
await screen.findByText('productUsage.catalogTitle');
|
||||
expect(screen.getAllByRole('heading', { level: 4, hidden: true })).toHaveLength(87);
|
||||
@@ -77,8 +77,8 @@ it('shows every v2 signal locally before participation, without collector calls'
|
||||
expect(service.preview).not.toHaveBeenCalled();
|
||||
expect(service.upgradeConsent).not.toHaveBeenCalled();
|
||||
});
|
||||
it('existing v1 requires renewed unchecked consent; cancellation keeps v1 unchanged', async () => {
|
||||
vi.mocked(service.status).mockResolvedValue({ ...status, status: 'active', consent_update_available: true });
|
||||
it.each(['usage.v1', 'usage.v2', 'usage.v3'])('existing %s requires renewed unchecked consent; cancellation keeps its scope unchanged', async (schema_version) => {
|
||||
vi.mocked(service.status).mockResolvedValue({ ...status, status: 'active', schema_version, consent_update_available: true });
|
||||
vi.mocked(service.upgradeConsent).mockResolvedValue({ delivered: false, queued: true, state: { ...status, status: 'active', pending_action: 'consent' } });
|
||||
mount();
|
||||
fireEvent.click(await screen.findByText('productUsage.reviewUpgrade'));
|
||||
|
||||
@@ -1182,18 +1182,18 @@
|
||||
},
|
||||
"used": null
|
||||
},
|
||||
"gallery_downloads_restricted": {
|
||||
"gallery_downloads": {
|
||||
"category": "gallery_configuration",
|
||||
"since": "usage.v3",
|
||||
"since": "usage.v2",
|
||||
"measurement": "configuration",
|
||||
"configuration": "configuration",
|
||||
"name": {
|
||||
"en": "Gallery downloads restricted",
|
||||
"de": "Galerie-Downloads eingeschränkt"
|
||||
"en": "Gallery downloads allowed",
|
||||
"de": "Galerie-Downloads erlaubt"
|
||||
},
|
||||
"configured": {
|
||||
"en": "At least one gallery has downloads switched off; only existence across the installation, never gallery IDs or counts.",
|
||||
"de": "Mindestens eine Galerie hat Downloads abgeschaltet; nur installationsweite Existenz, niemals Galeriekennungen oder Anzahlen."
|
||||
"en": "Enabled in applicable gallery/global configuration; only existence across the installation, never gallery IDs or counts.",
|
||||
"de": "In der betreffenden Galerie-/Globalkonfiguration aktiviert; nur installationsweite Existenz, niemals Galeriekennungen oder Anzahlen."
|
||||
},
|
||||
"used": null
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user