Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cahrens committed Sep 26, 2024
1 parent 8d8a4b3 commit aaf8c38
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion integration-tests/tests/register-user.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const testRegisterUserFn = withUser(async ({ page, testUrl, token }) => {

await assertLabelledTextInputValue(page, label({ labelContains: 'Contact Email' }), 'ltcommanderdata@neighborhood.horse');

const registrationEmailDiv = await page.waitForSelector("(xpath///div[.='Email']/following-sibling::div)");
const registrationEmailDiv = await page.waitForSelector("xpath///div[.='Email']/following-sibling::div");
const registrationEmail = registrationEmailDiv?.evaluate((d) => d.value);
const contactEmail = await getLabelledTextInputValue(page, label({ labelContains: 'Contact Email' }));

Expand Down
2 changes: 1 addition & 1 deletion integration-tests/tests/request-access.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const { registerTest } = require('../utils/jest-utils');
const { withUserToken } = require('../utils/terra-sa-utils');

async function getHrefFromClickable(page, selector) {
return (await (await page.waitForSelector(clickable(`xpath/${selector}`), _.defaults({ visible: true }))).getProperty('href')).jsonValue();
return (await (await page.waitForSelector(`xpath/${clickable(selector)}`, _.defaults({ visible: true }))).getProperty('href')).jsonValue();
}

const dbGapUrlRoot = 'https://www.ncbi.nlm.nih.gov/projects/gap/cgi-bin/study.cgi?study_id=';
Expand Down
8 changes: 4 additions & 4 deletions integration-tests/utils/integration-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,10 @@ const findButtonInDialogByAriaLabel = (page, ariaLabelText) => {

/** Waits for a menu element to expand (or collapse if isExpanded=false) */
const waitForMenu = (page, { labelContains, isExpanded = true, ...options }) => {
return page.waitForSelector(
`xpath///*[contains(@aria-label,"${labelContains}") or @id=//label[contains(normalize-space(.),"${labelContains}")]/@for or @aria-labelledby=//*[contains(normalize-space(.),"${labelContains}")]/@id][@aria-expanded="${isExpanded}"]`,
defaultToVisibleTrue(options)
);
const labelContainsSelector = `[aria-label*="${labelContains}"], [id="${labelContains}"], [aria-labelledby*="${labelContains}"]`;
const expandedSelector = `[aria-expanded="${isExpanded}"]`;

return page.waitForSelector(`${labelContainsSelector}${expandedSelector}`, defaultToVisibleTrue(options));
};

const openError = async (page) => {
Expand Down

0 comments on commit aaf8c38

Please sign in to comment.