Skip to content

Add the ability to test web apps#1285

Closed
freakboy3742 wants to merge 10 commits intobeeware:mainfrom
freakboy3742:web-test
Closed

Add the ability to test web apps#1285
freakboy3742 wants to merge 10 commits intobeeware:mainfrom
freakboy3742:web-test

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

@freakboy3742 freakboy3742 mentioned this pull request Apr 22, 2025
4 tasks
@freakboy3742 freakboy3742 deleted the web-test branch June 15, 2025 22:31
@freakboy3742 freakboy3742 restored the web-test branch June 15, 2025 22:31
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