Skip to content

Commit

Permalink
Add parent file export smoke tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Jan 3, 2024
1 parent 4f264de commit 808b139
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/playwright/playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@
- the db must be reset to the baseline with demo stories
- site must be running (currently hardcoded to port 5000)
- start code gen in another window with `python codegen`,
then go to http://localhost:5000/ in the new window
- click through etc etc, then stop the code gen, copy-paste
code here, fix as needed, _then_ shut down
More notes:
This is _just a smoke test_, it doesn't do any assertions.
The actions were _recorded_ using playwright's supertastic
code generation. https://playwright.dev/docs/codegen
code generation. https://playwright.dev/python/docs/codegen
Then I added some tweaks:
Expand Down Expand Up @@ -111,6 +115,14 @@ def _print(s):
page.get_by_role("link", name="Sentences").click()
page.get_by_role("link", name="Back to list").click()

_print("Export parent term mapping files.")
page.locator("#menu_terms").hover()
page.get_by_role("link", name="Parent Term mapping").click()
with page.expect_download() as _:
page.get_by_role("link", name="Tutorial", exact=True).click()
with page.expect_download() as _:
page.get_by_role("link", name="English").click()

# Edit language.
_print("Edit language.")
page.locator("#menu_settings").hover()
Expand Down

0 comments on commit 808b139

Please sign in to comment.