-
Notifications
You must be signed in to change notification settings - Fork 25
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
14 changed files
with
68 additions
and
53 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 |
---|---|---|
@@ -1,12 +1,15 @@ | ||
import { TEST_BASE_URL } from "../../support/e2e"; | ||
context("Choosing from different source control soptions", () => { | ||
beforeEach(() => { | ||
window.localStorage.clear(); | ||
window.localStorage.setItem("authId", Cypress.env("OAUTH_E2E_AUTH_ID")); | ||
window.localStorage.setItem("user", Cypress.env("USER")); | ||
cy.visit(TEST_BASE_URL); | ||
}) | ||
|
||
it('Different source control options should be visible', () => { | ||
cy.visit("http://localhost:8000/adr-manager/#/"); | ||
cy.get("[data-cy=disconnect]").click(); | ||
cy.get("[data-cy=disconnect]").click() | ||
cy.get("[data-cy=connectToGithub]").click(); | ||
cy.get("[data-cy=loadOptions]").should('exist'); | ||
}); | ||
it('Clicking should open oauth window', () => { | ||
cy.get("[data-cy=signInWithGithubFree]").click() | ||
|
||
}) | ||
}) |
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
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
4 changes: 2 additions & 2 deletions
4
src/components/sourceControlOptions/github/SignInWithGithubFree.vue
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
21 changes: 21 additions & 0 deletions
21
src/components/sourceControlOptions/gitlab/signInWithGitlab.js
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,21 @@ | ||
import { getAuth, signInWithPopup, OAuthProvider } from "firebase/auth"; | ||
|
||
export function signInWithGitlab() { | ||
|
||
const auth = getAuth(); | ||
const provider = new OAuthProvider('oidc.test-adr'); | ||
provider.addScope("read_user"); | ||
return signInWithPopup(auth, provider) | ||
.then((result) => { | ||
const credential = OAuthProvider.credentialFromResult(result); | ||
const token = credential.accessToken; | ||
debugger; | ||
const user = result.user; | ||
return { token, user }; | ||
}) | ||
.catch((error) => { | ||
console.error("SignIn Error", error); | ||
throw error; | ||
}); | ||
|
||
} |
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
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