// Check the merge conflict UI.
Assert.assertEquals("loading", extensionPane.getStatus());
Assert.assertNull(extensionPane.getStatusMessage());
ProgressBarPane progressBar = extensionPane.getProgressBar();
Assert.assertEquals(83, progressBar.getPercent());
Assert.assertEquals("Conflict between [@@ -1,1 +1,1 @@] and [@@ -1,1 +1,1 @@]", progressBar.getMessage());
ExtensionProgressPane progressPane = extensionPane.openProgressSection();
WebElement jobLogLabel = progressPane.getJobLogLabel();
Assert.assertEquals("INSTALL LOG".toLowerCase(), jobLogLabel.getText().toLowerCase());
// The job log is collapsed when the job is waiting for user input so we need to expand it before asserting its
// content (otherwise #getText() returns the empty string because the text is not visible).
jobLogLabel.click();
List<LogItemPane> upgradeLog = progressPane.getJobLog();
LogItemPane lastLogItem = upgradeLog.get(upgradeLog.size() - 1);
Assert.assertEquals("loading", lastLogItem.getLevel());
Assert.assertEquals(progressBar.getMessage(), lastLogItem.getMessage());
MergeConflictPane mergeConflictPane = progressPane.getMergeConflict();
ChangesPane changesPane = mergeConflictPane.getChanges();
Assert.assertFalse(changesPane.getContentChanges().isEmpty());
Assert.assertEquals("@@ -1,1 +1,1 @@\n-<del>Test</del> macro.\n+<ins>A</ins> <ins>cool </ins>macro.",