-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Show simple Connect button in case feature is disabled
- Loading branch information
1 parent
9c15c8c
commit 2f5a7db
Showing
5 changed files
with
49 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/components/common/ConnectWallet/__tests__/ConnectionCenter.test.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { ConnectionCenter } from '@/components/common/ConnectWallet/ConnectionCenter' | ||
import { render } from '@/tests/test-utils' | ||
|
||
describe('ConnectionCenter', () => { | ||
it('displays a Connect wallet button if the social login feature is enabled', () => { | ||
const { getByText, queryByText } = render(<ConnectionCenter isSocialLoginEnabled={true} />) | ||
|
||
expect(getByText('Connect wallet')).toBeInTheDocument() | ||
expect(queryByText('Connect')).not.toBeInTheDocument() | ||
}) | ||
|
||
it('displays the ConnectWalletButton if the social login feature is disabled', () => { | ||
const { getByText, queryByText } = render(<ConnectionCenter isSocialLoginEnabled={false} />) | ||
|
||
expect(queryByText('Connect wallet')).not.toBeInTheDocument() | ||
expect(getByText('Connect')).toBeInTheDocument() | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters