Commit Graph
30 Commits
Author SHA1 Message Date
Benedikt Meurer e24f0a20e7 [GM3Restyling] Update soft context menu.
This updates the soft context menu according to the design spec,
specifically for the instances on the main UI and the Sources
panel.

1. Use the correct right arrow icon for submenus.
2. Use the correct spacing consistently.
3. Use the correct colors.

Bug: 330213829
Screenshot: https://i.imgur.com/aUBCU8Z.png
Change-Id: I8facf9c1af4c7278d21041d3eee85d8768e28454
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5471945
Auto-Submit: Benedikt Meurer <bmeurer@chromium.org>
Reviewed-by: Peter Müller <petermueller@chromium.org>
Commit-Queue: Peter Müller <petermueller@chromium.org>
2024-04-23 13:39:27 +00:00
Jack Franklin 7a93aec83e Ensure data-grid has height before running tests
Bug: 1502498
Change-Id: I68aaad8e92265a9de8e256c4536d4f336e59d13a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5039492
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2023-11-17 13:39:10 +00:00
Philip Pfaffe c52bf5178f [Gardening] disable data grid controller test
Bug: 1502498
Change-Id: I4c08b7324b0f28d79d729fa82ddfac47a3c09557
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5033658
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2023-11-15 14:38:45 +00:00
Philip Pfaffe 1de345f248 [Gardening] deflake data_grid_controller_test
Bug: none
Change-Id: Ibba1cdde5057fad332b40f4ce14f8bbe3e96d51d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/5029483
Commit-Queue: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Philip Pfaffe <pfaffe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2023-11-15 09:47:58 +00:00
Jack Franklin 0708be942a Re-enable data_grid_controller test
This was disabled a long time ago, but the failure was in the afterEach
step, and does not seem to be specific to this test. Therefore I am
re-enabling it to see if it is passing now or still flakey.

Fixed: 1463394
Change-Id: I1c5734dcd9b61c0379540c4612556c4b22ead94d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4765268
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Ergün Erdoğmuş <ergunsh@chromium.org>
2023-08-09 13:35:46 +00:00
Jack Franklin 3a55f20c6b Re-enable data grid controller tests
The error that initially caused these tests to be disabled was:

```
  ProtocolError: Protocol error (Runtime.evaluate): Promise was collected
      at new Callback (node_modules/puppeteer-core/src/common/Connection.ts:66:12)
      at CallbackRegistry.create (node_modules/puppeteer-core/src/common/Connection.ts:127:22)
      at Connection._rawSend (node_modules/puppeteer-core/src/common/Connection.ts:278:22)
      at CDPSessionImpl.send (node_modules/puppeteer-core/src/common/Connection.ts:537:29)
      at ExecutionContext._ExecutionContext_evaluate (node_modules/puppeteer-core/src/common/ExecutionContext.ts:288:10)
      at ExecutionContext.evaluate (node_modules/puppeteer-core/src/common/ExecutionContext.ts:189:32)
      at IsolatedWorld.evaluate (node_modules/puppeteer-core/src/common/IsolatedWorld.ts:210:20)
      at Context.afterEach (test/conductor/mocha_hooks.ts:146:26)
```

This seems to be Pptr related and not a direct issue with these tests
(it also occurs in the global afterEach block, not in the data grid
tests themselves)

Since these tests were disabled we have rolled new versions of Pptr into
DevTools, and I cannot recreate the crash locally, so I think we should
re-enable and see if they are stable. If not, we can then dive properly
into hunting down the issue.

Bug: 1442175
Change-Id: I640fbc8d1345a32b16ba576cc80e2b69311c8120
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4683631
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Andres Olivares <andoli@chromium.org>
2023-07-14 08:36:05 +00:00
Ergun Erdogmus da8edc45b1 Disable failing test for Chromium PINS roll
This test is failing in the last Chromium PINS rolls: https://chromium-review.googlesource.com/q/%22Update+Chromium+PINS%22

It seems like the test is failing not on the test code itself
but while trying to collect coverage. Before diving into the reason
I have wanted to skip the test to unblock Chromium rolls.

Bug: 1418918
Change-Id: I6a9be11180d83d198e66803378844e2bae4cae8c
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4671162
Auto-Submit: Ergün Erdoğmuş <ergunsh@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Ergün Erdoğmuş <ergunsh@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2023-07-10 09:50:53 +00:00
Randolf Jung 0009b998b2 Disable data grid controller tests
See the bug for more information.

Bug: 1442175
Change-Id: I161bf914d3dd996bc06e24ed2a83d89643861b10
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4671157
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2023-07-10 05:06:27 +00:00
Nikolay Vitkov 9461dbc498 Disable failing test for datagrid controller
Bug: 1442175
Change-Id: I59a6537e1d80af461b35f61c093449714421aaef
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4503025
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Nikolay Vitkov <nvitkov@chromium.org>
2023-05-03 12:51:32 +00:00
Danil Somsikov 4b15941399 Disable 'lets the user right click on a header to show the context menu'
as it is still flaky on win.

Bug: 1418918
Change-Id: I3f0fb3893b05bc5da8908de00a2bc6f9a6d7d34d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4428131
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Auto-Submit: Danil Somsikov <dsv@chromium.org>
Commit-Queue: Danil Somsikov <dsv@chromium.org>
2023-04-14 14:38:47 +00:00
Randolf ae23e132e4 Update flaky tests
These tests are passing locally during stress-testing and promise-delay testing. It's likely these tests are no longer flaky (since Puppeteer has had a significant upgrade since they were marked).

Fixed: 1261763, 1346232, 1347831, 1418918
Change-Id: I66f9b519b4de2bac73505092aae55789ac144b7a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4311824
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Randolf Jung <jrandolf@chromium.org>
2023-03-29 21:14:37 +00:00
Andrés Olivares 1c891e6c38 Disable flaky datagrid controller E2E test
Bug: 1418918
Change-Id: I96251d1b72368df7c588fe3b536e2e91f8b51a8a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4290133
Reviewed-by: Nancy Li <nancyly@chromium.org>
Commit-Queue: Nancy Li <nancyly@chromium.org>
Auto-Submit: Andres Olivares <andoli@chromium.org>
2023-02-24 13:29:42 +00:00
Kim-Anh Tran 208c006eac [interactions] Unflake data_grid_controller test
This is an attempt to unflake the data_grid_controller
interactions test by awaiting the expected number of rows
before sorting them.

Drive-by: Use click helper
Bug: none
Change-Id: Ice8cc143b99f131fae9edfd20f9c663de0becedc
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4224368
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
2023-02-08 06:32:43 +00:00
Alex Rudenko 1ec35fcf3e Remove usage of clickElement in data_grid_controller_test.ts
Bug: 1411188
Change-Id: If191586f91dcb46f4662965842a842582b68b570
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4207839
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-31 14:27:00 +00:00
Alex Rudenko e92fe9d745 Refactor the click helper to use Puppeteer's methods
The click helper now only accepts selectors so that it is
able to recover from unstable DOM situations. A new deprecated
helper clickElement is introduced for tests that cannot use a
selector currently. This should serve as a red flag that the
test might suffer from flakiness.

Bounding box and offset computation is removed for now. New
Puppeteer version allows providing relative click coordinates
so we need to use that.

Bug: 1411188, 1409768, 1411196, 1410437
Change-Id: I94a272184530842476bb2a879d862c4bd0930dba
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4194329
Reviewed-by: Philip Pfaffe <pfaffe@chromium.org>
Commit-Queue: Alex Rudenko <alexrudenko@chromium.org>
2023-01-30 14:27:54 +00:00
Al Muthanna Athamina 44ac91669b [E2E] Add option to bypass platformSpecificTextForSubMenuEntryItem
Add option to bypass platformSpecificTextForSubMenuEntryItem since
it is not always needed on all items on the context menu.

Bug: chromium:1377770, chromium:1410776
Cq-Include-Trybots: luci.devtools-frontend.try:devtools_frontend_mac_rel
Change-Id: I729775b5621ae5eae140e5333fb5f89f7d7ec8d6
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4196926
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Danil Somsikov <dsv@chromium.org>
2023-01-30 06:41:49 +00:00
Jack Franklin e839c0cf22 Enable long import wrapping for JS imports
DISABLE_THIRD_PARTY_CHECK=big clang format run against all files in
front_end and test/

Bug: 1319340
Change-Id: I1fff63cb07544ccd0e3059fc901f9a48ff4af13b
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3598879
Reviewed-by: Alex Rudenko <alexrudenko@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Wolfgang Beyer <wolfi@chromium.org>
2022-05-03 10:22:12 +00:00
Paul Lewis 597da1d4a1 Set theme value to default rather than systemPreferred
When refactoring the Theme Support code I mistakenly defaulted the theme
value to systemPreferred rather than default. This meant that under test
conditions some cases were failing on Mac (where we special-case the
soft context menu rendering).

This CL changes over the theme value to default, and unskips the tests.
I've verified that the change works locally, but we'll have to see what
CI makes of it.

R=jacktfranklin@chromium.org

Bug: crbug.com/1285783
Change-Id: I9078b80095b0c4713f655a89596b8c8608ebf799
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3377202
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Paul Lewis <aerotwist@chromium.org>
2022-01-10 11:18:45 +00:00
Wolfgang Beyer 7ebe656164 Temporarily disable failing tests on Mac
Bug: 1285783
Change-Id: I4d8adea6b6e846b0c8e136fb80c659019163ef0a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3375549
Reviewed-by: Simon Zünd <szuend@chromium.org>
Commit-Queue: Wolfgang Beyer <wolfi@chromium.org>
2022-01-10 10:22:45 +00:00
Jack Franklin fda44a1eb5 Add generic types to $, $$ and waitFor helpers
Puppeteer supports generics on these methods, but we didn't support them
in our helpers. This CL adds support for them, meaning we can avoid `as
HTMLElement` in some of our tests.

Bug: none
Change-Id: I2b229b81522d85e6cd9662fd867932d7e24ab7c2
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3110204
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-23 11:45:28 +00:00
Jack Franklin fae999f5a7 Extract context-menu e2e helpers
I need to test the context menu in future e2e tests, so this CL pulls
the helpers I created out of the data-grid tests and into a shared
module.

Bug: none
Change-Id: Ifcb87863998301527f3e4f71ff38ea381541057d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3110372
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-08-23 11:30:19 +00:00
Jack Franklin 5b1ab68316 [DataGrid] focusable cell logic improvements
This CL is a mix of changes within the DataGrid that improve the logic
around focusable cells. Prior to this CL the DataGrid stored one
value, which was the cell that the user would select if they tabbed
into the DataGrid. That got confusing as we used that value to also
represent the currently active cell that the user has clicked on.

This CL splits those concerns up into two properties, and improves how
we track when the user is or isn't focusing within the data-grid. It
also moves some event handlers from `click` to `focus` for the table
cells which is just a nice tidy up.

Bug: 1211346
Change-Id: If6449f5381134892705f7f42f24b226f8dbf170a
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2935284
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2021-06-22 12:10:10 +00:00
Tim van der Lippe 23283e110a Instrument code with Istanbul for interactions tests
All interaction tests are now lazily instrumented with Istanbul
to obtain code coverage. The interactions tests can be started
with `COVERAGE=1` to obtain coverage. For that, the Mocha hooks
perform the eventual reporting and gathering of data. The instrumentation
is performed in the components server itself.

To make sure that we perform the minimal amount of work required
(since code coverage instrumentation is computationally expensive),
we preload pages to populate the instrumentation cache. Every
interactions tests should preload an example (most likely basic.html)
to populate the cache. Every subsequent test will then use the
already-instrumented code, rather than computing the code over
and over again.

The eventual code coverage is written to /interactions-coverage.
The results will eventually be merged with /karma-coverage
to obtain the union of both unit and interaction tests coverage.

R=aerotwist@chromium.org,jacktfranklin@chromium.org

Bug: 1206705
Change-Id: I5e19b1ecef23d21107210699cb29800556e0415e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2879986
Commit-Queue: Tim van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
2021-05-10 14:44:42 +00:00
Jack Franklin 4e3706155a Fix flakey data-grid-controller interaction tests on Mac
Fixed: chromium:1164826
Change-Id: I75da6ced70391ab9f87628920908d8b30f1a8a11
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619603
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
Reviewed-by: Simon Zünd <szuend@chromium.org>
Auto-Submit: Jack Franklin <jacktfranklin@chromium.org>
2021-01-11 09:48:16 +00:00
Simon Zünd 9c46f2cb69 Skip flaky DataGridController interaction tests
The tests seem to only flake/fail on MacOS bot.

Bug: chromium:1164826
Change-Id: Ib6cec75b4bfcbdcaad89d7da94a975700f7dee4e
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2619601
Reviewed-by: Mathias Bynens <mathias@chromium.org>
Commit-Queue: Simon Zünd <szuend@chromium.org>
2021-01-11 06:25:36 +00:00
Jack Franklin 3fcecc1172 Add body context menu to data-grid
This CL adds support for the context menu that appears when you right
click on the body row of the data-grid.

This menu shows columns you can sort by and you can toggle column
visibility via "Header Options" (the text is identical to the legacy
data grid). It also provides a hook for the user to customise and add
their own items to the context menu.

Bug: 1150793
Change-Id: I6a6d8c6c67156a575477c1e6d438261b85d9b034
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610967
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 16:11:55 +00:00
Jack Franklin bb7bf72580 Fix sub menu context menu interaction tests on Mac
The interaction tests that looked for submenu entry points in a context
menu would fail on Mac, because on Mac they have the ▶ symbol, whereas
on other platforms they do not.

This CL provides a helper to search for the item with and without the ▶
and ensures the tests pass on all platforms.

Change-Id: I619ff370fbc6388ec166d9fd4b7e944788dbbf6d
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2612991
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
2021-01-06 11:59:35 +00:00
Jack Franklin 90b6613019 Reland "Add header context menu to data grid"
This reverts commit c2ad98d783.

Reason for revert: fixed flakey test

Original change's description:
> Revert "Add header context menu to data grid"
>
> This reverts commit 6bdb3622bd.
>
> Reason for revert: Interaction tests started failing on mac.
>
> https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview
>
> Original change's description:
> > Add header context menu to data grid
> >
> > This CL adds a default header context menu to the data grid that lists visible
> > and sortable columns much like the legacy data grid.
> >
> > Bug: 1150793
> > Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> > Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> > Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> > Reviewed-by: Paul Lewis <aerotwist@chromium.org>
>
> TBR=aerotwist@chromium.org,jacktfranklin@chromium.org
>
> Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 1150793
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
> Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
> Commit-Queue: Jan Scheffler <janscheffler@chromium.org>

TBR=aerotwist@chromium.org,szuend@chromium.org,janscheffler@chromium.org,jacktfranklin@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: 1150793
Change-Id: Ibd352be261d2cefee6fccc4b18b438faaad57631
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2610596
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
2021-01-05 11:56:39 +00:00
Jan Scheffler c2ad98d783 Revert "Add header context menu to data grid"
This reverts commit 6bdb3622bd.

Reason for revert: Interaction tests started failing on mac.

https://ci.chromium.org/ui/p/devtools-frontend/builders/ci/Stand-alone%20Mac/2514/overview

Original change's description:
> Add header context menu to data grid
>
> This CL adds a default header context menu to the data grid that lists visible
> and sortable columns much like the legacy data grid.
>
> Bug: 1150793
> Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
> Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
> Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
> Reviewed-by: Paul Lewis <aerotwist@chromium.org>

TBR=aerotwist@chromium.org,jacktfranklin@chromium.org

Change-Id: Ic8ef16044716d922d3a37b6a8fb32e13a75dee72
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1150793
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2601962
Reviewed-by: Jan Scheffler <janscheffler@chromium.org>
Commit-Queue: Jan Scheffler <janscheffler@chromium.org>
2020-12-23 07:27:30 +00:00
Jack Franklin 6bdb3622bd Add header context menu to data grid
This CL adds a default header context menu to the data grid that lists visible
and sortable columns much like the legacy data grid.

Bug: 1150793
Change-Id: I84a8a9cc511d6be9fee1f89ba41a6e8649df54ec
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2600723
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
Reviewed-by: Paul Lewis <aerotwist@chromium.org>
2020-12-22 15:43:47 +00:00