Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added src/images/intellij/Report_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 4 additions & 9 deletions src/models/IDE/Intellij.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,16 +125,11 @@ def run_simple_analysis(self, app_name, wait_for_analysis_finish=True):
# Wait for analysis to be completed in IDE terminal
if wait_for_analysis_finish:
time.sleep(2)
wait_for_element(self.image_locator("analysis_complete_terminal.png"), 120)
wait_for_element(self.image_locator("analysis_complete_terminal.png"), 160)

def open_report_page(self, app_name):
self.click(self.config_run_region)
self.type_text(app_name)
self.press_keys("enter")
self.press_keys("enter")
self.click_element(locator_type="image", locator="report_selector.png")
# Verify the report page is opened
self.wait_find_element(locator_type="image", locator="report_page_header.png")
def open_report_page(self):
coordinates = find_on_screen(self.image_locator("Report_logo.png"))
pyautogui.click(coordinates)

def refresh_configuration(self):
"""
Expand Down
14 changes: 1 addition & 13 deletions src/tests/intellij/test_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,10 @@
@pytest.mark.parametrize("app_name", json.load(open(DATA_DIR + "analysis.json")))
@pytest.mark.parametrize("ide", ["intellij"])
@pytest.mark.intellij
def test_analysis_intellij(configurations, setup_intellij, app_name, analysis_data, ide):
def test_analysis_intellij(configurations, setup_intellij, app_name, analysis_data, ide, intellij_config):
"""
Analysis tests for intellij using various migration paths
"""
intellij = setup_intellij
application_data = analysis_data[app_name]
expected_story_points = application_data["story_points"]

# Intellij freezes without this sleep
time.sleep(3)
intellij.run_simple_analysis(app_name)
intellij.open_report_page(app_name)

_, html_file_location = configurations
if "skip_reports" not in application_data["options"]:
intellij.verify_story_points(
html_file_location=html_file_location,
expected_story_points=expected_story_points,
)
33 changes: 33 additions & 0 deletions src/tests/intellij/test_report_opened.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import time

import pytest

from src.models.chrome import Chrome

APP_NAME = "report opened"

chrome = Chrome()


@pytest.mark.parametrize("app_name", [APP_NAME])
@pytest.mark.parametrize(
"analysis_data",
[
{
APP_NAME: {"options": {"target": ["eap8"]}},
},
],
)
@pytest.mark.parametrize("ide", ["intellij"])
@pytest.mark.intellij
def test_report_opened(configurations, setup_intellij, app_name, analysis_data, ide, intellij_config):
intellij = setup_intellij
time.sleep(3)
intellij.run_simple_analysis(app_name)
_, report_file_path, id = configurations
intellij.open_report_page()
chrome.focus_tab(id)
active_url = chrome.get_chrome_focused_tab_url()
assert id in active_url, "The report that was opened is not for this analysis run"
chrome.close_tab(id)
intellij.set_focus()