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

Split Eclipse test health check and advanced health check utils #1686

Open
jan-vcapgemini opened this issue Apr 11, 2023 · 0 comments
Open

Comments

@jan-vcapgemini
Copy link
Collaborator

Currently we run a health check and react on it with an advanced health check.

public static void runAndCaptureHealthCheck(SWTWorkbenchBot bot) throws Exception {
ResourcesPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new NullProgressMonitor());
bot.waitUntil(new AllJobsAreFinished(), DEFAULT_TIMEOUT); // build might take some time
SWTBotView view = bot.viewById(JavaUI.ID_PACKAGES);
view.bot().tree().expandNode("CobiGen_Templates").select().contextMenu("CobiGen").menu("Health Check...").click();
captureAdvancedHealthCheck(bot);

private static void captureAdvancedHealthCheck(SWTWorkbenchBot bot) {
bot.waitUntil(new AnyShellIsActive(CobiGenDialogConstants.HealthCheckDialogs.DIALOG_TITLE), DEFAULT_TIMEOUT);
takeScreenshot(bot, "healthCheck");
SWTBotShell healthCheckDialog = bot.shell(CobiGenDialogConstants.HealthCheckDialogs.DIALOG_TITLE);
healthCheckDialog.bot().button(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE).click();
bot.waitUntil(new AnyShellIsActive(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE),
DEFAULT_TIMEOUT);
takeScreenshot(bot, "advancedHealthCheck");
SWTBotShell advancedHealthCheckDialog = bot.shell(CobiGenDialogConstants.HealthCheckDialogs.ADVANCED_DIALOG_TITLE);
advancedHealthCheckDialog.bot().button("OK");
advancedHealthCheckDialog.bot().button("OK");

Instead we should handle both health checks individually.

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

No branches or pull requests

1 participant