-
Notifications
You must be signed in to change notification settings - Fork 1
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
Sourcery refactored main branch #1
base: main
Are you sure you want to change the base?
Conversation
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.
Due to GitHub API limits, only the first 60 comments can be shown.
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=main&action=default") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=main&action=default" | ||
) |
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.
Function medulla_connect
refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=users&action=add") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=users&action=add" | ||
) |
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.
Function test_dashboard_createuser
refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=groups&action=add") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=groups&action=add" | ||
) |
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.
Function test_dashboard_creategroup
refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation
)
page.fill("//html/body/div/div[4]/div/form/table/tbody/tr[1]/td[3]/input", "Group Created by playwright By Dashboard " + group_name) | ||
page.fill( | ||
"//html/body/div/div[4]/div/form/table/tbody/tr[1]/td[3]/input", | ||
f"Group Created by playwright By Dashboard {group_name}", | ||
) | ||
|
||
page.click(".btnPrimary[type='submit']") | ||
|
||
result_on_server = sqlcheck("dyngroup", "SELECT count(*) from Groups WHERE name = 'Group Created by playwright By Dashboard " + group_name + "'") | ||
result_on_server = sqlcheck( | ||
"dyngroup", | ||
f"SELECT count(*) from Groups WHERE name = 'Group Created by playwright By Dashboard {group_name}'", | ||
) |
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.
Function template_create_group_by_status
refactored with the following changes:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation
)
status = sqlcheck("xmppmaster", "SELECT status FROM uptime_machine WHERE hostname = '" + machineName + "' ORDER BY id DESC LIMIT 1") | ||
status = sqlcheck( | ||
"xmppmaster", | ||
f"SELECT status FROM uptime_machine WHERE hostname = '{machineName}' ORDER BY id DESC LIMIT 1", | ||
) |
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.
Function test_create_groupe_by_dashboard_machine_online
refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=users&action=index") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=users&action=index" | ||
) | ||
page.click(id_code + test_user + ' .delete a') | ||
page.click('#delfiles') | ||
page.click(".btnPrimary[type='submit']") | ||
|
||
# Testing if the popup is from the alert-success class and if it has the right text | ||
locator = page.locator('#__popup_container .alert.alert-success') | ||
expect(locator).to_have_text('User ' + test_user + ' has been successfully deleted') | ||
expect(locator).to_have_text(f'User {test_user} has been successfully deleted') |
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.
Function test_delete_users
refactored with the following changes:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=machinesList") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=machinesList" | ||
) |
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.
Function test_open_inventory
refactored with the following changes:
- Use f-string instead of string concatenation (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=machinesList") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=machinesList" | ||
) | ||
|
||
page.click('#listFavourite') | ||
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=listFavourite") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=listFavourite" | ||
) |
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.
Function test_open_favouriteGroup
refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=machinesList") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=machinesList" | ||
) | ||
|
||
page.click('#list') | ||
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=list") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=list" | ||
) |
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.
Function test_open_AllGroups
refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation
)
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=machinesList") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=machinesList" | ||
) | ||
|
||
page.click('#computersgroupcreator') | ||
expect(page).to_have_url(test_server + "/mmc/main.php?module=base&submod=computers&action=computersgroupcreator") | ||
expect(page).to_have_url( | ||
f"{test_server}/mmc/main.php?module=base&submod=computers&action=computersgroupcreator" | ||
) |
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.
Function test_open_CreateGroups
refactored with the following changes:
- Use f-string instead of string concatenation [×2] (
use-fstring-for-concatenation
)
Sourcery Code Quality Report❌ Merging this PR will decrease code quality in the affected files by 0.25%.
Here are some functions in these files that still need a tune-up:
Legend and ExplanationThe emojis denote the absolute quality of the code:
The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request. Please see our documentation here for details on how these metrics are calculated. We are actively working on this report - lots more documentation and extra metrics to come! Help us improve this quality report! |
Branch
main
refactored by Sourcery.If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
main
branch, then run:Help us improve this pull request!