play data-safety: write the conditional required rows (PSL_ACCOUNT_DELETION_URL from accounts.deletionUrl, PSL_SUPPORT_DATA_DELETION_BY_USER from dataSafety.partialDeletion, PSL_DATA_DELETION_URL); a rule table checks every conditional row in check, declarations and --dry before Play answers 400
This commit is contained in:
parent
c9a7f095c4
commit
97ab76e9c8
14 changed files with 295 additions and 24 deletions
|
|
@ -139,6 +139,24 @@ describe('check: appPrivacy.types against the iOS project', () => {
|
|||
expect(msgs(r)).toContain('appPrivacy.types.GAMEPLAY_CONTENT is collected, but App/PrivacyInfo.xcprivacy has no NSPrivacyCollectedDataTypeGameplayContent');
|
||||
expect(appPrivacyMismatches({ DEVICE_ID: { collected: true, tracking: true } }, { attString: true, manifest: m(true, ['NSPrivacyCollectedDataTypeDeviceID']) })).toEqual([]);
|
||||
});
|
||||
test('storebound check: a missing accounts.deletionUrl is a Data safety problem (Play 400 otherwise)', async () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'storebound-ds-'));
|
||||
try {
|
||||
writeFileSync(join(dir, '.gitignore'), '.storebound/\n');
|
||||
const c = { app: base.app, languages: base.languages, accounts: { enabled: true, signUp: ['username'] },
|
||||
dataSafety: { collectsData: true, encryptedInTransit: true, deletionRequest: true, accountCreation: ['PSL_ACM_USER_ID_OTHER_AUTH'], partialDeletion: false,
|
||||
data: { PSL_USER_ACCOUNT: { shared: false, collect: ['account'] } } } } as ShipConfig;
|
||||
const out: string[] = [];
|
||||
const orig = console.log;
|
||||
console.log = (s: string) => { out.push(s); };
|
||||
try { await check({ loaded: { config: c, root: dir, path: join(dir, 'storebound.config.ts'), resolve: p => join(dir, p) }, args: parseArgs(['--json']) }); }
|
||||
finally { console.log = orig; process.exitCode = 0; }
|
||||
const problems = (JSON.parse(out.at(-1)!).problems as string[]).join('\n');
|
||||
expect(problems).toContain('data safety: missing: PSL_ACCOUNT_DELETION_URL');
|
||||
expect(problems).toContain('set accounts.deletionUrl');
|
||||
} finally { rmSync(dir, { recursive: true, force: true }); }
|
||||
});
|
||||
|
||||
test('storebound check reports the mismatches (errors are problems)', async () => {
|
||||
const dir = mkdtempSync(join(tmpdir(), 'storebound-ap-'));
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue