def test_get_grouped_analytics(graphql_request, merch_collection_id): analytics_groups = graphql_request( "getGroupedAnalytics", {"collectionId": merch_collection_id} ) expected_analytics_group_names = { "Socio Demographics", "Purchase Intelligence", "Superfans", "Valuable Fan Segments by RFM", "Smart Segments from Machine Learning", } assert all(ag["name"] in expected_analytics_group_names for ag in analytics_groups) assert all(len(ag["charts"]) > 0 for ag in analytics_groups)