From 77c8f27c9ac3baa420c1dde6e550f2b25b302f13 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Wed, 10 Apr 2024 16:03:48 -0400 Subject: [PATCH] E2E: Fix click location in FullSiteEditorDataViewsComponent Prior to WordPress/gutenberg#59803, the `a` inside the `.dataviews-view-table__primary-field` div occupied the full width of the div, so when Playwright clicked in the center of the div it would hit the link. That PR changed things up a bit, now the `a` is not expanded to fill the entire div and a click in the middle of the div misses the link, meaning the test never navigates to the next page as expected. This updates the logic to click the actual `a` instead of the div. --- .../src/lib/components/full-side-editor-data-views-component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/calypso-e2e/src/lib/components/full-side-editor-data-views-component.ts b/packages/calypso-e2e/src/lib/components/full-side-editor-data-views-component.ts index 008152273c8d2..75dd48da969ce 100644 --- a/packages/calypso-e2e/src/lib/components/full-side-editor-data-views-component.ts +++ b/packages/calypso-e2e/src/lib/components/full-side-editor-data-views-component.ts @@ -3,7 +3,7 @@ import { EditorComponent } from './editor-component'; const selectors = { primaryFieldByText: ( primaryFieldText: string ) => - `.dataviews-view-table__primary-field:has-text("${ primaryFieldText }")`, + `.dataviews-view-table__primary-field:has-text("${ primaryFieldText }") a`, }; /**