mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-15 11:00:47 +02:00
OAuth Provider Buttons (#5103)
PR to allow other OAuth providers to be displayed on the login screen. Will show a generic icon when the provider is not in the known set of providers. <img width="424" height="205" alt="47ab288dadbc889fd84cc83c9ded0829" src="https://github.com/user-attachments/assets/2877eb3d-2ade-406f-a2bf-dc404793e30f" /> --------- Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: stirlingbot[bot] <stirlingbot[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Ludy <[email protected]> Co-authored-by: EthanHealy01 <[email protected]> Co-authored-by: Ethan <[email protected]> Co-authored-by: Anthony Stirling <[email protected]> Co-authored-by: stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Ludy
EthanHealy01
Ethan
Anthony Stirling
stirlingbot[bot] <195170888+stirlingbot[bot]@users.noreply.github.com>
parent
65a3eeca76
commit
f902e8aca9
@@ -1,6 +1,40 @@
|
||||
import '@testing-library/jest-dom';
|
||||
import { vi } from 'vitest';
|
||||
|
||||
// Mock localStorage for tests
|
||||
class LocalStorageMock implements Storage {
|
||||
private store: Record<string, string> = {};
|
||||
|
||||
get length(): number {
|
||||
return Object.keys(this.store).length;
|
||||
}
|
||||
|
||||
clear(): void {
|
||||
this.store = {};
|
||||
}
|
||||
|
||||
getItem(key: string): string | null {
|
||||
return this.store[key] ?? null;
|
||||
}
|
||||
|
||||
key(index: number): string | null {
|
||||
return Object.keys(this.store)[index] ?? null;
|
||||
}
|
||||
|
||||
removeItem(key: string): void {
|
||||
delete this.store[key];
|
||||
}
|
||||
|
||||
setItem(key: string, value: string): void {
|
||||
this.store[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
Object.defineProperty(window, 'localStorage', {
|
||||
value: new LocalStorageMock(),
|
||||
writable: true,
|
||||
});
|
||||
|
||||
// Mock i18next for tests
|
||||
vi.mock('react-i18next', () => ({
|
||||
useTranslation: () => ({
|
||||
|
||||
Reference in New Issue
Block a user