Skip to content
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

initial POC #4

Closed
6 tasks done
avdd opened this issue Jan 6, 2023 · 5 comments · Fixed by #5
Closed
6 tasks done

initial POC #4

avdd opened this issue Jan 6, 2023 · 5 comments · Fixed by #5
Assignees

Comments

@avdd
Copy link
Owner

avdd commented Jan 6, 2023

Create initial proof of concept

  • redirect / to /home
  • serve skeleton html with inline css/js
  • serve Home component
  • serve bundle css
  • serve app js
  • success: selenium can see loaded home component

plan at #4 (comment)

@avdd avdd self-assigned this Jan 6, 2023
This was referenced Jan 7, 2023
@avdd
Copy link
Owner Author

avdd commented Jan 7, 2023

status: figuring my way around selenium and its interaction with lazy loaded JS

@avdd
Copy link
Owner Author

avdd commented Jan 7, 2023

will most likely proceed with ES modules as they can run without modification in the browser and node, and we can deal with js loading performance later.

also, what is a good approach to starting and stopping the server and browser processes per test? starting firefox is slooow

@avdd
Copy link
Owner Author

avdd commented Jan 7, 2023

OK here is the plan.

  • start server with environment SELENIUM_TEST=1
  • server sets cookie selenium-test=1
  • skeleton JS check cookie
  • if cookie missing, call StartLoading()
  • selenium test setup calls StartLoading()
  • call LoadingProgress() for each step below
  • StartLoading() adds <script> reference to app.js
  • app.js fetches app.css and adds <style>
  • app.js calls App.init()
  • App.init fetches screen/home
  • call initComponents()
  • call FinishLoading()
  • selenium test checks for presence of Home

further tweaks/refactoring:

  • start server and browser once only, and clean up between tests
  • separate the bootstrapping test above from subsequent TestCases
  • use overlay with high z-index for loading message, reveal with fade

TODO:

  • refactor JS components
  • JS testing support using node
  • generate JS component registry boilerplate
  • separate python unit/integration/functional testing
  • create TODOs for POC next steps

@avdd
Copy link
Owner Author

avdd commented Jan 8, 2023

also, what is a good approach to starting and stopping the server and browser processes per test? starting firefox is slooow

done: use class-level setup

@avdd
Copy link
Owner Author

avdd commented Jan 22, 2023

Calling this done. Further work to be chunked into issues

@avdd avdd closed this as completed in #5 Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant