refactor: Improve login test to handle missing user credentials

This commit is contained in:
Simon Larsen 2024-06-13 21:11:54 +01:00
parent f42291a428
commit 57f41a908a
No known key found for this signature in database
GPG Key ID: 96C5DCA24769DBCA

View File

@ -9,7 +9,11 @@ import URL from 'Common/Types/API/URL';
test.describe('Login', () => {
test('should be able to login', async ({ page }: { page: Page }) => {
if (!IS_USER_REGISTERED || !REGISTERED_USER_EMAIL || !REGISTERED_USER_PASSWORD) {
if (
!IS_USER_REGISTERED ||
!REGISTERED_USER_EMAIL ||
!REGISTERED_USER_PASSWORD
) {
// pass this test if the user is not registered
return;
}