clear buyer conditions in StoreDiscountAndRefundTest (#35847)

* fun

* Update Content.IntegrationTests/Tests/StoreTests.cs

Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>

* Update Content.IntegrationTests/Tests/StoreTests.cs

Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>

---------

Co-authored-by: Hannah Giovanna Dawson <karakkaraz@gmail.com>
This commit is contained in:
Milon
2025-03-15 21:58:13 +01:00
committed by GitHub
parent 8848d74ccc
commit 7f4672f963

View File

@@ -102,6 +102,12 @@ public sealed class StoreTests
+ $"flag as 'true'. This marks the fact that cost modifier of discount is not applied properly!"
);
// The storeComponent returns discounted items with conditions randomly, so we remove these to sanitize the data.
foreach (var discountedItem in discountedListingItems)
{
discountedItem.Conditions = null;
}
// Refund action requests re-generation of listing items so we will be re-acquiring items from component a lot of times.
var itemIds = discountedListingItems.Select(x => x.ID);
foreach (var itemId in itemIds)
@@ -140,6 +146,9 @@ public sealed class StoreTests
// get refreshed item after refund re-generated items
discountedListingItem = storeComponent.FullListingsCatalog.First(x => x.ID == itemId);
// The storeComponent can give a discounted item a condition at random, so we remove it to sanitize the data.
discountedListingItem.Conditions = null;
var afterRefundBalance = storeComponent.Balance[UplinkSystem.TelecrystalCurrencyPrototype];
Assert.That(afterRefundBalance.Value, Is.EqualTo(originalBalance.Value), "Expected refund to return all discounted cost value.");
Assert.That(