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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃毇 Bug] methods manage() and isInstaled() from ExtensionsViewItem checks wrong "button" WebElement if found more then one extension #767

Open
1 of 3 tasks
nallikaea opened this issue May 15, 2023 · 4 comments
Labels
bug Something isn't working
Milestone

Comments

@nallikaea
Copy link

nallikaea commented May 15, 2023

Define the issue title short and most specific to the problem.

Replace all '???' with relevant information.

Describe the bug

  • Trying to automate test case using monaco-page-object library v.3.1.0. It should get recommended extension list from file, and check if it installed and enabled in DevWorkspace. There can be found more then one extension by keyword, for ex. "java", so test script will filter found WebElements by publisher and return one. After it try to extend methods element.isInstaled() to check if it is true and element.manage() to check if "Enable" menu item is inactive. But inside the methods conditions for buttons ExtensionsViewItem.locators.ExtensionsViewItem.install and ExtensionsViewItem.locators.ExtensionsViewItem.manage provide checks not for the found item but for the first one.

Connected issues:
eclipse-che/che#22176
Test script code:
https://github.com/eclipse/che/blob/main/tests/e2e/specs/dashboard-samples/RecomendedExtentions.spec.ts

Steps to Reproduce

  1. Open Extension View
  2. Try to find some extensions with keyword "Java"
  3. Try to get context menu with method manage() for the second found item

Actual behavior

 manage() {
        return __awaiter(this, void 0, void 0, function* () {
            yield this.getDriver().wait(selenium_webdriver_1.until.elementLocated(ExtensionsViewItem.locators.ExtensionsViewItem.manage), 1000);
            const button = yield this.enclosingItem.findElement(ExtensionsViewItem.locators.ExtensionsViewItem.manage);
            yield this.getDriver().executeScript('arguments[0].style.border=\'2px solid red\'', button);
            if ((yield button.getAttribute('class')).indexOf('disabled') > -1) {
                throw new Error(`Extension '${yield this.getTitle()}' is not installed`);
            }
            return this.openContextMenu();
        });

if ((yield button.getAttribute('class')).indexOf('disabled') > -1) condition checks button for the first element;

Expected behavior

  • if ((yield button.getAttribute('class')).indexOf('disabled') > -1) condition checks button for the second element;

Environment information

  • OS:
    • Windows
    • Linux
    • macOS
  • VSCode version: 1.78
  • ExTester version: 3.1.0
  • Version: 1.78.0
  • Browser: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
  • Node (npm) version: v16.18.1

Attachments

If applicable, add screenshots, logs, examples... to help explain your problem.
Screencast with highlights:
Screencast from 15.05.23 14:30:08.webm
https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/8198/console
https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/Testing/job/e2e/job/basic/job/typescript-tests/8198/artifact/test-repo/tests/e2e/

@nallikaea nallikaea added bug Something isn't working new-issue New issue which was not discussed yet labels May 15, 2023
@djelinek djelinek removed the new-issue New issue which was not discussed yet label May 18, 2023
@djelinek djelinek added this to the NEXT milestone May 18, 2023
@djelinek
Copy link
Collaborator

Hello @Daybringer how is it going with this issue? Any update or you need some help? 馃檪

@nallikaea
Copy link
Author

@djelinek @Daybringer Hi, I want to inquire about this task status. Do you need any help from my side?

@djelinek
Copy link
Collaborator

No idea, I was also asking about the status.

Could you please share with us @Daybringer ? 馃檪

@dmytro-ndp
Copy link

@djelinek : it seems @Daybringer couldn't finish the task.
Would you, please, continue working on it?

@djelinek djelinek modified the milestones: NEXT, BACKLOG Oct 17, 2023
@djelinek djelinek changed the title [Bug] methods manage() and isInstaled() from ExtensionsViewItem checks wrong "button" WebElement if found more then one extension [馃毇 Bug] methods manage() and isInstaled() from ExtensionsViewItem checks wrong "button" WebElement if found more then one extension Oct 17, 2023
@djelinek djelinek modified the milestones: BACKLOG, NEXT Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

4 participants