-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
92 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Feature: Join Auth via Yandex | ||
|
||
Scenario: Auth | ||
Given I am a guest user | ||
And I am on "/join" page | ||
When I click "auth-external-yandex" element | ||
Then I see "Auth with Yandex" | ||
When I click "oauth-new" element | ||
Then I see "logout-button" element |
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
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,48 @@ | ||
.external { | ||
margin: 1rem 0; | ||
padding: 1rem 0; | ||
border-top: 1px solid #eee; | ||
border-bottom: 1px solid #eee; | ||
} | ||
|
||
.external .heading { | ||
font-size: 0.8rem; | ||
text-align: center; | ||
margin-bottom: 1rem; | ||
} | ||
|
||
.external .items { | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: center; | ||
} | ||
|
||
.external .item { | ||
margin-right: 0.5rem; | ||
border-radius: 3px; | ||
padding: 0.6rem 1rem; | ||
cursor: pointer; | ||
border: 1px solid #ccc; | ||
background: linear-gradient(to bottom, #fff, #f6f6f6); | ||
color: #222; | ||
font-size: 0.8rem; | ||
line-height: 1; | ||
text-decoration: none; | ||
text-align: center; | ||
} | ||
|
||
.external .item:last-of-type { | ||
margin-right: 0; | ||
} | ||
|
||
.external .item.yandex { | ||
border: 1px solid #f60; | ||
background: linear-gradient(to bottom, #ff7600, #f00); | ||
color: #fff; | ||
} | ||
|
||
.external .item.mailru { | ||
border: 1px solid #064fcd; | ||
background: linear-gradient(to bottom, #256ce7, #064fcd); | ||
color: #fff; | ||
} |
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,29 @@ | ||
import React from 'react' | ||
import styles from './AuthExternal.module.css' | ||
import { useAuth } from '../Provider' | ||
|
||
export default function AuthExternal(): React.JSX.Element { | ||
const { login } = useAuth() | ||
|
||
return ( | ||
<div className={styles.external}> | ||
<div className={styles.heading}>Or log in via:</div> | ||
<div className={styles.items} data-testid="auth-external"> | ||
<div | ||
className={styles.item + ' ' + styles.yandex} | ||
onClick={() => login({ provider: 'yandex' })} | ||
data-testid="auth-external-yandex" | ||
> | ||
Yandex | ||
</div> | ||
<div | ||
className={styles.item + ' ' + styles.mailru} | ||
onClick={() => login({ provider: 'mailru' })} | ||
data-testid="auth-external-mailru" | ||
> | ||
MailRu | ||
</div> | ||
</div> | ||
</div> | ||
) | ||
} |
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