-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added complete oauth #160
added complete oauth #160
Conversation
Thank you, @Moneexa ! I had a brief first look and this seems very promising and close to mergeable. A few things I noticed:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! I had another look and made more detailed comments on certain lines. In general, this has improved, but there is also still a lot of commented code and style guide violations (e.g., single quotes instead of double quotes, missing semicolons, etc.).
|
||
cy.intercept("GET", "**/user/repos**").as("getRepos"); | ||
// cy.intercept("GET", "**/user/repos**").as("getRepos"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out? If it is not needed, please delete it.
cy.get("[data-cy=addRepo]").click(); | ||
cy.wait("@getRepos").its("response.statusCode").should("eq", 200); | ||
cy.get("[data-cy=listRepo]").contains("ADR-Manager").click(); | ||
cy.get("[data-cy=addRepoDialog]").click(); | ||
cy.intercept("GET", "**/repos**").as("showRepos"); | ||
// cy.intercept('POST', 'https://api.github.com/graphql').as("showRepos"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
@@ -30,7 +34,8 @@ context("Deleting an ADR from a repo", () => { | |||
const addedRepos = JSON.parse(localStorage.getItem("addedRepositories")); | |||
expect(addedRepos[0].adrs.length).to.eq(adrCount - 1); | |||
expect(addedRepos[0].deletedAdrs.length).to.eq(1); | |||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
cy.visit(TEST_BASE_URL); | ||
|
||
// add ADR Manager repo | ||
cy.intercept("GET", "**/user/repos**").as("getRepos"); | ||
// cy.intercept("GET", "**/user/repos**").as("getRepos"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
// cy.wait("@getCommitSha"); | ||
// cy.wait("@commitRequest") | ||
|
||
// .then((val) => { | ||
// cy.log(val.request); | ||
// for (let item in val.request) { | ||
// cy.log(item); | ||
// } | ||
// cy.log(val.request.body.author); | ||
// }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about this part? Was this only for debugging? If it is generally useful for this test, then it probably should not be commented out. If it is not needed, then delete it.
src/plugins/api.js
Outdated
searchResults.push(repo); | ||
} | ||
}); | ||
console.log("#### search results ####", searchResults) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this really needed? Looks like temporary logging for debugging.
tests/constants.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file is just too excessively long with so much test data. I would reduce this, as it doesn't add much value after a certain length, but makes everything less maintainable and efficient.
@@ -7,18 +7,360 @@ global.localStorage = { | |||
return "abc...."; | |||
} | |||
}; | |||
console.log("###### print local storage #######", localStorage.getItem("authId")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still needed?
|
||
test("Test Searching Repos with list in parameter. Searching for " + searchTerm, async () => { | ||
console.log(localStorage.getItem("authId")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed?
"data": { | ||
"user": { | ||
"repositories": { | ||
"nodes": [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are probably also too many entries. I would reduce this as well to keep it manageable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment: if host
is changed to localhost
instead of 127.0.0.1
in vite.config.js
, we prevent the problem with the 401
if someone follows the displayed link from vite
after starting the project.
package.json
Outdated
@@ -17,6 +17,7 @@ | |||
"antlr4": "^4.13.0", | |||
"axios": "^1.4.0", | |||
"core-js": "^3.31.1", | |||
"firebase": "^10.7.0", | |||
"marked": "^5.1.1", | |||
"pizzly-js": "^0.2.8", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't Pizzly be gone by now?
No description provided.