-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #462 from rwth-acis/SOD/feature/better-task-card-l…
…ist-test Improved Task Card List Test Scene is working
- Loading branch information
Showing
2 changed files
with
419 additions
and
27 deletions.
There are no files selected for viewing
38 changes: 20 additions & 18 deletions
38
Frontend/VIAProMa/Assets/Tests/Visualizations/ListTaskCards/ListTaskCardTestRunner.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,30 @@ | ||
using System; | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using i5.VIAProMa.DataModel.API; | ||
using i5.VIAProMa.Visualizations; | ||
using i5.VIAProMa.Visualizations.Competence; | ||
using UnityEngine; | ||
|
||
public class ListTaskCardTestRunner : MonoBehaviour | ||
namespace Tests.Visualizations.ListTaskCards | ||
{ | ||
[Range(1, 10)] public int[] simulatedIssues; | ||
public Visualization visualizations; | ||
|
||
void Update() | ||
public class ListTaskCardTestRunner : MonoBehaviour | ||
{ | ||
if (!Input.GetKeyDown(KeyCode.F5)) return; | ||
visualizations.ContentProvider.SelectContent(); | ||
for (var i = 0; i < simulatedIssues.Length; i++) | ||
private const int SimulatedIssuesCount = 1; | ||
[SerializeField] private Visualization[] visualizations; | ||
|
||
private void Update() | ||
{ | ||
var issue = new Issue(DataSource.GITHUB, -1, "Test", "A test", 0, null, IssueStatus.CLOSED, "", "", | ||
null, null); | ||
visualizations.ContentProvider.Issues.Add(issue); | ||
} | ||
if (!Input.GetKeyDown(KeyCode.F5)) return; | ||
foreach (var visualization in visualizations) | ||
{ | ||
visualization.ContentProvider.SelectContent(); | ||
|
||
visualizations.ContentProvider.EndContentSelection(); | ||
for (var i = 0; i < SimulatedIssuesCount; i++) | ||
{ | ||
var issue = new Issue(DataSource.GITHUB, -1, "Test", "A test", 0, null, IssueStatus.CLOSED, "", "", | ||
null, null); | ||
visualization.ContentProvider.Issues.Add(issue); | ||
} | ||
|
||
visualization.ContentProvider.EndContentSelection(); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.