Page Menu
Home
Sealhub
Search
Configure Global Search
Log In
Files
F22420752
logout.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
logout.test.ts
View Options
import
type
{
Browser
,
BrowserContext
,
Page
}
from
"@playwright/test"
;
import
ADMIN_CREDENTIALS
from
"../default-admin-credentials.js"
;
import
{
getBrowser
}
from
"../test_utils/browser-creator.js"
;
import
{
LONG_TEST_TIMEOUT
}
from
"../test_utils/webhint.js"
;
import
{
withProdApp
}
from
"../test_utils/with-prod-app.js"
;
import
{
LogoutURL
,
SignInURL
}
from
"./urls.js"
;
describe
(
"Logout"
,
()
=>
{
let
page
:
Page
;
let
browser
:
Browser
;
let
context
:
BrowserContext
;
const
username
=
ADMIN_CREDENTIALS
.
username
;
const
password
=
ADMIN_CREDENTIALS
.
password
;
beforeEach
(
async
()
=>
{
browser
=
await
getBrowser
();
context
=
await
browser
.
newContext
();
page
=
await
context
.
newPage
();
});
afterEach
(
async
()
=>
{
await
context
.
close
();
});
describe
(
"logout test"
,
()
=>
{
it
(
"logout"
,
async
function
()
{
await
withProdApp
(
async
({
base_url
})
=>
{
await
page
.
goto
(
base_url
);
await
page
.
getByRole
(
"link"
,
{
name
:
"Sign in"
}).
click
();
await
page
.
getByPlaceholder
(
"text"
).
click
();
await
page
.
getByPlaceholder
(
"text"
).
fill
(
username
);
await
page
.
getByPlaceholder
(
"text"
).
press
(
"Tab"
);
await
page
.
getByPlaceholder
(
"password"
).
fill
(
password
);
await
page
.
getByPlaceholder
(
"password"
).
press
(
"Enter"
);
await
page
.
waitForSelector
(
`a[href="
${
LogoutURL
}
"]`
);
await
page
.
getByRole
(
"link"
,
{
name
:
"Logout"
}).
click
();
await
page
.
waitForSelector
(
`a[href="
${
SignInURL
}
"]`
);
});
}).
timeout
(
LONG_TEST_TIMEOUT
);
});
});
File Metadata
Details
Attached
Mime Type
application/javascript
Expires
Sat, Nov 28, 02:53 (1 d, 20 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1230105
Default Alt Text
logout.test.ts (1 KB)
Attached To
Mode
rPLAY Sealious playground
Attached
Detach File
Event Timeline