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 the ability to test web apps #1285

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

freakboy3742
Copy link
Member

@freakboy3742 freakboy3742 commented May 22, 2023

NOTE: This isn't ready for review; I'm posting it to avoid potential duplicated effort

Adds support for test mode on web apps.

Uses Playwright to generate an inspectable web session. Playwright includes a binary dependency that isn't currently available on Python 3.12.

Removes the need for a web project to specify a style backend. It is now possible for a Python package to specify "inserts" that will be injected into the static web page. The existing support for aggregating CSS content has been migrated to this new "inserts" system. This means that index.html is re-written on build, replacing the inserted content.

This code is currently able to run the default pytest project generated by Briefcase. However, it can't run the Toga testbed app; see the Toga PR for the reasons.

Fixes #1166.

Refs beeware/briefcase-web-static-template#9
Refs beeware/toga#1945

PR Checklist:

  • All new features have been tested
  • All new features have been documented
  • I have read the CONTRIBUTING.md file
  • I will abide by the code of conduct

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 this pull request may close these issues.

Add a test mode for the web backend
1 participant