mirror of
https://github.com/Crocmagnon/charasheet.git
synced 2024-12-04 12:13:38 +01:00
fix warnings
This commit is contained in:
parent
cae57be617
commit
c0c1276a09
6 changed files with 10 additions and 7 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -40,3 +40,4 @@ dashboard_templates/backup_*.zip
|
|||
character.json
|
||||
.direnv/
|
||||
.venv/
|
||||
node_modules
|
||||
|
|
|
@ -28,7 +28,7 @@ class Command(BaseCommand):
|
|||
icon_url = state_row.find_element(
|
||||
By.CSS_SELECTOR,
|
||||
".views-field-field-svg-icon img",
|
||||
).get_attribute("src")
|
||||
).get_dom_attribute("src")
|
||||
state, _ = HarmfulState.objects.update_or_create(
|
||||
name=name,
|
||||
defaults={"description": description, "url": url, "icon_url": icon_url},
|
||||
|
|
|
@ -19,7 +19,7 @@ class Command(BaseCommand):
|
|||
By.CSS_SELECTOR,
|
||||
".card-body .card-title a",
|
||||
)
|
||||
urls = [anchor.get_attribute("href") for anchor in anchors]
|
||||
urls = [anchor.get_dom_attribute("href") for anchor in anchors]
|
||||
for url in urls:
|
||||
try:
|
||||
self.import_path(url)
|
||||
|
|
|
@ -12,7 +12,7 @@ class Command(BaseCommand):
|
|||
self.setup_selenium()
|
||||
self.selenium.get(url)
|
||||
anchors = self.selenium.find_elements(By.CSS_SELECTOR, ".card-img-top a")
|
||||
urls = [anchor.get_attribute("href") for anchor in anchors]
|
||||
urls = [anchor.get_dom_attribute("href") for anchor in anchors]
|
||||
for url in urls:
|
||||
try:
|
||||
self.import_profile(url)
|
||||
|
|
|
@ -11,7 +11,7 @@ class Command(BaseCommand):
|
|||
self.setup_selenium()
|
||||
self.selenium.get(url)
|
||||
anchors = self.selenium.find_elements(By.CSS_SELECTOR, "h2 a")
|
||||
urls = [anchor.get_attribute("href") for anchor in anchors]
|
||||
urls = [anchor.get_dom_attribute("href") for anchor in anchors]
|
||||
for url in urls:
|
||||
try:
|
||||
self.import_race(url)
|
||||
|
|
|
@ -79,10 +79,12 @@ def test_pet_happy_path(selenium: WebDriver, live_server: LiveServer):
|
|||
# I have the same form as previously, pre-filled with the current values of my pet.
|
||||
selenium.find_element(By.CSS_SELECTOR, f".pet[data-id='{pet.pk}'] .edit").click()
|
||||
pet_name = selenium.find_element(By.ID, "id_name")
|
||||
assert pet_name.get_attribute("value") == "My pet"
|
||||
assert selenium.find_element(By.ID, "id_health_max").get_attribute("value") == "10"
|
||||
assert pet_name.get_dom_attribute("value") == "My pet"
|
||||
assert (
|
||||
selenium.find_element(By.ID, "id_health_remaining").get_attribute("value")
|
||||
selenium.find_element(By.ID, "id_health_max").get_dom_attribute("value") == "10"
|
||||
)
|
||||
assert (
|
||||
selenium.find_element(By.ID, "id_health_remaining").get_dom_attribute("value")
|
||||
== "9"
|
||||
)
|
||||
pet_name.clear()
|
||||
|
|
Loading…
Reference in a new issue