Skip to content
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

PHP: caching QGIS Server metadata #5262

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion lizmap/composer.json
Original file line number Diff line number Diff line change
@@ -14,7 +14,8 @@
"proj4php/proj4php": "~2.0.0",
"violet/streaming-json-encoder": "^1.1.5",
"guzzlehttp/guzzle": "^7.7.0",
"halaxa/json-machine": "^1.1"
"halaxa/json-machine": "^1.1",
"kevinrob/guzzle-cache-middleware": "^6.0"
},
"minimum-stability": "stable",
"config": {
24 changes: 24 additions & 0 deletions lizmap/modules/lizmap/install/upgrade_requestscache.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

class lizmapModuleUpgrader_requestscache extends jInstallerModule
{
public $targetVersions = array(
'3.9.0-pre',
);
public $date = '2025-01-29';

public function install()
{
if ($this->firstExec('cacherequests')) {
$profiles = new \Jelix\IniFile\IniModifier(jApp::varConfigPath('profiles.ini.php'));
if (!$profiles->isSection('jcache:requests')) {
$profiles->setValues(array(
'enabled' => 1,
'driver' => 'file',
'ttl' => 0,
), 'jcache:requests');
$profiles->save();
}
}
}
}
17 changes: 17 additions & 0 deletions lizmap/modules/lizmap/lib/Request/Proxy.php
Original file line number Diff line number Diff line change
@@ -13,8 +13,11 @@
namespace Lizmap\Request;

use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\Psr7\Response;
use Kevinrob\GuzzleCache\CacheMiddleware;
use Kevinrob\GuzzleCache\Strategy;
use Lizmap\App;
use Psr\Http\Message\ResponseInterface;

@@ -385,10 +388,24 @@ protected static function sendRequest($url, $options)
$options['headers']['Referer'] = $options['referer'];
}

// Create request cache strategy
$strategy = new Strategy\Delegate\DelegatingCacheStrategy($defaultStrategy = new Strategy\NullCacheStrategy());
$lizmapServices = self::getServices();
$qgisServerUrl = $lizmapServices->getUrlLizmapQgisServerMetadata();
$strategy->registerRequestMatcher(
new QgisServerMetadataRequestMatcher($qgisServerUrl),
new Strategy\GreedyCacheStrategy(new RequestCacheStorage('requests')) // default TTL to 60 seconds
);
// Create request stack handler
$stack = HandlerStack::create();
$stack->push(new CacheMiddleware($strategy));

// Create Client
$client = new Client(array(
// You can set any number of default request options.
'timeout' => max(10.0, floatval(ini_get('max_execution_time')) - 5.0),
// Set stack handler
'handler' => $stack,
));

// Create request
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?php
/**
* QGIS Server metadata request matcher to cache response.
*
* @author 3liz
* @copyright 2025 3liz
*
* @see http://3liz.com
*
* @license Mozilla Public License : http://www.mozilla.org/MPL/
*/

namespace Lizmap\Request;

use Kevinrob\GuzzleCache\Strategy\Delegate\RequestMatcherInterface;
use Psr\Http\Message\RequestInterface;

class QgisServerMetadataRequestMatcher implements RequestMatcherInterface
{
/**
* The QGIS Server host.
*
* @var string
*/
protected $qgisServerHost;

/**
* The QGIS Server Metadata path.
*
* @var string
*/
protected $qgisServerMetadataPath;

/**
* @param string $qgisServerMetadataUrl The QGIS Server metadata URL - It could be provided by Lizmap Services
*/
public function __construct(string $qgisServerMetadataUrl)
{
$urlInfo = parse_url($qgisServerMetadataUrl);
$this->qgisServerHost = $urlInfo['host'] ?? 'localhost';
$this->qgisServerMetadataPath = $urlInfo['path'] ?? '';
}

/**
* @param RequestInterface $request
*
* @return bool
*/
public function matches($request)
{
return strpos($request->getUri()->getHost(), $this->qgisServerHost) !== false
&& strpos($request->getUri()->getPath(), $this->qgisServerMetadataPath) !== false;
}
}
97 changes: 97 additions & 0 deletions lizmap/modules/lizmap/lib/Request/RequestCacheStorage.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?php
/**
* Request cache storage to use in GuzzleCache with jCache.
*
* @author 3liz
* @copyright 2025 3liz
*
* @see http://3liz.com
*
* @license Mozilla Public License : http://www.mozilla.org/MPL/
*/

namespace Lizmap\Request;

use Kevinrob\GuzzleCache\CacheEntry;
use Kevinrob\GuzzleCache\Storage\CacheStorageInterface;

class RequestCacheStorage implements CacheStorageInterface
{
/**
* @var string jCache profile
*/
protected $profile;

/**
* @param string $profile the jCache profile
*/
public function __construct(string $profile)
{
$this->profile = $profile;
}

/**
* @param string $key
*
* @return null|CacheEntry the data or false
*/
public function fetch($key)
{
try {
$cache = unserialize(\jCache::get($key, $this->profile));
if ($cache instanceof CacheEntry) {
return $cache;
}
} catch (\Exception $ignored) {
\jLog::logEx($ignored, 'error');

return null;
}

return null;
}

/**
* @param string $key
* @param CacheEntry $data
*
* @return bool
*/
public function save($key, $data)
{
try {
$lifeTime = $data->getTTL();
if ($lifeTime === 0) {
return \jCache::set(
$key,
serialize($data),
null,
$this->profile
);
}
if ($lifeTime > 0) {
return \jCache::set(
$key,
serialize($data),
$lifeTime,
$this->profile
);
}
} catch (\Exception $ignored) {
// No fail if we can't save it the storage
\jLog::logEx($ignored, 'error');
}

return false;
}

/**
* @param string $key
*
* @return bool
*/
public function delete($key)
{
return \jCache::delete($key, $this->profile);
}
}
17 changes: 15 additions & 2 deletions lizmap/var/config/profiles.ini.php.dist
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ searchGroupBaseDN=""

; name of the default profil to use for cache
default=lizmap

; the other jcache could be : qgisprojects, acl2db, tiles, requests

[jcache:lizmap]
; disable or enable cache for this profile
@@ -139,8 +139,8 @@ cache_file_umask=

[jcache:qgisprojects]
enabled=1
driver=file
ttl=0
driver=file

;driver=redis_ext
; docker host
@@ -159,6 +159,19 @@ ttl=0
;ttl=0


[jcache:requests]
enabled=1
ttl=0
driver=file

;driver=redis_ext
; docker host
;host=redis
; local host
;host=127.0.0.1
;port=6379
;db=0

[smtp:mailer]
;; to send emails via smtp, uncomment these lines and indicate all needed values.
;; In localconfig.ini, set mailerType=smtp in the [mailer] section.
14 changes: 10 additions & 4 deletions tests/docker-conf/phpfpm/profiles.ini.php
Original file line number Diff line number Diff line change
@@ -145,22 +145,28 @@
;servers =

[jcache:qgisprojects]
;enabled=1
;ttl=0
;driver=file

enabled=1
ttl=0
driver=redis_ext
host=redis
port=6379
db=1

[jcache:acl2db]
enabled=1
ttl=0
driver=redis_ext
host=redis
port=6379
db=2

[jcache:requests]
enabled=1
ttl=0
driver=redis_ext
host=redis
port=6379
db=0

[webdav:default]
baseUri=http://webdav/
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?php

use PHPUnit\Framework\TestCase;
use GuzzleHttp\Psr7\Request;
use Lizmap\Request\QgisServerMetadataRequestMatcher;

class QgisServerMetadataRequestMatcherTest extends TestCase
{
public function testMapHost()
{
$matcher = new QgisServerMetadataRequestMatcher('http://map:8080/lizmap/server.json');
$request = new Request(
'GET',
'http://map:8080/lizmap/server.json',
);
$this->assertTrue($matcher->matches($request));

$request = new Request(
'GET',
'http://map:8080/ows/?SERVICE=WMS&REQUEST=Getcapabilities',
);
$this->assertFalse($matcher->matches($request));

$request = new Request(
'GET',
'http://localhost/qgis_mapserv.fcgi/lizmap/server.json',
);
$this->assertFalse($matcher->matches($request));
}

public function testLocalHost()
{
$matcher = new QgisServerMetadataRequestMatcher('http://localhost/qgis_mapserv.fcgi/lizmap/server.json');
$request = new Request(
'GET',
'http://localhost/qgis_mapserv.fcgi/lizmap/server.json',
);
$this->assertTrue($matcher->matches($request));

$request = new Request(
'GET',
'http://map:8080/lizmap/server.json',
);
$this->assertFalse($matcher->matches($request));

$request = new Request(
'GET',
'http://localhost/qgis_mapserv.fcgi?SERVICE=WMS&REQUEST=Getcapabilities',
);
$this->assertFalse($matcher->matches($request));
}
}

Unchanged files with check annotations Beta

buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}});
const bundeslanderByteLength = buffer.byteLength;
await expect(bundeslanderByteLength).toBeGreaterThan(blankByteLength);

Check failure on line 43 in tests/end2end/playwright/axis_orientation.spec.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/axis_orientation.spec.js:7:9 › Axis Orientation › Axis Orientation NEU for EPSG:3044

1) [end2end] › playwright/axis_orientation.spec.js:7:9 › Axis Orientation › Axis Orientation NEU for EPSG:3044 Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 41 | buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}}); 42 | const bundeslanderByteLength = buffer.byteLength; > 43 | await expect(bundeslanderByteLength).toBeGreaterThan(blankByteLength); | ^ 44 | 45 | // Catch GetTile request; 46 | let GetTiles = []; at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/axis_orientation.spec.js:43:46

Check failure on line 43 in tests/end2end/playwright/axis_orientation.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/axis_orientation.spec.js:7:9 › Axis Orientation › Axis Orientation NEU for EPSG:3044

2) [end2end] › playwright/axis_orientation.spec.js:7:9 › Axis Orientation › Axis Orientation NEU for EPSG:3044 Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 41 | buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}}); 42 | const bundeslanderByteLength = buffer.byteLength; > 43 | await expect(bundeslanderByteLength).toBeGreaterThan(blankByteLength); | ^ 44 | 45 | // Catch GetTile request; 46 | let GetTiles = []; at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/axis_orientation.spec.js:43:46
// Catch GetTile request;
let GetTiles = [];
buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}});
const judetByteLength = buffer.byteLength;
await expect(judetByteLength).toBeGreaterThan(blankByteLength);

Check failure on line 112 in tests/end2end/playwright/axis_orientation.spec.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/axis_orientation.spec.js:74:9 › Axis Orientation › Axis Orientation NEU for EPSG:3844

2) [end2end] › playwright/axis_orientation.spec.js:74:9 › Axis Orientation › Axis Orientation NEU for EPSG:3844 Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 110 | buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}}); 111 | const judetByteLength = buffer.byteLength; > 112 | await expect(judetByteLength).toBeGreaterThan(blankByteLength); | ^ 113 | 114 | // Catch GetTile request; 115 | let GetTiles = []; at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/axis_orientation.spec.js:112:39

Check failure on line 112 in tests/end2end/playwright/axis_orientation.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/axis_orientation.spec.js:74:9 › Axis Orientation › Axis Orientation NEU for EPSG:3844

3) [end2end] › playwright/axis_orientation.spec.js:74:9 › Axis Orientation › Axis Orientation NEU for EPSG:3844 Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 110 | buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}}); 111 | const judetByteLength = buffer.byteLength; > 112 | await expect(judetByteLength).toBeGreaterThan(blankByteLength); | ^ 113 | 114 | // Catch GetTile request; 115 | let GetTiles = []; at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/axis_orientation.spec.js:112:39
// Catch GetTile request;
let GetTiles = [];
buffer = await page.screenshot({clip:{x:950/2-380/2, y:600/2-380/2, width:380, height:380}});
const initialByteLength = buffer.byteLength;
// Greater than blank
await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

3) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

1) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

1) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

1) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

1) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41

Check failure on line 45 in tests/end2end/playwright/base-layers.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales

1) [end2end] › playwright/base-layers.spec.js:21:9 › Base layers › Native EPSG:3857 Scales ─────── Retry #2 ─────────────────────────────────────────────────────────────────────────────────────── Error: expect(received).toBeGreaterThan(expected) Expected: > 1286 Received: 1286 43 | const initialByteLength = buffer.byteLength; 44 | // Greater than blank > 45 | await expect(initialByteLength).toBeGreaterThan(blankByteLength); // 19648 | ^ 46 | 47 | getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/); 48 | await page.locator('#navbar button.btn.zoom-in').click(); at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/base-layers.spec.js:45:41
getMapRequestPromise = page.waitForRequest(/REQUEST=GetMap/);
await page.locator('#navbar button.btn.zoom-in').click();
import { test as setup } from '@playwright/test';

Check failure on line 1 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Test timeout of 30000ms exceeded.

Check failure on line 1 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Test timeout of 30000ms exceeded.

Check failure on line 1 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Test timeout of 30000ms exceeded.
// @ts-ignore
import path from 'path';
import { Page } from '@playwright/test';
export async function auth_using_login(page: Page, login: string, password: string, user_file: string) {
// Perform authentication steps. Replace these actions with your own.
await page.goto('admin.php/auth/login?auth_url_return=%2Findex.php');
await page.locator('#jforms_jcommunity_login_auth_login').fill(login);

Check failure on line 17 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Error: locator.fill: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#jforms_jcommunity_login_auth_login') 15 | // Perform authentication steps. Replace these actions with your own. 16 | await page.goto('admin.php/auth/login?auth_url_return=%2Findex.php'); > 17 | await page.locator('#jforms_jcommunity_login_auth_login').fill(login); | ^ 18 | await page.locator('#jforms_jcommunity_login_auth_password').fill(password); 19 | await page.getByRole('button', { name: 'Sign in' }).click(); 20 | // Wait until the page receives the cookies. at auth_using_login (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:17:61) at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:30:3

Check failure on line 17 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Error: locator.fill: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#jforms_jcommunity_login_auth_login') 15 | // Perform authentication steps. Replace these actions with your own. 16 | await page.goto('admin.php/auth/login?auth_url_return=%2Findex.php'); > 17 | await page.locator('#jforms_jcommunity_login_auth_login').fill(login); | ^ 18 | await page.locator('#jforms_jcommunity_login_auth_password').fill(password); 19 | await page.getByRole('button', { name: 'Sign in' }).click(); 20 | // Wait until the page receives the cookies. at auth_using_login (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:17:61) at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:30:3

Check failure on line 17 in tests/end2end/playwright/auth.setup.ts

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a

1) [setup] › playwright/auth.setup.ts:29:6 › authenticate as user_in_group_a ───────────────────── Error: locator.fill: Test timeout of 30000ms exceeded. Call log: - waiting for locator('#jforms_jcommunity_login_auth_login') 15 | // Perform authentication steps. Replace these actions with your own. 16 | await page.goto('admin.php/auth/login?auth_url_return=%2Findex.php'); > 17 | await page.locator('#jforms_jcommunity_login_auth_login').fill(login); | ^ 18 | await page.locator('#jforms_jcommunity_login_auth_password').fill(password); 19 | await page.getByRole('button', { name: 'Sign in' }).click(); 20 | // Wait until the page receives the cookies. at auth_using_login (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:17:61) at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/auth.setup.ts:30:3
await page.locator('#jforms_jcommunity_login_auth_password').fill(password);
await page.getByRole('button', { name: 'Sign in' }).click();
// Wait until the page receives the cookies.
// @ts-check

Check failure on line 1 in tests/end2end/playwright/popup.spec.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com

2) [end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com Test timeout of 30000ms exceeded.

Check failure on line 1 in tests/end2end/playwright/popup.spec.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com

2) [end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com Test timeout of 30000ms exceeded.
import { test, expect } from '@playwright/test';
import { gotoMap } from './globals';
import {ProjectPage} from "./pages/project";
if (mapMustLoad) {
if (waitForGetLegendGraphics) {
// Wait for WMS GetLegendGraphic promise
const getLegendGraphicPromise = page.waitForRequest(request => request.method() === 'POST' && request.postData() != null && request.postData()?.includes('GetLegendGraphic') === true);

Check failure on line 64 in tests/end2end/playwright/globals.js

GitHub Actions / E2E QGIS 3.40 PG 17-3 PHP 8.3

[end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com

2) [end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com Error: page.waitForRequest: Test timeout of 30000ms exceeded. at globals.js:64 62 | if (waitForGetLegendGraphics) { 63 | // Wait for WMS GetLegendGraphic promise > 64 | const getLegendGraphicPromise = page.waitForRequest(request => request.method() === 'POST' && request.postData() != null && request.postData()?.includes('GetLegendGraphic') === true); | ^ 65 | // Normal check about the map 66 | // Wait for WMS GetLegendGraphic 67 | await getLegendGraphicPromise; at gotoMap (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/globals.js:64:50) at ProjectPage.open (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/pages/project.js:141:9) at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/popup.spec.js:236:9

Check failure on line 64 in tests/end2end/playwright/globals.js

GitHub Actions / E2E QGIS 3.34 PG 14-3 PHP 8.1

[end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com

2) [end2end] › playwright/popup.spec.js:234:9 › Raster identify › Raster identify check with data-attributes @readonly @lizmap.com Error: page.waitForRequest: Test timeout of 30000ms exceeded. at globals.js:64 62 | if (waitForGetLegendGraphics) { 63 | // Wait for WMS GetLegendGraphic promise > 64 | const getLegendGraphicPromise = page.waitForRequest(request => request.method() === 'POST' && request.postData() != null && request.postData()?.includes('GetLegendGraphic') === true); | ^ 65 | // Normal check about the map 66 | // Wait for WMS GetLegendGraphic 67 | await getLegendGraphicPromise; at gotoMap (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/globals.js:64:50) at ProjectPage.open (/home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/pages/project.js:141:9) at /home/runner/work/lizmap-web-client/lizmap-web-client/tests/end2end/playwright/popup.spec.js:236:9
// Normal check about the map
// Wait for WMS GetLegendGraphic
await getLegendGraphicPromise;