-
Notifications
You must be signed in to change notification settings - Fork 4
Update WDIO tests to use action menu for plugin activation #580
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
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: renemadsen <[email protected]>
| }; | ||
|
|
||
| // Find and activate Microting Items Planning Plugin | ||
| for (let i = 0; i < 10; i++) { |
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.
@copilot the for loop is starting from 1 as the old one, otherwise it will not work as expected, this goes for the following for loops as well
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.
Fixed in commit 2917cda. All for loops now start from index 1 as in the original code.
Co-authored-by: renemadsen <[email protected]>
| it('should activate the plugin', async () => { | ||
| let plugin = await pluginPage.getFirstPluginRowObj(); | ||
| // Helper function to activate a plugin by index using action menu | ||
| const activatePlugin = async (index: number, pluginName: string) => { |
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.
@copilot this index needs to be index -= 1, otherwise it will activate the wrong plugin.
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.
Fixed in commit 56ff223. Both activatePlugin() and checkPluginStatus() now use index - 1 for HTML selectors to account for the difference between 1-based getPluginRowObjByIndex() and 0-based DOM element IDs.
Co-authored-by: renemadsen <[email protected]>
Update WDIO tests for action menu-based plugin activation
Based on reference PR microting/eform-angular-workflow-plugin#1167, this PR updates the plugin activation tests to use the new action menu interface instead of the old toggle method.
Changes completed:
application-settings.plugins-page.spec.tsto use action menu for plugin activationplugin.enableOrDisablePlugin()with action menu clicks$('#action-items-X').$('#actionMenu')to open action menu$('#plugin-status-buttonX')within menu$('#pluginOKBtn')$from@wdio/globalsindex - 1for HTML element selectors (0-indexed)Key changes implemented:
$from@wdio/globalsactivatePlugin()helper function that:$('#action-items-{index - 1}').$('#actionMenu')$('#plugin-status-button{index - 1}')checkPluginStatus()helper function that:$('#action-items-{index - 1}').$('#actionMenu')$('#plugin-status-button{index - 1}')index - 1to account for 0-based indexing in DOMIndex mapping explanation:
getPluginRowObjByIndex()uses 1-based indexing (starts at 1)Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.