diff --git a/test/nbrowser/DocTutorial.ts b/test/nbrowser/DocTutorial.ts index 198d0a94..ebdbadfc 100644 --- a/test/nbrowser/DocTutorial.ts +++ b/test/nbrowser/DocTutorial.ts @@ -12,7 +12,7 @@ describe('DocTutorial', function () { let api: UserAPI; let session: gu.Session; - const cleanup = setupTestSuite(); + const cleanup = setupTestSuite({team: true}); before(async () => { session = await gu.session().teamSite.user('support').login(); diff --git a/test/nbrowser/gristUtils.ts b/test/nbrowser/gristUtils.ts index 784e0444..a9babd48 100644 --- a/test/nbrowser/gristUtils.ts +++ b/test/nbrowser/gristUtils.ts @@ -543,10 +543,11 @@ export async function rightClick(cell: WebElement) { * section. RowNum is a 1-based number as in the row headers, and col is a 0-based index for * grid view or field name for detail view. */ -export async function getCursorPosition(section?: WebElement) { +export async function getCursorPosition(section?: WebElement|string) { return await retryOnStale(async () => { + if (typeof section === 'string') { section = await getSection(section); } section = section ?? await driver.findWait('.active_section', 4000); - const cursor = await section.findWait('.active_cursor', 1000); + const cursor = await section.findWait('.selected_cursor', 1000); // Query assuming the cursor is in a GridView and a DetailView, then use whichever query data // works out. const [colIndex, rowIndex, rowNum, colName] = await Promise.all([