Skip to content

Commit

Permalink
E2E: Fix click location in FullSiteEditorDataViewsComponent
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
anomiex committed Apr 10, 2024
1 parent 43c349b commit 77c8f27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
};

/**
Expand Down

0 comments on commit 77c8f27

Please sign in to comment.