Converting Tests back to C# but still with Playwright
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
@layout PageLayout
|
||||
@using IGP.Pages.DataTables.Parts
|
||||
@inherits BasePage
|
||||
|
||||
@page "/data-tables"
|
||||
|
||||
<LayoutLargeContentComponent>
|
||||
<WebsiteTitleComponent>Data Tables</WebsiteTitleComponent>
|
||||
<MudTabs Elevation="2">
|
||||
<MudTabPanel Text="Attacks">
|
||||
<WeaponTable/>
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="Production">
|
||||
<ProductionTable/>
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="Health">
|
||||
<VitalityTable/>
|
||||
</MudTabPanel>
|
||||
<MudTabPanel Text="Movement">
|
||||
<MovementTable/>
|
||||
</MudTabPanel>
|
||||
</MudTabs>
|
||||
|
||||
<ContentDividerComponent></ContentDividerComponent>
|
||||
|
||||
<PaperComponent>
|
||||
<InfoBodyComponent>
|
||||
<InfoQuestionComponent>
|
||||
What is this tool?
|
||||
</InfoQuestionComponent>
|
||||
<InfoAnswerComponent>
|
||||
This tool is a data table of all information belonging to a type of data. Such as viewing all weapons,
|
||||
so one can easily sort and see what weapon attack has the highest range, and what faction and unit that
|
||||
attack belongs to.
|
||||
</InfoAnswerComponent>
|
||||
</InfoBodyComponent>
|
||||
</PaperComponent>
|
||||
</LayoutLargeContentComponent>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
|
||||
@code {
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
<MudDataGrid T="EntityMovementModel" Items="@_data"
|
||||
SortMode="SortMode.Multiple"
|
||||
Filterable="true"
|
||||
Hideable="true">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Parent.GetName()" Title="Entity"/>
|
||||
<PropertyColumn Property="x => x.Movement"/>
|
||||
<PropertyColumn Property="x => x.Speed"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
|
||||
@code {
|
||||
|
||||
readonly IEnumerable<EntityMovementModel> _data = EntityData.Get()
|
||||
.SelectMany(e => e.Value.EntityParts)
|
||||
.OfType<EntityMovementModel>()
|
||||
.ToList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
<MudDataGrid T="EntityProductionModel" Items="@data"
|
||||
SortMode="SortMode.Multiple"
|
||||
Filterable="true"
|
||||
Hideable="true">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Parent.GetName()" Title="Entity"/>
|
||||
<PropertyColumn Property="x => x.Alloy"/>
|
||||
<PropertyColumn Property="x => x.BuildTime"/>
|
||||
<PropertyColumn Property="x => x.Ether"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
|
||||
@code {
|
||||
|
||||
readonly IEnumerable<EntityProductionModel> data = EntityData.Get()
|
||||
.SelectMany(e => e.Value.EntityParts)
|
||||
.OfType<EntityProductionModel>()
|
||||
.ToList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
<MudDataGrid T="EntityVitalityModel" Items="@_data"
|
||||
SortMode="SortMode.Multiple"
|
||||
Filterable="true"
|
||||
Hideable="true">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Parent.GetName()" Title="Entity"/>
|
||||
<PropertyColumn Property="x => x.Health"/>
|
||||
<PropertyColumn Property="x => x.Armor"/>
|
||||
<PropertyColumn Property="x => x.Defense"/>
|
||||
<PropertyColumn Property="x => x.DefenseLayer"/>
|
||||
<PropertyColumn Property="x => x.IsStructure"/>
|
||||
<PropertyColumn Property="x => x.IsEtheric"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/>
|
||||
</Columns>
|
||||
</MudDataGrid>
|
||||
|
||||
@code {
|
||||
|
||||
readonly IEnumerable<EntityVitalityModel> _data = EntityData.Get()
|
||||
.SelectMany(e => e.Value.EntityParts)
|
||||
.OfType<EntityVitalityModel>()
|
||||
.ToList();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<MudDataGrid T="EntityWeaponModel" Items="@_data"
|
||||
SortMode="SortMode.Multiple"
|
||||
Filterable="true"
|
||||
Hideable="true">
|
||||
<Columns>
|
||||
<PropertyColumn Property="x => x.Parent.GetName()" Title="Entity"/>
|
||||
<PropertyColumn Property="x => x.Range" Title="Range"/>
|
||||
<PropertyColumn Property="x => x.Targets" Title="Targets"/>
|
||||
<PropertyColumn Property="x => x.Damage" Title="Damage"/>
|
||||
<PropertyColumn Property="x => x.AttacksPerSecond" Title="Attacks Per Second"/>
|
||||
<PropertyColumn Property="x => x.DamagePerSecond()" Title="DPS"/>
|
||||
<PropertyColumn Property="x => x.HasSplash" Title="Has Splash"/>
|
||||
<PropertyColumn Property="x => x.DamagePerSecondLight()" Title="DPS (Light)"/>
|
||||
<PropertyColumn Property="x => x.DamagePerSecondMedium()" Title="DPS (Medium)"/>
|
||||
<PropertyColumn Property="x => x.DamagePerSecondHeavy()" Title="DPS (Heavy)"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetFaction()" Title="Faction"/>
|
||||
<PropertyColumn Property="x => x.Parent.GetImmortal()" Title="Immortal"/>
|
||||
</Columns>
|
||||
<PagerContent>
|
||||
<MudDataGridPager T="EntityWeaponModel"/>
|
||||
</PagerContent>
|
||||
</MudDataGrid>
|
||||
|
||||
@code {
|
||||
|
||||
readonly IEnumerable<EntityWeaponModel> _data = EntityData.Get()
|
||||
.SelectMany(e => e.Value.EntityParts)
|
||||
.OfType<EntityWeaponModel>()
|
||||
.ToList();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user