mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-06 23:08:11 +08:00
Conditionally truncate category string (#1206)
* maybe truncate string * add string formatting to test * correct import * destructuring * add maxlength * test * Respond to feedback from @bkmartinjr Co-authored-by: Matt Weiden <538456+mweiden@users.noreply.github.com>
This commit is contained in:
co-authored by
Matt Weiden
parent
28ddb60b2f
commit
234f25b782
@@ -183,8 +183,11 @@ describe.each([
|
||||
});
|
||||
|
||||
async function assertCategoryExists(categoryName) {
|
||||
const result = await utils.waitByID(`${categoryName}:category-expand`);
|
||||
expect(await result.evaluate(node => node.innerText)).toBe(categoryName);
|
||||
const handle = await utils.waitByID(`${categoryName}:category-expand`);
|
||||
const result = await handle.evaluate(node => node.innerText);
|
||||
// slice beginning and end of category name result to account for truncation of long names
|
||||
expect(result.slice(0, 10)).toBe(categoryName.slice(0, 10));
|
||||
expect(result.slice(-10)).toBe(categoryName.slice(-10));
|
||||
}
|
||||
|
||||
async function assertCategoryDoesNotExist(categoryName) {
|
||||
|
||||
Reference in New Issue
Block a user