Staging bug fixes (#819)

* Staging bug fixes

* Finish fixes

* fix tests

* Update migration

* Update migrations

* fix side types being added for ineligible loaders

* fix tests

* Fix tests

* Finish fixes

* Add slug display names
This commit is contained in:
Geometrically
2024-01-04 16:24:33 -05:00
committed by GitHub
parent cf9c8cbb4f
commit f5802fee31
36 changed files with 322 additions and 246 deletions

View File

@@ -11,7 +11,7 @@ use serde_json::json;
mod common;
// TODO: Revisit this with the new modify_json in the version maker
// TODO: Revisit this wit h the new modify_json in the version maker
// That change here should be able to simplify it vastly
#[actix_rt::test]
@@ -61,17 +61,13 @@ async fn search_projects() {
),
// Project type change
// Modpack should still be able to search based on former loader, even though technically the loader is 'mrpack'
(json!([["categories:mrpack"]]), vec![4]),
// (json!([["categories:mrpack"]]), vec![4]),
// (
// json!([["categories:fabric"]]),
// vec![4],
// ),
(
json!([["categories:mrpack"], ["categories:fabric"]]),
vec![4],
),
(
json!([
["categories:mrpack"],
["categories:fabric"],
["project_types:modpack"]
]),
json!([["categories:fabric"], ["project_types:modpack"]]),
vec![4],
),
];

View File

@@ -259,14 +259,14 @@ async fn search_projects() {
),
// Project type change
// Modpack should still be able to search based on former loader, even though technically the loader is 'mrpack'
(json!([["categories:mrpack"]]), vec![4]),
(
json!([["categories:mrpack"], ["categories:fabric"]]),
vec![4],
),
// (json!([["categories:mrpack"]]), vec![4]),
// (
// json!([["categories:mrpack"], ["categories:fabric"]]),
// vec![4],
// ),
(
json!([
["categories:mrpack"],
// ["categories:mrpack"],
["categories:fabric"],
["project_type:modpack"]
]),

View File

@@ -46,7 +46,7 @@ async fn get_tags() {
let loader_names = loaders.into_iter().map(|x| x.name).collect::<HashSet<_>>();
assert_eq!(
loader_names,
["fabric", "forge", "mrpack", "bukkit", "waterfall"]
["fabric", "forge", "bukkit", "waterfall"]
.iter()
.map(|s| s.to_string())
.collect()