Skip to content

Instantly share code, notes, and snippets.

@YonatanKra
Created September 17, 2023 13:45
Show Gist options
  • Save YonatanKra/bd54cd2907e4dded2e6fc87b46a0b529 to your computer and use it in GitHub Desktop.
Save YonatanKra/bd54cd2907e4dded2e6fc87b46a0b529 to your computer and use it in GitHub Desktop.
Tauri-demo: login edge case - auth component is not implemented
it('should display login screen if auth component is not initialized', () => {
isLoggedIn = true;
const originalIsLoggedIn = MockAuth.prototype.isLoggedIn;
MockAuth.prototype.isLoggedIn = undefined;
app.connectedCallback();
MockAuth.prototype.isLoggedIn = originalIsLoggedIn;
expect(getElementInView('yag-login')).toBeTruthy();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment