From 124efd35c247b39cfd749eb2a6e3f87962a7f504 Mon Sep 17 00:00:00 2001 From: Koenari Date: Sun, 2 Jul 2023 22:01:24 +0200 Subject: [PATCH] Reenable FC Active State --- NetStone.Test/Tests.cs | 10 +++++----- .../Parseables/FreeCompany/LodestoneFreeCompany.cs | 8 ++++---- NetStone/NetStone.xml | 5 +++++ 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/NetStone.Test/Tests.cs b/NetStone.Test/Tests.cs index 9a6f901..7a2cef6 100644 --- a/NetStone.Test/Tests.cs +++ b/NetStone.Test/Tests.cs @@ -23,7 +23,8 @@ public class Tests [SetUp] public async Task Setup() { - var gameData = PacksGameDataProvider.Load(new DirectoryInfo("../../../../lib/lodestone-data-exports/pack")); + var gameData = + PacksGameDataProvider.Load(new DirectoryInfo("../../../../lib/lodestone-data-exports/pack")); this.lodestone = await LodestoneClient.GetClientAsync(gameData); } @@ -112,7 +113,7 @@ public async Task CheckFreeCompany() //Focus //todo: selector does not work - //Assert.AreEqual(ActiveTimes.Always, fc.ActiveState); + Assert.AreEqual("Always", fc.ActiveState); Assert.AreEqual("Open", fc.Recruitment); Assert.IsNotNull(fc.Focus); @@ -123,9 +124,8 @@ public async Task CheckFreeCompany() Assert.AreEqual("Leveling", fc.Focus.Leveling.Name); Assert.IsTrue(fc.Focus.Leveling.IsEnabled); - //todo:Needs PR in css selectors - //Assert.AreEqual("https://img.finalfantasyxiv.com/lds/h/n/5Y0D3iH7ngHlRpv9-KJKalt3_o.png", - // fc.Focus.RolePlay.Icon?.AbsoluteUri); + Assert.AreEqual("https://img.finalfantasyxiv.com/lds/h/n/5Y0D3iH7ngHlRpv9-KJKalt3_o.png", + fc.Focus.Leveling.Icon?.AbsoluteUri); Assert.AreEqual("Casual", fc.Focus.Casual.Name); Assert.IsTrue(fc.Focus.Casual.IsEnabled); diff --git a/NetStone/Model/Parseables/FreeCompany/LodestoneFreeCompany.cs b/NetStone/Model/Parseables/FreeCompany/LodestoneFreeCompany.cs index 3ae1ae3..78cd7cc 100644 --- a/NetStone/Model/Parseables/FreeCompany/LodestoneFreeCompany.cs +++ b/NetStone/Model/Parseables/FreeCompany/LodestoneFreeCompany.cs @@ -4,6 +4,7 @@ using NetStone.Definitions; using NetStone.Definitions.Model.FreeCompany; using NetStone.Model.Parseables.FreeCompany.Members; +using NetStone.Search.FreeCompany; namespace NetStone.Model.Parseables.FreeCompany; @@ -96,13 +97,12 @@ public LodestoneFreeCompany(LodestoneClient client, HtmlNode rootNode, Definitio /// public int ActiveMemberCount => int.Parse(Parse(this.fcDefinition.ActiveMemberCount)); - /* /// /// Activity status /// - todo: selector does not work - public string ActiveState => Parse(this.fcDefinition.Activestate); - */ + //todo: selector does not work + public string ActiveState => Parse(this.fcDefinition.Activestate).Trim(); + /// /// Information about the estate diff --git a/NetStone/NetStone.xml b/NetStone/NetStone.xml index 5bc214d..e7769f1 100644 --- a/NetStone/NetStone.xml +++ b/NetStone/NetStone.xml @@ -2894,6 +2894,11 @@ Number of active members + + + Activity status + + Information about the estate