Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22397427
metrics.test.ts
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
metrics.test.ts
View Options
import
{
withProdApp
}
from
"../test_utils/with-prod-app.js"
;
import
{
VERY_LONG_TEST_TIMEOUT
,
webhintURL
}
from
"../test_utils/webhint.js"
;
import
{
MetricsURL
}
from
"./urls.js"
;
import
{
getBrowser
}
from
"../test_utils/browser-creator.js"
;
import
type
{
Browser
,
BrowserContext
,
Page
}
from
"@playwright/test"
;
describe
(
"Metrics webhint"
,
()
=>
{
it
(
"doesn't crash"
,
async
function
()
{
return
withProdApp
(
async
({
base_url
,
rest_api
})
=>
{
await
rest_api
.
get
(
MetricsURL
);
await
webhintURL
(
base_url
+
MetricsURL
);
// alternatively you can use webhintHTML for faster but less precise scans
// or for scanning responses of requests that use some form of authorization:
// const response = await rest_api.get(MetricsURL);
// await webhintHTML(response);
});
}).
timeout
(
VERY_LONG_TEST_TIMEOUT
);
});
describe
(
"Metrics"
,
()
=>
{
let
page
:
Page
;
let
browser
:
Browser
;
let
context
:
BrowserContext
;
beforeEach
(
async
()
=>
{
browser
=
await
getBrowser
();
context
=
await
browser
.
newContext
();
page
=
await
context
.
newPage
();
});
afterEach
(
async
()
=>
{
await
context
.
close
();
});
it
(
"works as expected"
,
async
function
()
{
return
withProdApp
(
async
({
base_url
})
=>
{
await
page
.
goto
(
base_url
+
MetricsURL
);
});
}).
timeout
(
VERY_LONG_TEST_TIMEOUT
);
});
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Fri, Nov 27, 17:10 (1 d, 14 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1224605
Default Alt Text
metrics.test.ts (1 KB)
Attached To
Mode
rAPROXY Assetproxy
Attached
Detach File
Event Timeline