-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* id fixes, testing updates * cleanup * update for searchParams page load * undo
- Loading branch information
1 parent
2575a5e
commit fdd03b5
Showing
12 changed files
with
173 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import { test as base } from "src/oss/fixtures"; | ||
import { ModalPom } from "src/oss/poms/modal"; | ||
import { getUniqueDatasetNameWithPrefix } from "src/oss/utils"; | ||
|
||
const test = base.extend<{ modal: ModalPom }>({ | ||
modal: async ({ page, eventUtils }, use) => { | ||
await use(new ModalPom(page, eventUtils)); | ||
}, | ||
}); | ||
|
||
const datasetName = getUniqueDatasetNameWithPrefix("linking"); | ||
const groupDatasetName = getUniqueDatasetNameWithPrefix("group-linking"); | ||
|
||
const id = "000000000000000000000000"; | ||
|
||
test.beforeAll(async ({ fiftyoneLoader }) => { | ||
await fiftyoneLoader.executePythonCode(` | ||
from bson import ObjectId | ||
import fiftyone as fo | ||
dataset = fo.Dataset("${datasetName}") | ||
dataset.persistent = True | ||
sample = fo.Sample(_id=ObjectId("${id}"), filepath="sample.png") | ||
dataset._sample_collection.insert_many( | ||
[dataset._make_dict(sample, include_id=True)] | ||
) | ||
group_dataset = fo.Dataset("${groupDatasetName}") | ||
group_dataset.persistent = True | ||
group = fo.Group(id="${id}") | ||
group_sample = fo.Sample( | ||
filepath="group_sample.png", group=group.element("only") | ||
) | ||
group_dataset.add_sample(group_sample)`); | ||
}); | ||
|
||
test(`sample linking`, async ({ page, fiftyoneLoader, modal }) => { | ||
await fiftyoneLoader.waitUntilGridVisible(page, datasetName, { | ||
searchParams: new URLSearchParams({ id }), | ||
}); | ||
|
||
await modal.waitForSampleLoadDomAttribute(true); | ||
|
||
await modal.assert.isOpen(); | ||
await modal.sidebar.assert.verifySidebarEntryText("id", id); | ||
}); | ||
|
||
test(`group linking`, async ({ page, fiftyoneLoader, modal }) => { | ||
await fiftyoneLoader.waitUntilGridVisible(page, groupDatasetName, { | ||
searchParams: new URLSearchParams({ groupId: id }), | ||
}); | ||
|
||
await modal.waitForSampleLoadDomAttribute(true); | ||
|
||
await modal.assert.isOpen(); | ||
await modal.sidebar.assert.verifySidebarEntryText("group.id", id); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters