(core) tweak how search bar places cursor on sections

Summary: It is important for linking to be maintained, or user could be gravely misled about material in other sections.

Test Plan: added test

Reviewers: dsagal

Reviewed By: dsagal

Subscribers: dsagal

Differential Revision: https://phab.getgrist.com/D3003
This commit is contained in:
Paul Fitzpatrick
2021-08-27 17:42:36 -04:00
parent 3d085ff2d7
commit 08d0ee65d1
5 changed files with 20 additions and 392 deletions

View File

@@ -177,6 +177,14 @@ export function getSection(sectionOrTitle: string|WebElement): WebElement|WebEle
.findClosest('.viewsection_content');
}
/**
* Click into a section without disrupting cursor positions.
*/
export async function selectSectionByTitle(title: string) {
await driver.find(`.test-viewsection-title[value="${title}" i]`)
.findClosest('.viewsection_titletext_container').click();
}
/**
* Returns visible cells of the GridView from a single column and one or more rows. Options may be