private void MethodSetup(int nullIdCount) { Setup(0, 1, nullIdCount); _window = UniqueIdRepairWindow.ShowWindow(); _window.Search(_generator.Path); _root = _window.rootVisualElement; }
private void SetupMethod(int sameIdCount) { Setup(sameIdCount); var window = UniqueIdRepairWindow.ShowWindow(); window.Search(_generator.Path); _root = window.rootVisualElement; }
public void It_should_clear_results_when_clicking_again() { Setup(2); var window = UniqueIdRepairWindow.ShowWindow(); window.Search(_generator.Path); window.Search(_generator.Path); var root = window.rootVisualElement; var el = GetElement <VisualElement>(root, "o-scene-search__results"); Assert.AreEqual(2, el.Children().Count()); }
public void It_should_not_print_no_found_error_message_by_default() { Setup(1); var window = UniqueIdRepairWindow.ShowWindow(); window.Close(); window = UniqueIdRepairWindow.ShowWindow(); var root = window.rootVisualElement; var elText = GetElement <TextElement>(root, "test-p-window__no-errors"); Assert.IsFalse(elText.ClassListContains("-show")); }
public void It_should_set_the_current_selection_to_the_GameObject() { Setup(2); var window = UniqueIdRepairWindow.ShowWindow(); window.Search(_generator.Path); var root = window.rootVisualElement; ClickButton(root, "m-unique-id-error__show"); var id = GetText(root, "m-unique-id-error__text"); Assert.AreEqual(id, (Selection.activeObject as GameObject).GetComponent <UniqueId>().Id); }