-
Notifications
You must be signed in to change notification settings - Fork 11
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
#github-username #743
base: main
Are you sure you want to change the base?
#github-username #743
Conversation
…rty, create lit task, handle error after fetching
Hey @krafcik02 I haven't forgotten about this. I am just doing a little bit of research. We may be able to do this without calling the GitHub API. I see there's a method called getAdditionalUserInfo [1][2]. You will need to change the signature of signIn to return a Promise instead of Promise by chaining the call from signInWithPopup to get additional info. If you want to take a look, go ahead. But otherwise, I should get to this some time this week |
Hello @jcscottiii, thank you for response. Let me know the future steps you would like to do with implementation :). |
if (user !== null) { | ||
this.user = | ||
user !== null ? {...user, gitHubUsername: 'empty'} : undefined; | ||
this._loadingGithubUsername = new Task(this, { |
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.
We will continue to make a request for the information. However, we should:
- use octokit. This should simplify the retry logic since the client handles it automatically.
- Try to do it without the Task. We actually shouldn't need it. That should make this a lot simpler too.
For step 1: run cd frontend && npm install octokit
@krafcik02 I left a comment with some more details |
can you rebase your changes? There are some conflicts of two files in your branch vs the main branch. |
Also for testing, there are two types of tests:
Let's talk about the playwright tests first. In the login test file, you will want to intercept the your call to the authenticated user api to supply your own data. Here's an example calling it for another Github API. You can also assert what happens when the api calls fails by creating a separate test case in that file but have it return a 500 error. Ideally, there should be a toast that comes up. The toast should be triggered from the UI component (the login) and not this firebase auth service. So you will probably need to change FirebaseUser to also have an optional error too. |
Also I would like to know more about the DevOps tools and services that the project use in production and in development. I just know that for development we use web Dev Containers extension that allows you to open the project in docker and then the whole app is launched via make start-local command that starts the app in docker. Could you provide some informations ? |
I recently talked about this :) Feel free to take a look. https://youtu.be/pY29akiiw2U?feature=shared&t=802 |
I found your guide for running test. I will try and let you know. :) And thank you for provided link to video. |
Also, if you run |
I have tried to run "make playwright-test" command from https://github.com/GoogleChrome/webstatus.dev/blob/main/docs/testing.md but i ran into this error: `kubectl wait --for=condition=ready --timeout=300s pod/spanner error: lost connection to pod It got stuck here. |
Hi @jcscottiii, I have edited the test. Where can I see the code coverage for this project? I need this information for my university exam. :) |
You can see the coverage when running GoWe have many Go modules in this repository. For each module: check the line that has TypescriptThis is simpler. At the end of the command, it will print a single coverage amount. SummaryFeel free to check the logs in the run. Example |
Maybe you could help again. I run the project in dev containers, run make start-local , then make port-forward-manual in second consol. Then make playwright update snapshots because tests with screenshots were not passing. In console where I ran make start local the datastore is sucesfully created. But I still get this error even after re-launching a few-times and waiting every time at least for 5 minutes. Could you try to test it in my branch ? I do not know what I am doing wrong. kubectl wait --for=condition=ready --timeout=300s pod/spanner error: lost connection to pod |
I haven't had the chance to check out your branch yet. But, is this still happening? It looks like it lost the connection to the pod. You may also want to run "kubectl describe pods" if it happens again |
Okay, I will try out next time, I will get to that :), thanks. |
Hello James, I am still not able to update screenshots for tests. Would you mind trying to checkout my branch and test it? If so please provide steps to reproduce. :) |
Also i wanted to check code coverage for frontend unit test using npm run test, I have updated my fork of this project, clone it and ran in devContainer in VScode. Then i got into frontend directory and ran npm i and the command (npm run test), but got this error.
error TS5083: Cannot read file '/workspaces/webstatus.dev/node_modules/gts/tsconfig-google.json'. src/static/js/api/client.ts:23:43 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 23 import {type components, type paths} from 'webstatus.dev-backend'; src/static/js/components/test/webstatus-overview-cells.test.ts:30:26 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 30 import {components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-feature-page.ts:30:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 30 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-cells.ts:17:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 17 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-content.ts:20:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 20 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-filters.ts:20:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 20 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-page.ts:21:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 21 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-table.ts:22:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 22 import {type components} from 'webstatus.dev-backend'; src/static/js/components/webstatus-overview-table.ts:157:42 - error TS7006: Parameter 'f' implicitly has an 'any' type. 157 ${this.taskTracker.data?.data?.map(f => src/static/js/utils/test/urls.test.ts:18:31 - error TS2307: Cannot find module 'webstatus.dev-backend' or its corresponding type declarations. 18 import {type components} from 'webstatus.dev-backend'; Found 11 errors in 9 files. Errors Files |
Can you try |
Also, could you rebase/update your branch? |
-create internal User type with github username property,
-create lit task,
-handle error after fetching,
Tests were not implemented, I need your help/ guidance for this part of task. :)