-
Notifications
You must be signed in to change notification settings - Fork 4
test: create tests for datasets backpages (#4080) #4089
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: create tests for datasets backpages (#4080) #4089
Conversation
4abe3b4
to
e430182
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks Jonah! I have requested a couple of changes.
await page.goto(anvilTabs.datasets.url); | ||
await testTab(page, tab); | ||
await testTab(page, anvilTabs.datasets); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be anvilTabs.biosamples
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it should! Thanks for catching that!
explorer/e2e/anvil/anvil-tabs.ts
Outdated
]; | ||
const anvilDatasetsSelectableColumns = [ | ||
{ | ||
name: "Phenotypic Sex", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do, although since this doesn't affect test functionality it might make more sense to do it under #4078 since it would affect all tests! Would that work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to go ahead and update these in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
explorer/e2e/testFunctions.ts
Outdated
@@ -522,4 +541,255 @@ export async function testClearAll( | |||
await page.locator("body").click(); | |||
} | |||
} | |||
|
|||
const getRowLocatorByAccess = (page: Page, access: string): Locator => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you be able to add TSDocs for the functions added in this PR?
explorer/e2e/testFunctions.ts
Outdated
columnDescription != undefined && | ||
columnDescription.pluralizedLabel != undefined && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checking in on the type coercion here (!= undefined
): are you explicitly checking for undefined
or null
? Let's use !columnDescription && !columnDescription.pluralizedLabel
if you're just checking for a falsy case, or !== undefined
if you're looking specifically for undefined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will fix that - still not used to JS type coercion but I'll review these. Thanks for catching it!
explorer/e2e/testFunctions.ts
Outdated
header?.correspondingColumn?.name === columnHeaderName | ||
)?.name; | ||
if (correspondingHeaderName == null) { | ||
// Fail the test, because this means there is an incorrect configuraiton in the tab definition |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Fail the test, because this means there is an incorrect configuraiton in the tab definition | |
// Fail the test, because this means there is an incorrect configuration in the tab definition |
8c9475b
to
3853267
Compare
3853267
to
894a237
Compare
31ee683
to
a770114
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks Jonah!
Ticket
Closes #4080 .
Reviewers
@MillenniumFalconMechanic .
Changes
anvilTabs.ts
andtestInterfaces.ts
so that there were no hardcoded constants in the new testsPlease do not merge before filter tests (#4071)