MappingEditorTest.cs 988 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using Content.Client.Gameplay;
  2. using Content.Client.Mapping;
  3. using Robust.Client.State;
  4. namespace Content.IntegrationTests.Tests;
  5. [TestFixture]
  6. public sealed class MappingEditorTest
  7. {
  8. [Test]
  9. public async Task StopHardCodingWidgetsJesusChristTest()
  10. {
  11. await using var pair = await PoolManager.GetServerClient(new PoolSettings
  12. {
  13. Connected = true
  14. });
  15. var client = pair.Client;
  16. var state = client.ResolveDependency<IStateManager>();
  17. await client.WaitPost(() =>
  18. {
  19. Assert.DoesNotThrow(() =>
  20. {
  21. state.RequestStateChange<MappingState>();
  22. });
  23. });
  24. // arbitrary short time
  25. await client.WaitRunTicks(30);
  26. await client.WaitPost(() =>
  27. {
  28. Assert.DoesNotThrow(() =>
  29. {
  30. state.RequestStateChange<GameplayState>();
  31. });
  32. });
  33. await pair.CleanReturnAsync();
  34. }
  35. }