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

Add basic tests for HTML interface for editing notices #44

Closed
7 tasks done
cryptix opened this issue Feb 26, 2021 · 3 comments · Fixed by #64
Closed
7 tasks done

Add basic tests for HTML interface for editing notices #44

cryptix opened this issue Feb 26, 2021 · 3 comments · Fixed by #64
Assignees
Labels
Go golang related stuff Testing everything that's testing related

Comments

@cryptix
Copy link
Member

cryptix commented Feb 26, 2021

We should nail down the endpoints and query parameters of them.

The admin test suite for allow-list should give a good idea how this can be done. https://github.com/ssb-ngi-pointer/go-ssb-room/blob/f774817536669c4f2ce2fe356a172d047ef5e780/web/handlers/admin/allow_list_test.go#L109

Check that

  • admidb/sqlite: the default notices are present (/notice?id=x for different x's)
  • web/handlers: the edit buttons show for logged in admins
  • web/handlers/admin: the edit form includes all the needed fields, for input=hidden and input=text
    • for add translation (new)
    • for edit (existing)
  • web/handlers/admin: the save handlers refuse incomplete requests (all the params included)
  • web/handlers/admin: make sure the save handler calls the mockdb (CallCount and CallArgs)
@cryptix cryptix mentioned this issue Mar 1, 2021
7 tasks
@cblgh
Copy link
Contributor

cblgh commented Mar 4, 2021

preemptively assigning myself to #44 & #46

will see which one i feel i can get more traction on :^)

@cblgh cblgh self-assigned this Mar 4, 2021
@cblgh
Copy link
Contributor

cblgh commented Mar 8, 2021

@cryptix

the edit form includes all the needed fields, for input=hidden and input=text

Would you mind briefly & explicitly enumerating the needed fields/expected forms? Not really familiar with what's supposed to be included or not atm :)

content
language 
title
id (the only hidden one)

@cryptix cryptix added Go golang related stuff Testing everything that's testing related labels Mar 11, 2021
@cblgh
Copy link
Contributor

cblgh commented Mar 16, 2021

i'm... done? the onboarding is COMPLETE? hit me up with that review @cryptix lemme know where i have been lacking or misunderstood things

@cblgh cblgh closed this as completed in #64 Mar 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Go golang related stuff Testing everything that's testing related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants