Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support GUI test #964

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

miurahr
Copy link
Member

@miurahr miurahr commented Feb 18, 2024

Pull request type

  • Build and release changes -> [build/release]

Which ticket is resolved?

dev-ML
https://sourceforge.net/p/omegat/mailman/omegat-development/thread/47347769-ccd4-4272-9155-9eaf96c0296c%40northside.tokyo/#msg58743384

What does this PR change?

  • refacotr main gui classes to allow GUI test - MainWindowMenuHandler class inherited from BaseMenuHanlder abstract class - Tester should implement MenuHandler class for test inherited from BaseMenuHandler class

  • Add testGui configuration on gradle

  • Set gui test source under test/gui

  • Introduce TestCoreGUI class

  • Add BasicMenuItemTest

Other information

@miurahr miurahr changed the title feat: support GUI unit test feat: support GUI test Feb 18, 2024
@miurahr miurahr force-pushed the topic/miurahr/test/gui/acceptance-test branch from bd6b5d1 to 6fafc3b Compare February 19, 2024 23:03
Copy link

❌ Run Gradle test failed:

1 similar comment
Copy link

❌ Run Gradle test failed:

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024

This comment was marked as outdated.

@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024
@omegat-org omegat-org deleted a comment from github-actions bot Mar 1, 2024

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

Copy link

github-actions bot commented Mar 5, 2024

❌ Unit Tests, Quality checks, and Acceptance Tests failed.

Please look a Gradle Scan page for details:
https://gradle.com/s/u4eiqhop6qm2k

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@miurahr miurahr force-pushed the topic/miurahr/test/gui/acceptance-test branch from 45496b4 to cc164e1 Compare March 6, 2024 23:57

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

This comment was marked as outdated.

@miurahr
Copy link
Member Author

miurahr commented Mar 9, 2024

  • It seems better to add definitions of UI names at end of class definition because of test purpose.

- refacotr main gui classes to allow GUI test
    - MainWindowMenuHandler class inherited from BaseMenuHanlder
      abstract class
    - Tester should implement MenuHandler class for test inherited
      from BaseMenuHandler class
- Add testGui configuration on gradle
- Set gui test source under test/gui
- Introduce TestCoreGUI class
- Add BasicMenuItemTest
- test new project creation
- refactor: ProjectPropertiesDialog
	- Split looong-method into smaller one
	- Give component name
- refactor: extend IMainMenu interface
- refactor: MainWindowUI class
- refactor: MainWindow class
- refactor: MainWindowStatusBar class as 1st citizen class in o.o.gui.main package
- fix: do not assume MainWindow class as JFrame object but always use MainWindow#getApplicationFrame
- refactor: deprecate MainWindowUI class functions
- refactor: add IMainWindow#resetDesktopLayout interface
- chore: add task testAcceptance in gradle
- chore: testAcceptance task on java17
- chore: testAcceptance task with xvfb-run
- refactor: testAcceptance
	- Update core can be called from acceptance test class
	- Update TestCoreInitializer to call a part of core
	- Initialize main window docking style

feat: test with sample project

- refactor: Introduce IProjectFilesList
	- Move projWin object in Core
	- Initialize projWin in Core#initializeGUI
	- MainWindowMenuHandler handle projWin through IProjectFilesList
- feat: test glossary creation operation
	- fix: fix modules initialization
	- These modules initialize Swing GUI parts in static context. It can be error on non-GUI environment and test environment.
	- This fix changes these are initialized in application start event handler.
	- feat: load all plugins
	- test: check glossary search expectation
	- test: explain expected behavior in comment
- refactor: update TestMainWindowMenuHandler
	- Add more actions
	- Extend IMainWindow#addSearchWindow and IMainWindow#getSearchWindows
	- Move internal TestMainWindow class as regular class
	- refactor ProjectUICommands.doRecycleTrans and ProjectUICommands.doInsertTrans
- refactor: give ProjectPropertiesDialog UI names

Signed-off-by: Hiroshi Miura <[email protected]>
@miurahr miurahr force-pushed the topic/miurahr/test/gui/acceptance-test branch from fa11d4c to f5abb6a Compare May 24, 2024 07:43

This comment was marked as outdated.

Signed-off-by: Hiroshi Miura <[email protected]>
Copy link

❌ Unit Tests, Quality checks, and Acceptance Tests failed.

Please look a Gradle Scan page for details:
https://gradle.com/s/jpqrsrdjhuf6s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant