Public Access
test: use fake steam id in test fixtures
Replace the real Steam ID with the fake 76561198000000001 in the SettingsPage and validation tests. Keep personal data out of the repo.
This commit is contained in:
1 parent
c599054059
commit
ec0b2844c3
4 files changed
+5
-5
No files matched your search
@@ -16,7 +16,7 @@ vi.mock('sonner', () => ({toast: {success: vi.fn(), error: vi.fn(), info: vi.fn(
|
||||
const STEAM_URL = 'https://steamcommunity.com/openid/login?openid.mode=checkid_setup';
|
||||
|
||||
const profile = (overrides = {}) => ({
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198005679788', steamIdVerified: false,
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198000000001', steamIdVerified: false,
|
||||
settings: {useDarkTheme: true, language: 'de', publicProfile: false}, ...overrides,
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ vi.mock('react-i18next', async () => {
|
||||
vi.mock('sonner', () => ({toast: {success: vi.fn(), error: vi.fn(), info: vi.fn()}}));
|
||||
|
||||
const profile = {
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198005679788', steamIdVerified: true,
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198000000001', steamIdVerified: true,
|
||||
settings: {useDarkTheme: true, language: 'de', publicProfile: false},
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ vi.mock('react-i18next', async () => {
|
||||
vi.mock('sonner', () => ({toast: {success: vi.fn(), error: vi.fn()}}));
|
||||
|
||||
const profile = (overrides = {}) => ({
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198005679788',
|
||||
id: 1, email: 'a@b.de', role: 'USER', displayName: 'Lobo', steamId: '76561198000000001',
|
||||
settings: {useDarkTheme: true, language: 'de', publicProfile: true}, ...overrides,
|
||||
});
|
||||
|
||||
|
||||
@@ -5,10 +5,10 @@ const settings = () => ({useDarkTheme: true, language: 'de'});
|
||||
|
||||
describe('Steam ID', () => {
|
||||
it('is no form field any more: it comes only from "Sign in through Steam"', () => {
|
||||
expect(settingsSchema.parse({...settings(), steamId: '76561198005679788'})).not.toHaveProperty('steamId');
|
||||
expect(settingsSchema.parse({...settings(), steamId: '76561198000000001'})).not.toHaveProperty('steamId');
|
||||
expect(registrationSchema.parse({
|
||||
email: 'a@b.de',
|
||||
steamId: '76561198005679788',
|
||||
steamId: '76561198000000001',
|
||||
})).not.toHaveProperty('steamId');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user