Skip to content

Commit

Permalink
Updated MTA 511 test case, and changed the expected plugin info, and …
Browse files Browse the repository at this point in the history
…added a new config variable i.e. "extension_path" in vscode_config.json
  • Loading branch information
midays committed May 30, 2024
1 parent ae8ec88 commit e1250b0
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 21 deletions.
3 changes: 2 additions & 1 deletion src/config/vscode_config.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"ide_path": "/usr/bin/code",
"plugin_cache_path": "/home/midays/.mta/tooling/vscode"
"plugin_cache_path": "",
"extensions_path" : ""
}
16 changes: 1 addition & 15 deletions src/data/vscode_plugin_info.txt
Original file line number Diff line number Diff line change
@@ -1,46 +1,32 @@

Migration Toolkit for Applications (MTA) - VSCode Extension
Description
VSCode extension for application migration and modernization using MTA.

VSCode
This extension is published here in the Microsoft Visual Studio Marketplace.

Features
This extension provides the ability to analyze, assess, and migrate source code from within VSCode and Eclipse Che.

The look and feel of both VSCode and Eclipse Che are very similar; therefore, the functionality demonstrated below should be consistent between the two environments.

Configuration Editor
Use the configuration editor to setup the analysis.

Jump to Code
Jump to code containing identified migration issues.

Issue Details
View details about the migration issue.

Report
Use the generated reports to better understand and assess the migration efforts.

Eclipse Che
This extension is supported in Eclipse Che.

To add this plugin to a Che workspace, open Che, navigate to the plugins tab, and search using the keyword migration.

Requirements
Java Platform, JRE version 11 with JAVA_HOME environment variable
A minimum of 4 GB RAM; 8 GB recommended
Tip: The cli can be installed from within VSCode once the extension has been installed.

Extension Settings
This extension contributes the following settings:

cli.executable.path: The location of the cli.
Build
bash
$ npm run compile

=======

License
MIT
13 changes: 8 additions & 5 deletions src/tests/vscode/test_mta_511_plugin_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

import pytest

from src.utils.general import find_mta_directory
from src.utils.general import read_file

DATA_DIR = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))) + "/data/"


@pytest.mark.vscode
def test_mta_511_plugin_info(setup_vscode):
def test_mta_511_plugin_info(setup_vscode, vscode_config):
# Automates Polarion MTA-511

vscode = setup_vscode
vscode.set_focus()
fetched_vscode_plugin_info = vscode.get_plugin_text()
expected_vscode_plugin_info = read_file(DATA_DIR + "vscode_plugin_info.txt").split("\n")

extensions_path = vscode_config["extensions_path"]
readme_path = os.path.join(find_mta_directory(extensions_path), "README.md")
fetched_vscode_plugin_info = vscode.get_plugin_details_text_from_file(readme_path)
expected_vscode_plugin_info = read_file(DATA_DIR + "vscode_plugin_info.txt")
vscode.close_active_tab()

assert set(expected_vscode_plugin_info) == set(fetched_vscode_plugin_info)
assert expected_vscode_plugin_info == fetched_vscode_plugin_info

0 comments on commit e1250b0

Please sign in to comment.