Fix Hellcase Battles job
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 9m47s
Test, build and push image to registry / build-image (push) Successful in 17m1s

This commit is contained in:
2026-05-04 12:28:17 +02:00
parent 6b5381a768
commit 89641fe300
2 changed files with 3 additions and 5 deletions

View File

@@ -94,7 +94,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
sleep(5);
$battles = $browser->driver->findElements(WebDriverBy::xpath("//*[contains(@class, 'casebattle-table__item')]"));
$battles = $browser->driver->findElements(WebDriverBy::xpath("//*[contains(@class, '_base_vzctn_1')]"));
$battle = $battles[$battleIndex];
$battleIndex++;
$browser->scrollIntoView(".casebattle-table__item:nth-child(" . max($battleIndex -1, 1) . ")");
@@ -102,7 +102,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
$battleValue = floatval(
explode(
"\n",
$battle->findElement(WebDriverBy::xpath("./div/div[contains(@class, 'core-price')]"))->getDomProperty("innerText")
$battle->findElement(WebDriverBy::xpath("./span[contains(@class, '_price_11qqy_12')]"))->getDomProperty("innerText")
)[1]
);
@@ -111,7 +111,7 @@ class HellcaseBattlesJob extends HellcaseJob implements ShouldBeUniqueUntilProce
break;
}
$battleLinkButton = $battle->findElement(WebDriverBy::xpath("./div//button[.//*[text() = 'watch']]"));
$battleLinkButton = $battle->findElement(WebDriverBy::xpath(".//button[.//*[text() = 'watch']]"));
$battleLinkButton->sendKeys("\n");
sleep(3);
try { // If we still are on the casebattle page, it means the battle was cancelled or something else

View File

@@ -2,13 +2,11 @@
namespace App\Http\Controllers;
use App\Exception\JobException;
use App\Models\Job;
use App\Services\BrowserJobsInstances;
use Cache;
use Illuminate\Http\Request;
use Inertia\Inertia;
use App\Exception\JobTestException;
class JobController extends Controller
{