README.md file has the wrong Python version causing `npm run setup` to fail.
This is happening because "setup" script in `package.json` uses python3.11 while the README tells us to install `python3.10-venv`:
```
"scripts": {
"setup": "npm ci; python3.11 -m venv cs-env; npm run deps",
```
* Reapplied all changes from #3552 to a new clone of the repo.
* Remove spurious import
* Update most screenshots.
* playwright tests working
* Ironing out details
* Some tweaks.
* Force tests to run one at a time. slow but reliable
* Scroll to the next field after the shipped milestone, so we can see the warning.
* Only allow 1 worker, to avoid shared session problems. Disable generating 'reporter' link after running tests.
* Check that a warning does show up. Re-enable testing all platforms.
* Add test of feature page, adding an origin trial stage.
* Add an optional filename parameter to the pwtests-update command
* Add test and screenshot of OT milestones error.
* Scroll OT milestone fields into view.
* Mask history, and scroll OT panels into view.
* Maybe make edit page test more reliable.
* Call testInfo.setTimeout in test.beforeEach.
* Double the total timeout for playwright ci tests to 30 minutes.
* Add another few steps to the stage tests.
* Fix syntax error
* Update docs and comments.
* Update many messages.
* Update images for tests.
* Update client-src/elements/chromedash-form-field.js
Co-authored-by: Daniel Smith <56164590+DanielRyanSmith@users.noreply.github.com>
* Fix comments.
* Update screenshots for feature summary warning
---------
Co-authored-by: Daniel Smith <56164590+DanielRyanSmith@users.noreply.github.com>
* Initial install of playwright visual tests
* Close to working.
* who knows...
* after updates
* Extend devcontainer docker compose file for playwright (#3192)
* Extend devcontainer docker compose file for playwright
Create another docker compose file for playwright.
That new one extends the existing docker compose
Should be able to run:
`npm run pwtests`
* adjust gh action
* adjust gh action
* remove volumes
* add timeout
* fix volumes
* Fix docker compose environment
* ignore stuff and volume mounting
* Attempting to login reliably
* Auto cleanups.
* Finally starting to work
* Thought it was getting better, but maybe not
* Seems reliable now
* Higher success rate
* Add test of entering feature name. Remove new feature page content test.
* Add playwright-report dir to Dockerfile.
* Comment out mkdir -p /work/playwright-report line.
* Update screenshots.
* Increasing timeout for entering feature name
* try running as user (#3248)
* try running as user
* again
* try
* change volume ownership
* tidy up
* Adjust login process to be more reliable.
* Add 5 second delay before first test runs.
* Wait longer for first login.
* Add auto-logout during login if already logged in
* Screenshot after login click
* Add testName to screenshots. Upload artifacts. Fix form method="POST".
* Add doc to README for Updating the test_html_rendering files.
* Maybe increase chance of login.
* Add a couple more delays.
* Repeat auto-logout during login until no longer logged in, before logging in again.
* Add some more delays.
* Use loginButton.click(). Add delay before after-click screenshot.
* Add console info an errors to login process.
* Capture console messages, relay to terminal.
* Capture console messages properly.
* Add some more console messages during login.
* Ignore error on jsonValue.
* Reduce most delays. Add more logs. Add top-level playwright call.
* More logging to figure out why login fails
* More logging to detect if ever logged in.
* Add more logging to each stage of testing
* Use history.replaceState before changing location.
* Use location.reload() after a timeout.
* After login, just load home page.
* Add playwright-report to artifacts.
* Turn off playwright-report during CI
* Log response after login
* Only log first response after request that should log in.
* Look for 'currentuser/permissions' request/response.
* Delay after mock_login and before reload of home page
* Comment out header and cookie logs.
* Act like logged when in DEV_MODE and login attempted.
* Fix mock mock login.
* Undo fake mock_login.
* rearrange docker (#3265)
* Updates after changes by James.
* Fix previous updates.
* Remove pwtests-shutdown from "stop" command.
* Remove pwtest from client-src/elements. (moved to packages/playwright/tests)
* update paths for run.sh
* Add pwtests-shutdown to top-level stop command.
* Remove "playwright" from ./wait-for-app.sh
* Add logging of user login status.
* add playwright_display for debugging
* add server debugging
* Remove extra "/__screenshots__" in path.
* Update the path for test-results artifacts in the playwright.yml
* add health checks
* fix action
* fix run.sh
* Add beforeAll method, disabled.
* add dsadmin
* Add top level pwtests command, not working yet.
* cleanup and undo changes
* use transactions
* always reuse server
* temp: limit the workers
* Partial cleanup. Reduce timeouts and delays a bit.
* More cleanup. Reduce timeout/delay.
* Update the correct README file. Update html rendering tests.
* Remove unnecessary changes.
* set script-shell to fix source not found and call npm run setup (#3292)
* set script-shell to fix source not found and call npm run setup
There has always been `source: not found` in the previous CI jobs
The tests previously worked because
npm run deps installs the requirements into the default environment and not the virtual environment.
And since we actually did not call `source` correctly, it was okay because
the default environment had the packages installed.
The problem started to arise because we started to call `source`
correctly in some places but not all places. This fixes by setting the
shell consistently whenever we call `source`
More info:
https://morgan.cugerone.com/blog/troubleshooting-source-not-found-when-in-the-context-of-package-json-scripts/
* do each separately
* Revert "do each separately"
This reverts commit 4fc75f7407.
* do ci job
* consistent to the right datastore mode
* verbose
* kill the emulator
* remove verbose
* Reenable Google login
* Finish reenabling Google signin button. Add margin for Firefox.
* Only show Google signin if playwright is not active
* Preserve url on login. Use default num of workers. Retry tests in CI
* Some updates after comments
* optimize docker changes
* Rename account-indicator. Shorten some delays.
* revert the workers
* Make playwright.yml push and pull_request triggers be like others.
* Use getByTestId instead of locator with data-testid.
---------
Co-authored-by: James C Scott III <jcscottiii@users.noreply.github.com>
Co-authored-by: James Scott <jamescscott@google.com>
* Add OT API key variable to settings
* fix type hint
* Update settings.py
Co-authored-by: James C Scott III <jcscottiii@users.noreply.github.com>
* fix quotes
* Move api key function to secrets file
* Add key generation command and doc explanation
* remove OT_API_KEY from settings
* update global var
* Save API key in var to remove need to re-obtain
* logging change
---------
Co-authored-by: James C Scott III <jcscottiii@users.noreply.github.com>
* Add OpenAPI documentation
Changes:
- README.md - Update mention that java is needed both the Datastore emulator (existing dependency) and now openapi-generator-cli
- developer-documentation.md - Add section about adding a new API with example
- openapi-documentation.md - Add documentation about openapi. Maintenance expectations. Explanation of each additional property.
* address feedback from @jrobbins
* remove format field
* update docs with modular openapi files
* simplify paths file ref
* Update developer-documentation.md
* Remove redundant components
* Migrate from node 12 to node 18
* update all packages from npm outdated
* next round of updates
* fix most vulnerabilities
* remaining vulnerabilites
* remove unused dependencies
This has happened twice to me now where I have set up the dev environment as described, but I did not update my GCloud CLI component. Running `npm start` suppresses the error message that states to update the component before continuing, and an unrelated error will appear. This PR adds this corner case to the README notes just in case it is a problem for anyone else.
* Progress
* Send and receive emails in py3 using GAE legacy libraries.
* No need to run py2 unit tests when there are none
* Addressed review comments.
Removed the dynamic lighthouse image from README.md because the app that it relied on is not working and the test that it was doing is no longer relevant since we simplified this app.
* Avoid needing to run py2 on workstations.
* Use gunicorn instead of dev_appserver
* Add comment to explain that dev-default.yaml is not currently used.
* Use venv pip to install py3 deps.
* Auto-activate and stop referencing lib/.
* Make gunicorn use libs in cs-env.
In this CL:
* Set up a test directory for python unit tests
* Add a script to package.json to make 'nom run test' run the python scripts and document that in README.md
* Add the mock library for python mock objects
* Implement a few simple unit tests, including one that uses mock
* Add a test/testing_config.py file that finds the needed GAE libraries and adds them to the python system path so that they can be imported in code that is being tested
* Hack on the travis config to get it to install gcloud with python libraries without running out of disk space, and make it run the tests