Resolve WES-166 "Activity endscene"
This commit is contained in:
committed by
Louis Adriaens
parent
1e09f09dae
commit
9b88537d70
@@ -62,6 +62,7 @@ public class ChangeUserScreenTests
|
||||
|
||||
SystemController.GetInstance().SwapScene(startScreen);
|
||||
yield return new WaitForSeconds(WAIT_TIME);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -113,7 +114,7 @@ public class ChangeUserScreenTests
|
||||
Assert.AreEqual(1, UserList.GetUsers().Count);
|
||||
var cards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
Assert.AreEqual(1, cards.Count);
|
||||
Assert.AreEqual(Color.blue, cards[0].gameObject.GetComponent<Image>().color);
|
||||
Assert.AreEqual(new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f), cards[0].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -131,7 +132,7 @@ public class ChangeUserScreenTests
|
||||
Assert.AreEqual(UserList.GetUsers().Count, cards.Count);
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -149,7 +150,7 @@ public class ChangeUserScreenTests
|
||||
// Before update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -160,7 +161,7 @@ public class ChangeUserScreenTests
|
||||
// After update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == newUser ? Color.blue : Color.gray;
|
||||
Color expected = i == newUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -178,7 +179,7 @@ public class ChangeUserScreenTests
|
||||
// Before update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@ public class ChangeUserScreenTests
|
||||
// After update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -206,7 +207,7 @@ public class ChangeUserScreenTests
|
||||
// Before update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -217,7 +218,7 @@ public class ChangeUserScreenTests
|
||||
// After update
|
||||
for (int i = 0; i < cards.Count; i++)
|
||||
{
|
||||
Color expected = i == newUser ? Color.blue : Color.gray;
|
||||
Color expected = i == newUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, cards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -268,7 +269,7 @@ public class ChangeUserScreenTests
|
||||
var oldCards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
for (int i = 0; i < oldCards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, oldCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -283,7 +284,7 @@ public class ChangeUserScreenTests
|
||||
Assert.AreEqual(oldCards.Count - 1, newCards.Count);
|
||||
for (int i = 0; i < newCards.Count; i++)
|
||||
{
|
||||
Color expected = i == (currentUser - 1) ? Color.blue : Color.gray;
|
||||
Color expected = i == (currentUser - 1) ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, newCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -300,7 +301,7 @@ public class ChangeUserScreenTests
|
||||
var oldCards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
for (int i = 0; i < oldCards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, oldCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -315,7 +316,7 @@ public class ChangeUserScreenTests
|
||||
Assert.AreEqual(oldCards.Count - 1, newCards.Count);
|
||||
for (int i = 0; i < newCards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, newCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -332,7 +333,7 @@ public class ChangeUserScreenTests
|
||||
var oldCards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
for (int i = 0; i < oldCards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, oldCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
|
||||
@@ -347,7 +348,7 @@ public class ChangeUserScreenTests
|
||||
Assert.AreEqual(oldCards.Count - 1, newCards.Count);
|
||||
for (int i = 0; i < newCards.Count; i++)
|
||||
{
|
||||
Color expected = i == currentUser ? Color.blue : Color.gray;
|
||||
Color expected = i == currentUser ? new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f) : Color.gray;
|
||||
Assert.AreEqual(expected, newCards[i].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
@@ -363,7 +364,7 @@ public class ChangeUserScreenTests
|
||||
// Before update
|
||||
var oldCards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
Assert.AreEqual(1, oldCards.Count);
|
||||
Assert.AreEqual(Color.blue, oldCards[0].gameObject.GetComponent<Image>().color);
|
||||
Assert.AreEqual(new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f), oldCards[0].gameObject.GetComponent<Image>().color);
|
||||
|
||||
// Update
|
||||
oldCards[0].DeleteUser();
|
||||
@@ -373,6 +374,6 @@ public class ChangeUserScreenTests
|
||||
// After update
|
||||
var newCards = GameObject.FindObjectsOfType<UserCard>().ToList();
|
||||
Assert.AreEqual(1, newCards.Count);
|
||||
Assert.AreEqual(Color.blue, newCards[0].gameObject.GetComponent<Image>().color);
|
||||
Assert.AreEqual(new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f), newCards[0].gameObject.GetComponent<Image>().color);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ public class PanelCourseProgressTests
|
||||
currentCourse.selectActivity.Invoke();
|
||||
yield return new WaitForSeconds(WAIT_TIME);
|
||||
|
||||
Assert.AreEqual(Color.blue, currentCourse.GetComponent<Image>().color);
|
||||
Assert.AreEqual(new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f), currentCourse.GetComponent<Image>().color);
|
||||
for (int i = 1; i < courses.Length; i++)
|
||||
Assert.AreEqual(Color.gray, courses[i].GetComponent<Image>().color);
|
||||
|
||||
|
||||
@@ -182,7 +182,7 @@ public class PanelMinigameProgressTests
|
||||
currentMinigame.selectActivity.Invoke();
|
||||
yield return new WaitForSeconds(WAIT_TIME);
|
||||
|
||||
Assert.AreEqual(Color.blue, currentMinigame.GetComponent<Image>().color);
|
||||
Assert.AreEqual(new Color(66 / 255f, 158 / 255f, 189 / 255f, 1f), currentMinigame.GetComponent<Image>().color);
|
||||
for (int i = 1; i < minigames.Length; i++)
|
||||
Assert.AreEqual(Color.gray, minigames[i].GetComponent<Image>().color);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user