Skip to content

Conversation

@ArtyomSavchenko
Copy link
Member

  1. [QMS] › tests/documents/ES-40.2.spec.ts:27:7 › login test › TESTS-397 - Wrong email and correct password: I cannot log in
Error: expect(locator).toContainText(expected) failed

Locator: getByText('Account not found or the provided credentials are incorrect')
Expected substring: "Account not found or the provided credentials are incorrect"
Timeout: 5000ms

Signed-off-by: Artem Savchenko <armisav@gmail.com>
@huly-github-staging
Copy link

Connected to Huly®: UBERF-14059

Copilot finished reviewing on behalf of ArtyomSavchenko November 14, 2025 06:48
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses flaky QMS login tests by implementing loading state management and adding a wait mechanism before button interaction. The changes introduce an isLoading flag to prevent form validation from interfering with the login process, and add a timeout in tests to ensure form validation completes.

  • Added isLoading state to LoginPasswordForm to track login progress
  • Modified Form validation to skip when isLoading is true
  • Added 1-second wait in test login method before checking button state

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
qms-tests/sanity/tests/model/login-page.ts Added a 1-second timeout before button interaction to allow form validation to complete
plugins/login-resources/src/components/LoginPasswordForm.svelte Introduced isLoading state with try-finally block to properly track login progress and pass to Form component
plugins/login-resources/src/components/Form.svelte Modified validation logic to skip validation when isLoading is true, preventing status changes during login

@ArtyomSavchenko ArtyomSavchenko merged commit 8459e7d into develop Nov 14, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants