Граф коммитов

83 Коммитов

Автор SHA1 Сообщение Дата
Jeffrey Yasskin 89df006edb
Flatten the playwright workspace down into the root package.json. (#4082)
This removes the need to pass `--workspace playwright` and avoids a
name collision with the npm "playwright" package.
2024-07-09 13:16:43 -07:00
Kshitij Rajgude 64c2b528cd
Update README.md (#3670)
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", 
```
2024-03-05 16:13:52 -08:00
Daniel LaLiberte d8ac1b99c8
Fix semantic checks of milestones to get field values from form or appropriate stages (#3583)
* 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>
2024-01-29 13:39:12 -05:00
Daniel LaLiberte e4f971b382
Add test of entering a blink_component name (#3349)
* Add test to enter blink component

* Update the README a bit.

* Change name of test, update images.

* Delete commented out code.
2023-09-19 21:23:44 -04:00
Jason Robbins 404a3ae89b
Fix playwright command examples. (#3312) 2023-09-08 11:08:34 -04:00
Daniel LaLiberte 0baad0b731
Dlaliberte playwright 06 22 (#3184)
* 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>
2023-09-06 15:35:06 -04:00
Daniel Smith a8f4155068
Add origin trials API key variable to server settings (#3213)
* 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>
2023-07-31 15:14:14 -07:00
James C Scott III 6b6aad1998
Add OpenAPI documentation [1/5] (#2769)
* 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
2023-03-24 17:23:02 -04:00
Kyle Ju 7553d5eec2
Use 3.10 in start-server (#2527)
Co-authored-by: Kyle Ju <kyleju@chromium.org>
2022-11-30 12:46:58 -08:00
James C Scott III d942cb0ccf
Node v18. Upgrade frontend dependencies and resolve vulns (#2380)
* 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
2022-10-25 10:12:23 -04:00
James C Scott III d47b4b8eeb
Add devcontainer configuration (#2266)
* Start of the devcontainer

* Clean up

* fix links

* fix vscode link
2022-09-26 08:51:04 -04:00
Jason Robbins e892ee8dec
Add gcloud component commands to README.md (#2102) 2022-08-11 18:26:32 -07:00
Jason Robbins 2f236fc745
Speed up deployments by separating rc targets. (#2046) 2022-07-19 10:36:05 -07:00
Daniel Smith c730fca07a
Update README.md (#1999)
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.
2022-07-07 12:43:46 -07:00
Jason Robbins 8a9f86ef5e
Simply local setup steps. (#1987) 2022-06-30 17:45:02 -07:00
Jason Robbins 8dfd413c46
Be explicit about using python3.9. (#1983) 2022-06-28 08:12:44 -07:00
Jason Robbins 94e0bd5352
Eliminate unneeded env_vars.yaml. (#1957) 2022-06-21 11:11:05 -07:00
Jason Robbins df4aec4cf2
Send and receive emails in py3 using GAE legacy libraries (#1923)
* 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.
2022-06-10 14:56:40 -07:00
Jason Robbins f3bf744ba5
Added a brief mission and link to launch process docs. 2022-03-22 18:39:28 -07:00
Jason Robbins 8fc1070f35
Update README.md
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.
2022-03-22 10:12:21 -07:00
Jason Robbins 9b420b811b
Updated developer docs (#1798) 2022-03-18 16:43:25 -07:00
Jason Robbins f29a2ff916
Avoid needing to run py2 on workstations. (#1734)
* 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.
2022-02-15 13:31:27 -08:00
Kyle Ju 0ec21c50d1
Update installation instructions (#1711)
* Update installation instructions

Update installation instructions
 - Specific the directories 
 - Use an older node version
 - install pip for python 2
 - Use python2 to install `requirements.dev.txt`

* Update README.md

* Update README.md

* Update package.json

* Update README.md

* Bump to node 12

* Add sudo

* Update ci.yml
2022-02-02 14:51:37 -08:00
Jason Robbins 18210d537d
Update setup instructions. (#1548)
* Update setup instructions.

* Update README.md

Co-authored-by: Kyle Ju <kyleju@google.com>

Co-authored-by: Kyle Ju <kyleju@google.com>
2021-09-22 11:00:11 -07:00
Jason Robbins b275a625ae
Use a single npm target to run unit tests (#1430)
* Combine test steps into one npm script.

* Update README

* Return the test run exit status as the overall exit status
2021-07-21 15:36:48 -07:00
Jason Robbins c99738bf0f
Don't set DATASTORE_EMULATOR_HOST on GAE (#1403) 2021-07-09 12:38:30 -07:00
Shivam Agarwal fd6018bd3d
20210618 gae ndb to cloud ndb (#1365)
* Added Cloud NDB to requirements

* google-cloud-core 1.7.0 requires google-auth<2.0dev,>=1.24.0, but you'll have google-auth 1.20.1 which is incompatible.

* Running DataStore Emulator on port 15606 and setting environment variable for the same

* Replaced GAE NDB imports with Cloud NDB imports

* Solved Error: No Context for Ramcache

* Solved No NDB Context Error for Cloud NDB

* Fixed Error No object QueryOptions

* Removed clear_datstore flag

* Fixed to_dict() method

* Added explicit call to method for stashing values while editing a feature

* Using Cloud NDB in testbed

* Updated README with JRE instructions and setting the DJANGO_SETTTINGS_MODULE environment variable for django.setup

* Added Env Variable for datastore emulator

* Migrated accounts_api_test.py

* Migrated approvals_api_test.py

* Migrated Comments.py and Cues_api_test.py

* Migrated Features.py

* Migrated metricsdata_test.py

* Migrated stars_api_test.py

* Fixed Deprecation warning for query options

* Migrated token_refresh_api_test.py

* Migrated basehandlers_test.py

* Migrated permissions_test.py

* Migrated ramcache_test.py

* Migrated secrets_test.py

* Migrated xsrf_test.py

* Migrated fetchmetrics_test.py

* Migrated models_test.py

* Migrated notifier_test.py

* Migrated processes_test.py

* Migrated featuredetail_test.py

* Migrated featurelist_test.py

* Migrated guide_test.py

* Migrated intentpreview_test.py

* Migrated samples_test.py

* Removed some unused stubs

* Set the consistency of datastore emulator to be 1

* Resetting the database emulator before running the tests

* Added npm targets for starting and stopping emulator

* Updated README and Developer Docs

* Removed unused imports

* Made NDB calls DRY
2021-06-28 19:05:04 -07:00
Kyle Ju 515e1bb6a6 Update README 2021-06-02 17:59:55 -07:00
Shivam Agarwal 072e92d4b2
Updated ReadMe with solutions to installation problems and creating an admin user (#1339)
* Updated ReadMe with solution to installation problem that may occur

* Updated Developer Documentation with instructions for creating an Admin User
2021-05-28 15:00:52 -07:00
Jason Robbins d6cbfe835f
Fix and simplify project installation. (#1335) 2021-05-26 11:07:04 -07:00
Jason Robbins 10058da34c
Add separate prod client_id and registered release candidate URLs. (#1313) 2021-05-07 14:03:08 -07:00
Jason Robbins fd4875a95f
Stop hitting prod when testing locally. (#1292) 2021-04-28 15:17:39 -07:00
Jason Robbins b495597a77
Work around crumbling python2 support. (#1263) 2021-04-12 18:18:29 -07:00
Jason Robbins 9a0019035d Update README to avoid frustrated GSOC students. 2021-03-16 19:17:55 -04:00
Jason Robbins 8d5af789ab
Update README.md
Added note about jinja2.tests problem that new developers are hitting.
2021-03-15 18:26:43 -07:00
Jason Robbins 28840790b5 Remove unneeded firebase environment variables 2021-02-24 16:31:01 -05:00
Jason Robbins 9cb625cf1a Updated obsolete info in README.md 2021-02-24 16:16:30 -05:00
Jason Robbins 41f68437bd
Set up unit tests locally and in travis. (#734)
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
2020-01-30 10:57:22 -08:00
Jason Robbins 9466f5cb58 merged from master to dev to resolve conflicts. 2020-01-13 18:36:01 -05:00
Yangguang a448e6f9bf Using rollup for components (#679)
* Import lit-virtualizer

* misc

* Add rollup and add it to gulp task

* Update gulp

* Downgrade paper-toggle-button to input checkbox

* Include all css to lit-elements

* Add rollup minify. Remove unused packages.

* Fix code review feedback

* Fixes based on code review.

* Remove two unnecessary .call(this, ...)

* Bind _onFeatureToggled (used inside lit-virtualizer) in the constructor

* Add lit-analyzer

* Update lit-analyzer script
2019-11-11 14:32:32 -08:00
Johnny Stenback c79240c32a Update django to 1.11 (LTS). #668
This updates django to the latest LTS version (1.11), and bumps the gulp
version while we're at it.
2019-08-14 11:59:14 -07:00
Yangguang Li 07fd72e47a Update lint fix 2019-07-01 14:28:54 -07:00
Yangguang Li 3f3c580707 Add fix lint 2019-06-27 13:52:25 -07:00
Yangguang Li 7437677a9b Rename pages 2019-06-25 11:16:06 -07:00
Johnny Stenback 27636b25c4
Add note to migrate traffic to both the default and notifier services.
Expand on the deployment instructions a bit to clarify that cr-status contains two services, 'default' and 'notifier'.
2019-06-14 13:20:27 -07:00
Yangguang Li 830872e4ff Add gulp watch 2019-05-22 11:51:38 -07:00
Yangguang Li 7196301568 WIP 2019-05-22 11:13:09 -07:00
Joe Medley 5e8b3d7274
Update README.md 2019-03-01 13:01:21 -08:00
Joe Medley edc0a2ec4e Clarify deployment instructions. (#593) 2019-02-27 13:10:52 -08:00
Eric Bidelman ca2ef3aa9f
readme: add note about blink components 2019-02-11 16:07:34 -08:00