Conversation
| 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.
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.
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.
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.
Function template_create_group_by_status refactored with the following changes:
- Use f-string instead of string concatenation [×3] (
use-fstring-for-concatenation)
functional/test_00001_dashboard.py
Outdated
| 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.
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.
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.
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.
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.
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.
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
mainrefactored 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
mainbranch, then run:Help us improve this pull request!