Skip to content
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

LCLS Automated test case implemented for server.xml #430

Open
wants to merge 45 commits into
base: main
Choose a base branch
from

Conversation

SuparnaSuresh
Copy link
Contributor

@SuparnaSuresh SuparnaSuresh commented Dec 6, 2024

Fixes #392, Fixes #370, Fixes #434, Fixes #378, Fixes #381, Fixes #391
LCLS Test case implemented for server.xml.

  • Diagnostic for server.xml invalid value
  • Apply quick fix for invalid value in server.xml
  • Show hover support for server.xml Liberty Server Attribute
  • Show hover support for server.xml Liberty Server Feature
  • Show type ahead support in server.xml Liberty Server Feature
  • Show type ahead support in server.xml Liberty Server Configuration Stanza

@SuparnaSuresh SuparnaSuresh self-assigned this Dec 9, 2024
}).timeout(35000);

it('Should show type ahead support in server.xml Liberty Server Configuration Stanza', async () => {
const section = await new SideBarView().getContent().getSection(constants.GRADLE_PROJECT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the duplicate code to testutils.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks

});

it('Should copy content of server.xml', async () => {
await utils.openConfigFile(constants.CONFIG_TWO, constants.SERVER_XML)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is for opening server.xml right? then the method name should be updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks


actualServerXMLContent = await editor.getText();
assert(actualServerXMLContent.length !== 0, 'Content of server.xml is not in copied.');
console.log('Sever.xml content is:', actualServerXMLContent);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove unnecessary log statements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks

editor.clearText();
editor.setText(actualServerXMLContent);
console.log("server.xml content is restored");
await utils.closeEditor(constants.SERVER_XML);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is for closing the opened file, so please update the method name accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks.


}).timeout(45000);

it('Should show type ahead support in server.xml Liberty Server Feature', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of 'type ahead', use the word 'completion'.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks.

* Open specific config file from parent directory
*/
export async function openConfigFile(parentDir: string, configFileName: string) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method opens any file not the config file, so change the method name accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks.

Copy link
Contributor

@aparnamichael aparnamichael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the review comments.

@@ -1,3 +1,4 @@

/**
* Copyright (c) 2020, 2022 IBM Corporation.
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed. Thanks.

@SuparnaSuresh
Copy link
Contributor Author

Review comments addressed. Thanks

@SuparnaSuresh SuparnaSuresh changed the title Issue392- Automated test case for typeahead server config stanza LCLS Automated test case implemented for server.xml Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment