Skip to content

test: improve test coverage for value commit scenarios - #6429

Merged
vursen merged 7 commits into
mainfrom
test/number-field/value-commit-tests
Sep 13, 2023
Merged

vursen merged 7 commits into
mainfrom
test/number-field/value-commit-tests

Conversation

@vursen

@vursen vursen commented Aug 30, 2023 •

Copy link
Copy Markdown
Contributor

Description

The idea is to create a test file that would collect all the tests related to the user committing a value. Currently, such tests are scattered across different places, making it difficult to know what might cause the value to change and feel confident about the test coverage when refactoring something.

The new tests aim to cover all main scenarios where the user commits a value using actions like blur, Enter.

Depends on

Part of #6426

Type of change

  • Internal

expect(numberField.inputElement.validity.badInput).to.be.true;
});

it('should not commit but validate on Enter', async () => {

@vursen vursen Aug 30, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test fails due to a missing Enter handler for handling bad input: #5113

@vursen vursen Sep 13, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After an internal discussion, we've decided to skip this test for now. The issue will be fixed later.

expectValidationOnly();
});

it('should not commit but validate on Enter', async () => {

@vursen vursen Aug 30, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test fails due to a missing Enter handler for handling bad input: #5113

@vursen vursen Sep 13, 2023 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

After an internal discussion, we've decided to skip this test for now. The issue will be fixed later.

@vursen vursen changed the title test: improve test coverage of value commit scenarios test: improve test coverage for value commit scenarios Sep 1, 2023
@vursen
vursen force-pushed the test/number-field/value-commit-tests branch from 1c46ae6 to 4e3286c Compare September 13, 2023 10:18
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@vaadin-bot

Copy link
Copy Markdown
Collaborator

This ticket/PR has been released with Vaadin 24.2.0.alpha11 and is also targeting the upcoming stable 24.2.0 version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants