Skip to content
This repository was archived by the owner on Jun 18, 2024. It is now read-only.

alanmih #5

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

alanmih #5

wants to merge 49 commits into from

Conversation

alanmih
Copy link

@alanmih alanmih commented Sep 6, 2022

Questionnaire

  • Where did you find the job? -> LinkedIn / Indeed / Kyujin Box / Referral
    -> Linkedin

  • Have you applied on the site above? -> Yes / No
    -> Applied through LinkedIn

Agreement

  • I did not ask anyone for help to solve the problem.
  • I did not refer any other forks or pull requests of this repository.
  • I would make my fork private if requested after screening.

@hasundue
Copy link
Member

hasundue commented Sep 7, 2022

Thank you for submission!

The CI has been failed, which means you have not meet the requirements of the test, unfortunately.
So figure out what's going on here first!

@alanmih
Copy link
Author

alanmih commented Sep 7, 2022

Thank you for submission!

The CI has been failed, which means you have not meet the requirements of the test, unfortunately. So figure out what's going on here first!

Got it, will investigate and modify the yml files to make it work

@alanmih
Copy link
Author

alanmih commented Sep 7, 2022

Hi @hasundue -san,
I checked the logs and found that ci.yml will fail on "deno task test --quiet" due to the error for navigating to page "http://localhost:8000/". So I tried adding "deno task dev" before that and it seems working.

However, it will keep GitHub Actions running forever and stop at "Listening on http://localhost:8000/", which has no errors and nor get to the next step for executing the test -> Would like to know if you have any suggestions on this part?

I think I got stuck as the test description says "without modifying or removing any lines in the original code." it's appreciated if you can give me more hints

@hasundue
Copy link
Member

hasundue commented Sep 7, 2022

Hello @alanmih san,

I appreciate your hard work and a question.

I checked the logs and found that ci.yml will fail on "deno task test --quiet" due to the error for navigating to page "http://localhost:8000/".

Yes, this is one of the problems we expect you to resolve.

However, it will keep GitHub Actions running forever and stop at "Listening on http://localhost:8000/", which has no errors and nor get to the next step for executing the test -> Would like to know if you have any suggestions on this part?

deno task dev is a command to launch the app server for development.
It never terminates without an user input.

@alanmih
Copy link
Author

alanmih commented Sep 7, 2022

Hi @hasundue -san,
I solved the above issue by adding "&" at the end of the command so it should be fine now.

But when running test.ts I still got the below 4 failed test cases out of 5, which seems not possible to resolve without modifying the source codes in main.tsx and would like to know if it's your expected result?
https://github.com/alanmih/ac-test-alan02/runs/8228329274?check_suite_focus=true

  • click the logo ... ok (6s)

  • input is empty ... FAILED (18ms)
    error: Error: The selector "input" does not exist inside the DOM

  • error is not shown ... FAILED (8ms)
    error: InvalidStateError: readyState not OPEN

  • show error for an empty input ... FAILED (5ms)
    error: InvalidStateError: readyState not OPEN

  • input a random string and click the button ... FAILED (4ms)
    error: InvalidStateError: readyState not OPEN

@hasundue
Copy link
Member

hasundue commented Sep 7, 2022

Great!

Yes, this is the expected result.
The problem does not prohibit you from add or insert lines to the code.

@alanmih
Copy link
Author

alanmih commented Sep 10, 2022

Hi @hasundue -san,
I implemented the search feature based on your test cases in test.ts, but still can't pass the last 2 test cases because of the below reason.

  • page wouldn't be able to be redirected by clicking the button from line 55 of test.ts

However, it works perfectly fine when testing it manually on the browser as the below screenshot shows, still trying to figure out why "await button.click({ waitFor: "navigation" });" in line 55 can't be working as the same codes in line 41, appreciated if you could share any hint and would like to know if it's part of your expected result?
Screen Shot 2022-09-10 at 16 11 30
Screen Shot 2022-09-10 at 16 11 43

@alanmih
Copy link
Author

alanmih commented Sep 11, 2022

Hi @hasundue -san,
I found the solution to fixing the above-mentioned issue by using "document.getElementById("input").value" instead of "(e) => setValue(e.target.value)", seems sometimes old-style codes works with less potential issues : )

Now all test cases in test.ts passed both in my local environment and GitHub Actions (refers to https://github.com/alanmih/ac-test-alan02/runs/8291613518?check_suite_focus=true ) as the below screenshots shows, and it also worked well when I tested manually.

Screen Shot 2022-09-11 at 19 40 13

Screen Shot 2022-09-11 at 19 44 58

Suppose I already finished the test, though it takes a little bit longer than I initially expected, please feel free to let me know if you have any feedback, and am looking forward to hearing back from you soon!

@alanmih alanmih changed the title Add alanci.yml as the test requested Implemented the job search feature based on the biz logics in test.ts and pass all its unit tests Sep 12, 2022
@hasundue
Copy link
Member

Great!
Appreciate your hard work!
Give me some time to review it.

@hasundue hasundue changed the title Implemented the job search feature based on the biz logics in test.ts and pass all its unit tests alanmih Sep 12, 2022
@hasundue
Copy link
Member

Renamed the title of this PR for our convenience.

@hasundue
Copy link
Member

Looks like an issue is caused by a major update on Deno.
I updated the original branch to fix the version of Deno.
Could you rebase your branch to reflect the change?

@alanmih
Copy link
Author

alanmih commented Sep 12, 2022

Hi @hasundue -san,
I rebased my branch to yours which included the Deno ver. change to 1.24.3 in ci.yml, which also passed all test cases
-> https://github.com/alanmih/ac-test-alan02/runs/8304419783?check_suite_focus=true

@hasundue
Copy link
Member

ALL GREEN 😄
Congratrations!

Again, appriciate your hard work!
Hope you learned something through this test.

Let me arrange the final interview for you.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants