* Remove the query builder and add a query help dialog.
* Update client-src/elements/chromedash-search-help-dialog.js
Co-authored-by: Kyle Ju <kyleju@google.com>
* Update client-src/elements/chromedash-search-help-dialog.js
Co-authored-by: Kyle Ju <kyleju@google.com>
* Clarified argument name
---------
Co-authored-by: Kyle Ju <kyleju@google.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 _validate_url to save http_error_code
* Add real server http code to LinkHelperTest
* Fix type checking
* Display http_error_code
* Add link icon for feature link
* Show full markdown title in tooltip
* Upgrade feature-table icons to shoelace.
* Update client-src/elements/chromedash-feature-table.js
Co-authored-by: Kyle Ju <kyleju@google.com>
* Use material icons instead of bootstrap icons.
Co-authored-by: Kyle Ju <kyleju@google.com>
* Remove inline_file. Use external links for js/css
Refer to #2326 fo reasoning
Changes in this commit:
- Remove inline_file function
- For js: use script src=""
- Due to this change, there were some minor tweaks:
- change from VIEWS to global window.VIEWS in feature-page.js and features.html. This is so the external loaded feature-page.js can access the data loaded via templates. Before it was all inlined.
- For css: use link rel="stylesheet" href=""
- Add helper function "get_static_path" to get the path to the static folder
Part 1 of 2 to fix#2326
* Create helper function to avoid using global window
Create loadFeatureLegendViews to avoid having to change window.VIEWS
* Add version query parameter
* remove redundant get_static_path
* revert this change.
will fix this in the bigger testing PR when I will move the get_template_path function to the testing config.
It is not needed for the actual app. only needed for the unit tests
* Add cc field to features
Closes#2240. Similar implementation as editors.
Users who are cc'd on features can see unlisted features.
internals/core_models.py:
- Add new cc_recipients field. Defaults to empty list if field is not there.
internals/notifier.py
- Adds reason for being notified as a person in the cc_recipients field
internals/search.py
- Add the shorthand query for `cc:me`
internals/search_queries.py
- Add the ability to search the cc_recipients field by adding it to QUERIABLE_FIELDS
static/elements/chromedash-guide-metadata.js
- Add the ability to view the value on the metadata display
- Maps cc_recipients to individual mailto links ccRecipient
- Note: ccRecipient is camelCase
static/elements/form-field-specs.js
- Declare a new form field cc_recipients
static/elements/form-definition.js
- Add the cc_recipients field to the metadata form field
* cc_recipients changes to persist on create/update
These changes allow changes to cc_recipients to persist on feature
create or update
* Check if cc_recipients empty
cc_recipients can be missing from the object due to del_none
in core_models.py
Also fomat_for_template currently returns cc_recipients at a different level
and not inside the chrome object. As a result, need to change
the chromedash-guide-metadata file to look for the data at the right place.
* Use short hand CC instead of carbon copy
* Remove "remove spinner" code for SPA pages
* Share user data among multiple SPA pages
* minor changes for some unit tests
* Remove more TODOs
* Don't pass user object to the edit page
* Add location.reload() if no permission
* Migrate guide/stage page forms to JS
* Complete migration of forms to JS
* Move display field defs to JS and remove fielddefs API
* Fix line separation bug
* Filter out `['']` values due to the anticipated spec change field change
* Fix typo
* Change anticipated_spec_changes to regular textarea