Skip to content

Fix uGUI Demo#274

Merged
nowsprinting merged 2 commits intomasterfrom
chore/fix_uguidemo
Oct 25, 2025
Merged

Fix uGUI Demo#274
nowsprinting merged 2 commits intomasterfrom
chore/fix_uguidemo

Conversation

@nowsprinting
Copy link
Copy Markdown
Owner

@nowsprinting nowsprinting commented Oct 25, 2025

Changes

  • Switching tab by Dropdown
  • Fix tests

Copilot AI review requested due to automatic review settings October 25, 2025 09:30
@github-actions github-actions bot added the chore label Oct 25, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the uGUI Demo tests to use a dropdown-based tab navigation system instead of button-based navigation, simplifying the test setup and execution flow. The changes also consolidate the monkey test functionality into a more focused implementation.

Key Changes

  • Replaced tab switching via button clicks with direct dropdown value manipulation in test setup methods
  • Renamed test methods to be more descriptive (e.g., Click()ClickClickButton())
  • Simplified MonkeyTestButton by removing global control interactivity management
  • Replaced TabSwitchButton component with new TabSwitchDropdown component for tab navigation

Reviewed Changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
TextInputOperatorTest.cs Updated to use dropdown for tab switching and renamed test method
ScrollWheelTest.cs Updated to use dropdown for tab switching and renamed test method
MonkeyTest.cs Simplified to click the monkey test button directly instead of configuring and running tests manually
GameObjectFinderTest.cs New test file for finder functionality using dropdown-based navigation
DragOperatorsTest.cs Updated to use dropdown navigation and added separate tests for drag, flick, and swipe operations
ClickOperatorsTest.cs Updated to use dropdown navigation and renamed test methods for clarity
TabSwitchDropdown.cs New component implementing dropdown-based tab switching
TabSwitchButton.cs Removed file, replaced by dropdown implementation
TabContent.cs Removed control panel interactivity management logic
MonkeyTestButton.cs Renamed from MonkeyTestsButton, simplified by removing global control management

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown

Code Metrics Report

master (4f6b6ac) #274 (0625602) +/-
Coverage 85.0% 89.2% +4.1%
Code to Test Ratio 1:1.3 1:1.3 +0.0
Test Execution Time 10m53s 10m11s -42s
Details
  |                     | master (4f6b6ac) | #274 (0625602) |  +/-  |
  |---------------------|------------------|----------------|-------|
+ | Coverage            |            85.0% |          89.2% | +4.1% |
  |   Files             |               69 |             69 |     0 |
  |   Lines             |             2407 |           2389 |   -18 |
+ |   Covered           |             2048 |           2131 |   +83 |
+ | Code to Test Ratio  |            1:1.3 |          1:1.3 |  +0.0 |
  |   Code              |             4381 |           4365 |   -16 |
+ |   Test              |             6018 |           6048 |   +30 |
+ | Test Execution Time |           10m53s |         10m11s |  -42s |

Code coverage of files in pull request scope (68.9% → 89.4%)

Files Coverage +/- Status
./Packages/com.nowsprinting.test-helper.ui/Runtime/Monkey.cs 96.2% -1.9% affected
./Packages/com.nowsprinting.test-helper.ui/Runtime/Visualizers/DefaultDebugVisualizer.cs 81.8% +1.8% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/GameObjectFinderButton.cs 93.6% +80.8% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/MonkeyTestButton.cs 100.0% +100.0% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/MonkeyTestsButton.cs 0.0% -24.2% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/OperatorButton.cs 82.2% +33.3% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/PaginatorButton.cs 79.6% +37.2% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/TabContent.cs 100.0% +8.6% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/TabSwitchButton.cs 0.0% -75.0% affected
/github/workspace/UnityProject~/Assets/Samples/uGUI Demo/Scripts/Runtime/TabSwitchDropdown.cs 100.0% +100.0% affected

Reported by octocov

@nowsprinting nowsprinting merged commit b76e148 into master Oct 25, 2025
15 checks passed
@nowsprinting nowsprinting deleted the chore/fix_uguidemo branch October 25, 2025 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants