-
Notifications
You must be signed in to change notification settings - Fork 967
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
Fix selenium selector for collections #16754
Fix selenium selector for collections #16754
Conversation
c4e3a2e
to
90eb05e
Compare
Co-authored-by: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
66bab28
to
1c29d33
Compare
Argh... still did not fix the flakiness of |
Looking at the screenshot from the test failure it seems like the test navigates away from the multi-history view. |
Hmm... I thought that it didn't even go inside the sub-collection, but could it actually be that it went inside and then out again? And why does it pass locally? Could the selector be the cause here too? Too many questions... 😮💨 |
747f59d
to
886e95b
Compare
This is starting to look more and more like a Heisenbug 🙃 |
26b1858
to
c1aa0d0
Compare
Alright... after some more debugging, I still can't understand what is going on with This is the information I gathered so far:
When it fails, for the look of the debugging screenshots, it seems after clicking on the sub-collection I double-checked the selector but everything seems fine, it is in the DOM and obviously, it drills down fine locally or when you disable most of the other selenium tests... I don't know how other selenium tests can really affect this... 😞 |
Co-authored-by: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com>
c1aa0d0
to
4e20d95
Compare
I can get it to fail locally with:
Given this, I would assume there's an id conflict somewhere ... that's a tough one unless you can spot the mixup from the component itself. |
OK, so for posterity: you can run the test locally against a configured database with |
Thank you @mvdbeek! I will try out this technique and see if I can get to the bottom of this 👍 |
Ok, I tried to use the same DB for running the selenium test and then connect to the same DB in my local instance but for some reason, the user that is supposed to have that history doesn't have that history... 🤯 SeleniumDebugging.mp4UpdateFor some unknown (to me) reason, the history was marked as I need to do more debugging but the first thing I detected is that when you click on the collection it seems it does nothing... but it is drilling down the collection, the actual problem is that the collection ID seems to be the parent collection, which creates a loop... so the more you click on the collection the more you drill down in the stack to the "same" parent collection. Anyway... one step forward to solving this mystery. |
Now everything is starting to make sense, but still, I have a piece of the puzzle missing in my head... The "collection loop issue" is caused by this change I made in #16725
I was wrongly assuming the ID of the These are the values of the variables in the case of the test failure: itemObject: DCObject{
"id": "df7a1f0c02a5b08e", <-- This is a DatasetCollection ID
"model_class": "DatasetCollection",
"collection_type": "list",
"populated": null,
"element_count": null,
"contents_url": "/api/dataset_collections/df7a1f0c02a5b08e/contents/df7a1f0c02a5b08e", <- ID coincidence...
"elements": []
} collection: HDCA{
"id": "df7a1f0c02a5b08e", <- HDCA ID
"name": "list:list",
"history_id": "ee3742ed6d8b4a0c",
"hid": 5,
"deleted": false,
"visible": true,
"type_id": null,
"type": "collection",
"create_time": "2023-10-02T13:25:26.649540",
"update_time": "2023-10-02T13:25:26.649545",
"url": "/api/histories/ee3742ed6d8b4a0c/contents/dataset_collections/df7a1f0c02a5b08e",
"tags": [],
"history_content_type": "dataset_collection",
"model_class": "HistoryDatasetCollectionAssociation",
"collection_type": "list:list",
"populated_state": "ok",
"populated_state_message": null,
"element_count": 1,
"job_source_id": null,
"job_source_type": null,
"job_state_summary": {
"all_jobs": 0,
"new": 0,
"waiting": 0,
"running": 0,
"error": 0,
"paused": 0,
"skipped": 0,
"deleted_new": 0,
"resubmitted": 0,
"queued": 0,
"ok": 0,
"failed": 0,
"deleted": 0,
"upload": 0
},
"contents_url": "/api/dataset_collections/df7a1f0c02a5b08e/contents/0a248a1f62a0cc04",
"collection_id": "0a248a1f62a0cc04",
"populated": true,
"elements": [
{
"id": "1e8ab44153008be8",
"model_class": "DatasetCollectionElement",
"element_index": 0,
"element_identifier": "test0",
"element_type": "dataset_collection",
"object": {
"id": "df7a1f0c02a5b08e", <- Coincidence...
"model_class": "DatasetCollection",
"collection_type": "list",
"populated": true,
"element_count": 3,
"contents_url": null,
"elements": [
{
"id": "c9468fdb6dc5c5f1",
"model_class": "DatasetCollectionElement",
"element_index": 0,
"element_identifier": "data0",
"element_type": "hda",
"object": {
"id": "2d9035b3fc152403",
"model_class": "HistoryDatasetAssociation",
"state": "ok",
"hda_ldda": "hda",
"history_id": "ee3742ed6d8b4a0c",
"tags": [],
"create_time": "2023-10-02T13:25:26.537999",
"validated_state": "unknown",
"peek": "<table cellspacing=\"0\" cellpadding=\"3\"><tr><td>TestData123</td></tr></table>",
"metadata_dbkey": "?",
"deleted": false,
"name": "data0",
"file_size": 12,
"visible": false,
"purged": false,
"uuid": "80a8fa98-5f94-43d1-b77e-deaddc8042c5",
"misc_blurb": "1 line",
"misc_info": null,
"hid": 2,
"metadata_data_lines": 1,
"file_ext": "txt",
"update_time": "2023-10-02T13:25:26.538003",
"history_content_type": "dataset",
"data_type": "galaxy.datatypes.data.Text",
"validated_state_message": null,
"genome_build": "?"
}
},
{
"id": "2a56795cad3c7db3",
"model_class": "DatasetCollectionElement",
"element_index": 1,
"element_identifier": "data1",
"element_type": "hda",
"object": {
"id": "5a1cff6882ddb5b2",
"model_class": "HistoryDatasetAssociation",
"state": "ok",
"hda_ldda": "hda",
"history_id": "ee3742ed6d8b4a0c",
"tags": [],
"create_time": "2023-10-02T13:25:26.538006",
"validated_state": "unknown",
"peek": "<table cellspacing=\"0\" cellpadding=\"3\"><tr><td>TestData123</td></tr></table>",
"metadata_dbkey": "?",
"deleted": false,
"name": "data1",
"file_size": 12,
"visible": false,
"purged": false,
"uuid": "bc2e2adb-5153-4140-9011-cc94ee7a9763",
"misc_blurb": "1 line",
"misc_info": null,
"hid": 3,
"metadata_data_lines": 1,
"file_ext": "txt",
"update_time": "2023-10-02T13:25:26.538008",
"history_content_type": "dataset",
"data_type": "galaxy.datatypes.data.Text",
"validated_state_message": null,
"genome_build": "?"
}
},
{
"id": "4b187121143038ff",
"model_class": "DatasetCollectionElement",
"element_index": 2,
"element_identifier": "data2",
"element_type": "hda",
"object": {
"id": "d413a19dec13d11e",
"model_class": "HistoryDatasetAssociation",
"state": "ok",
"hda_ldda": "hda",
"history_id": "ee3742ed6d8b4a0c",
"tags": [],
"create_time": "2023-10-02T13:25:26.538011",
"validated_state": "unknown",
"peek": "<table cellspacing=\"0\" cellpadding=\"3\"><tr><td>TestData123</td></tr></table>",
"metadata_dbkey": "?",
"deleted": false,
"name": "data2",
"file_size": 12,
"visible": false,
"purged": false,
"uuid": "93f3361e-c18c-42d9-8575-f4e03176d688",
"misc_blurb": "1 line",
"misc_info": null,
"hid": 4,
"metadata_data_lines": 1,
"file_ext": "txt",
"update_time": "2023-10-02T13:25:26.538013",
"history_content_type": "dataset",
"data_type": "galaxy.datatypes.data.Text",
"validated_state_message": null,
"genome_build": "?"
}
}
]
}
}
],
"elements_datatypes": [
"txt"
]
} The mixed ID The missing part of the puzzle is the actual solution 😅 I need to wrap my head around the different concepts related to collections, HDCA, DCE, DC... but maybe someone more versed in collection internals can help... The previous solution relied on querying the Any ideas on how to do the correct query here? |
I've updated this PR description to fix only one of the tests (that these changes address). The other one will be tracked in its own issue (#16785), as it is not a selenium problem but an actual bug. So taking this out of draft. |
Fixes
Many thanks to @ElectronicBlueberry for figuring out the issue!!
How to test the changes?
License