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

Runner: New action to open accordion if not open #114

Closed
linawolf opened this issue May 30, 2021 · 5 comments
Closed

Runner: New action to open accordion if not open #114

linawolf opened this issue May 30, 2021 · 5 comments
Assignees
Labels
question Further information is requested

Comments

@linawolf
Copy link
Member

If I have the following:

"actionsIdentifierImageManipulation": [
          {"action": "resizeWindow", "width": 1024,"height": 768},
          {"action": "see", "text": "Page"},
          {"action": "click", "link": "Page"},
          {"action": "openPageTreePath", "path": ["Congratulations"]},
          {"action": "switchToContentFrame"},
          {"action": "waitForText", "text": "Congratulations", "timeout": 5},
          {"action": "click", "link": "div#element-tt_content-210 a[href*=edit]"},
          {"action": "waitForText", "text": "Edit Page Content \"Deliver business value\" on page \"Congratulations\"", "timeout": 5},
          {"action": "click", "link": "Images"},
          {"action": "click", "link": "//div[@id=\"data-1-tt_content-210-image_records\"]/div[1]//button[contains(@class, \"form-irre-header-button\")]"},
          {"action": "wait", "timeout": 0.5},
          {"action": "resizeToFullPage"},
          {
            "action": "makeScreenshotOfElement",
            "selector": "//div[@id=\"data-1-tt_content-210-image_records\"]/div[1]//div[contains(@class, \"form-group\")][contains(., \"Image manipulation\")]",
            "fileName": "ImageManipulationButton"
          },
          {"action": "resizeWindow", "width": 1024,"height": 768}
        ],
        "tt_content": [
          {
            "action": "goToField",
            "fields": "image"
          },
          {
            "action": "click",
            "link": ".form-irre-header-button"
          },
          {
            "action": "wait",
            "timeout": 0.1
          },
          {
            "action": "makeScreenshotOfElement",
            "selector": ".form-section",
            "fileName": "Image"
          }
        ]

Running them separate will show "Image" opened, running both together will show "Image" closed
2021-05-30 09_37_47-New TYPO3 site  TYPO3 CMS 11 2 0-dev

@linawolf linawolf added the bug Something isn't working label May 30, 2021
@alexander-nitsche
Copy link
Contributor

Is this a bug or as expected? I would expect that clicking a toggler once differs from clicking a toggler twice.

@linawolf
Copy link
Member Author

linawolf commented Jun 3, 2021

I would not expect one action group to have effect on the other. In Pupeteer I had an action that would only open and not close accordions to solve this.

@alexander-nitsche alexander-nitsche changed the title Taking two screenshots of the same accordion item (image) toggles them open / closed Runner: New action to open accordion if not open Jun 3, 2021
@alexander-nitsche alexander-nitsche added enhancement New feature or request and removed bug Something isn't working labels Jun 3, 2021
@alexander-nitsche
Copy link
Contributor

Instead of creating actions that check the state of all possible switchable elements, I suggest following the principle of "leave your place as you found it" and simply close the accordion after taking the screenshot.

@alexander-nitsche alexander-nitsche added question Further information is requested documentation Improvements or additions to documentation and removed enhancement New feature or request question Further information is requested documentation Improvements or additions to documentation labels Jun 15, 2021
@alexander-nitsche
Copy link
Contributor

Ok?

@linawolf
Copy link
Member Author

We can do it like that for now. I hope this can be improved by #175 one day

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants