Skip to content

Commit

Permalink
Merge pull request #462 from rwth-acis/SOD/feature/better-task-card-l…
Browse files Browse the repository at this point in the history
…ist-test

Improved Task Card List Test Scene is working
  • Loading branch information
pfnud11 authored Jul 7, 2022
2 parents 1e3a985 + 28caff7 commit c3ba84e
Show file tree
Hide file tree
Showing 2 changed files with 419 additions and 27 deletions.
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();
}
}
}
}
Loading

0 comments on commit c3ba84e

Please sign in to comment.