-
Notifications
You must be signed in to change notification settings - Fork 39
Issue124 test case implemented for server.env - LCLS features #432
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
Open
SuparnaSuresh
wants to merge
49
commits into
OpenLiberty:main
Choose a base branch
from
SuparnaSuresh:issue124-TestcasesForServerEnvLCLS
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 41 commits
Commits
Show all changes
49 commits
Select commit
Hold shift + click to select a range
08aefcd
code to open server.xml and entry for logging
SuparnaSuresh c1a82a4
code added for hover and quicfix
SuparnaSuresh 121f17b
Code added to open server.xml
SuparnaSuresh 2771093
Code Added for write text in server.xml
SuparnaSuresh 80d8e87
Code for hover data
SuparnaSuresh 01d668f
Code for quick fix
SuparnaSuresh 3f5e62f
Code formatted
SuparnaSuresh dbba2a0
removed unwanted code
SuparnaSuresh 3e4affe
Copyright and docuementation
SuparnaSuresh 883f757
Merge branch 'OpenLiberty:main' into issue124-AutomatedTestcaseLCLS
SuparnaSuresh 150019c
Renamed file
SuparnaSuresh 7fdc278
Renamed file to GradleSingleModLCLSTest
SuparnaSuresh 108bfd5
added code to update the old content
SuparnaSuresh 23d1ce7
hover support for server.xml Liberty Server Attribute
SuparnaSuresh 6eba89d
updated code for quick fix element
SuparnaSuresh c35d6bf
Merge branch 'OpenLiberty:main' into issue378-HoversupportServerAttri…
SuparnaSuresh 13bb977
Added code for new config folder
SuparnaSuresh 008cb5c
updated variable and code format
SuparnaSuresh c452b38
Added test case for hover support for server.xml Liberty Server Feature
SuparnaSuresh 368ac77
test case added - type ahead support in server.xml Liberty Server Fea…
SuparnaSuresh 767952a
updated test case
SuparnaSuresh 358f41d
Updated test case
SuparnaSuresh a5e0e5f
Test case added for type ahead support config stanza
SuparnaSuresh 2e03f59
Test case added for server.env
SuparnaSuresh b1d39e1
Test cases added for server.env
SuparnaSuresh ebcad9d
Test case added for server.env LCLS
SuparnaSuresh 0843603
chanaged server.xml path
SuparnaSuresh 33c6213
typo error and copyright hear year updated
SuparnaSuresh dad152d
Updated testUtils
SuparnaSuresh 53a7165
Merge branch 'OpenLiberty:main' into issue124-TestcasesForServerEnvLCLS
SuparnaSuresh fa5caeb
Updated test cases
SuparnaSuresh a0f1d58
description added for methods
SuparnaSuresh 4e8f0f9
addressed review comments
SuparnaSuresh e2ba375
Server.env test cases updated to diffrent file
SuparnaSuresh fefa988
removed server.xml test cases
SuparnaSuresh a243593
test case time - delay updated
SuparnaSuresh cbb74bc
constant - file updated
SuparnaSuresh 9f92154
formated - constants
SuparnaSuresh aa9a0cb
constant file updated
SuparnaSuresh d1d8d5c
GHA build failure fix
SuparnaSuresh 41ced49
GHA build failure fix
SuparnaSuresh f775424
Merge branch 'OpenLiberty:main' into issue124-TestcasesForServerEnvLCLS
SuparnaSuresh 6244e3e
Merge branch 'OpenLiberty:main' into issue124-TestcasesForServerEnvLCLS
SuparnaSuresh d6baa4e
GHA build failure - fix
SuparnaSuresh c08854e
GHA build failure fix
SuparnaSuresh cfa3ce6
GHA build failure - fix delay added
SuparnaSuresh b47dd2b
Changed config path
SuparnaSuresh dbd33fb
increased time delay
SuparnaSuresh 883c9ae
review comments addressed
SuparnaSuresh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,120 @@ | ||
| /** | ||
| * Copyright (c) 2025 IBM Corporation. | ||
| * | ||
| * This program and the accompanying materials are made available under the | ||
| * terms of the Eclipse Public License v. 2.0 which is available at | ||
| * http://www.eclipse.org/legal/epl-2.0. | ||
| * | ||
| * SPDX-License-Identifier: EPL-2.0 | ||
| */ | ||
| import { By, EditorView, TextEditor, VSBrowser } from "vscode-extension-tester"; | ||
| import * as utils from './utils/testUtils'; | ||
| import * as constants from './definitions/constants'; | ||
|
|
||
| const path = require('path'); | ||
| const assert = require('assert'); | ||
|
|
||
| describe('LCLS tests for Gradle Project - Server.env', function () { | ||
| let editor: TextEditor; | ||
| let actualServerXMLContent: string; | ||
|
|
||
| before(() => { | ||
| utils.copyDirectoryByPath(path.join(utils.getGradleProjectPath(), 'src', 'main', 'liberty', 'config'), path.join(utils.getGradleProjectPath(), 'src', 'main', 'liberty', 'config2')); | ||
| }); | ||
|
|
||
| it('Should show type ahead support in server.env for a Liberty Server Configuration Stanza', async () => { | ||
| await utils.openConfigFile(constants.CONFIG_TWO, constants.SERVER_ENV); | ||
| editor = await new EditorView().openEditor('server.env') as TextEditor; | ||
|
|
||
| const configNameSnippet = 'WLP_LOGGING_CON'; | ||
| const insertConfig = "=TBA"; | ||
| const envCfgNameChooserSnippet = 'WLP_LOGGING_CONSOLE_FORMAT'; | ||
| const expectedServerEnvString = 'WLP_LOGGING_CONSOLE_FORMAT=TBASIC'; | ||
|
|
||
| await editor.typeTextAt(1, 1, configNameSnippet); | ||
| await utils.delay(5000); | ||
| //open the assistant | ||
| await utils.callAssitantAction(editor, envCfgNameChooserSnippet); | ||
|
|
||
| await editor.typeTextAt(1, 27, insertConfig); | ||
| await utils.delay(2500); | ||
| await utils.callAssitantAction(editor, 'TBASIC'); | ||
|
|
||
| await editor.toggleContentAssist(false); | ||
|
|
||
| const updatedSeverEnvContent = await editor.getText(); | ||
| await utils.delay(3000); | ||
| assert(updatedSeverEnvContent.includes(expectedServerEnvString), 'Type ahead support is not working as expected in server.env'); | ||
| await editor.clearText(); | ||
|
|
||
| }).timeout(35000); | ||
|
|
||
| it('Should show hover support for server.env Liberty Server config setting', async () => { | ||
| await utils.openConfigFile(constants.CONFIG_TWO, constants.SERVER_ENV); | ||
| editor = await new EditorView().openEditor(constants.SERVER_ENV) as TextEditor; | ||
|
|
||
| const expectedHoverOutcome = 'This setting controls the granularity of messages that go to the console. The valid values are INFO, AUDIT, WARNING, ERROR, and OFF. The default is AUDIT. If using with the Eclipse developer tools this must be set to the default.'; | ||
| await editor.clearText(); | ||
| const testHoverTarget = 'WLP_LOGGING_CONSOLE_LOGLEVEL=OFF'; | ||
| await editor.typeTextAt(1, 1, testHoverTarget); | ||
| await utils.delay(5000); | ||
|
|
||
| const focusTargetLement = editor.findElement(By.xpath("//*[contains(text(), 'CONSOLE_LOGLEVEL')]")); | ||
| await utils.delay(3000); | ||
| focusTargetLement.click(); | ||
| await editor.click(); | ||
|
|
||
| const actions = VSBrowser.instance.driver.actions(); | ||
| await actions.move({ origin: focusTargetLement }).perform(); | ||
| await utils.delay(5000); | ||
|
|
||
| const hoverContents = editor.findElement(By.className('hover-contents')); | ||
| const hoverValue = await hoverContents.getText(); | ||
| console.log("Hover text is:" + hoverValue); | ||
|
|
||
| assert(hoverValue.includes(expectedHoverOutcome), 'Did not get expected hover data for server.env'); | ||
| await editor.clearText(); | ||
|
|
||
| }).timeout(35000); | ||
|
|
||
| it('Should show diagnostic support in server.env ', async () => { | ||
| await utils.openConfigFile(constants.CONFIG_TWO, constants.SERVER_ENV); | ||
| editor = await new EditorView().openEditor(constants.SERVER_ENV) as TextEditor; | ||
|
|
||
| const configNameSnippet = 'WLP_LOGGING_CON'; | ||
| const insertConfig = '=sample_value_is_updating_as_nodata'; | ||
| const envCfgNameChooserSnippet = 'WLP_LOGGING_CONSOLE_FORMAT'; | ||
| const expectedHoverData = 'The value `sample_value_is_updating_as_nodata` is not valid for the variable `WLP_LOGGING_CONSOLE_FORMAT`.'; | ||
|
|
||
| await editor.typeTextAt(1, 1, configNameSnippet); | ||
| await utils.delay(5000); | ||
| //open the assistant | ||
| await utils.callAssitantAction(editor, envCfgNameChooserSnippet); | ||
| // close the assistant | ||
| await editor.toggleContentAssist(false); | ||
|
|
||
| await editor.typeTextAt(1, 27, insertConfig); | ||
| const focusTargetElement = editor.findElement(By.xpath("//*[contains(text(), 'nodata')]")); | ||
| await utils.delay(3000); | ||
| focusTargetElement.click(); | ||
| await editor.click(); | ||
|
|
||
| const actions = VSBrowser.instance.driver.actions(); | ||
| await actions.move({ origin: focusTargetElement }).perform(); | ||
| await utils.delay(5000); | ||
|
|
||
| const hoverContents = editor.findElement(By.className('hover-contents')); | ||
| const hoverValue = await hoverContents.getText(); | ||
| console.log("Hover text is:" + hoverValue); | ||
|
|
||
| assert(hoverValue.includes(expectedHoverData), 'Did not get expected diagnostic as expected in server.env file'); | ||
| await editor.clearText(); | ||
|
|
||
| }).timeout(35000); | ||
|
|
||
| after(() => { | ||
| utils.removeDirectoryByPath(path.join(utils.getGradleProjectPath(), 'src', 'main', 'liberty', 'config2')); | ||
| console.log("Removed new config folder:"); | ||
| }); | ||
|
|
||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the year in copyright header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed. Thanks