Skip to content

Commit

Permalink
removed unwanted code
Browse files Browse the repository at this point in the history
  • Loading branch information
SuparnaSuresh committed Dec 16, 2024
1 parent 67d39c5 commit 07faf04
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/test/GradleSingleModLCLSTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,11 @@ describe('LCLS tests for Gradle Project', function () {
await VSBrowser.instance.openResources(path.join(utils.getGradleProjectPath(), 'src', 'main', 'liberty', 'config2', 'server.xml'));

editor = await new EditorView().openEditor('server.xml') as TextEditor;
const stanzaSnipet = "<feature>servlet</feature>";
const expectedPlatformEntry = "<platform>jakartaee-9.1</platform>";
const stanzaSnipetFeature = "<feature>servlet</feature>";
const stanzaSnipetPlatform = "<platform>jakartaee-9.1</platform>";
const expectedDiagnosticData = `ERROR: The "servlet" versionless feature cannot be resolved since there are more than one common platform. Specify a platform or a feature with a version to enable resolution`;
await editor.typeTextAt(15, 35, '\n');
await editor.typeTextAt(16, 9, stanzaSnipet);
await editor.typeTextAt(16, 9, stanzaSnipetFeature);
await utils.delay(2000);
const focusTargtElemnt = await editor.findElement(By.xpath("//*[contains(text(), '\servlet\')]"));
await utils.delay(3000);
Expand All @@ -378,15 +378,14 @@ describe('LCLS tests for Gradle Project', function () {
const hverValue = await hverContent.getText();
console.log("Hover text:" + hverValue);
if (hverValue.includes(expectedDiagnosticData)) {
const stanzaSnipetPlatform = "<platform>jakartaee-9.1</platform>";
await editor.typeTextAt(16, 35, '\n');
await editor.typeTextAt(17, 9, stanzaSnipetPlatform);
await utils.delay(2000);
}
const updatedServerxmlContent = await editor.getText();
console.log("Updated server.xml content:" + updatedServerxmlContent);

assert(updatedServerxmlContent.includes(stanzaSnipet) && updatedServerxmlContent.includes(expectedPlatformEntry), 'Did not get expected entries in server.xml for versionless combination for server feature and platform');
assert(updatedServerxmlContent.includes(stanzaSnipetFeature) && updatedServerxmlContent.includes(stanzaSnipetPlatform), 'Did not get expected entries in server.xml for versionless combination for server feature and platform');

editor.clearText();
editor.setText(actualSeverXMLContent);
Expand Down

0 comments on commit 07faf04

Please sign in to comment.