Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix flaky integration test for table with inline editing #113

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

pan-kot
Copy link
Member

@pan-kot pan-kot commented Jan 17, 2024

Fixed a flaky test, see description in comments.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@@ -43,7 +43,6 @@ export default class TableEditablePageObject extends TableFilteringPageObject {
const bodyCell = this.tableWrapper.findBodyCell(row, 4);
const input = bodyCell.findFormField().find('input');
await this.click(bodyCell.toSelector());
Copy link
Member Author

Choose a reason for hiding this comment

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

When the editable cell is clicked the input is auto-focused. A second click to the input is unnecessary and sometimes leads to the text cursor position change: it moves from behind the last symbol to the middle of the visible input area. That breaks the input cleanup code from below that relies on the cursor position.

@pan-kot pan-kot marked this pull request as ready for review January 17, 2024 17:28
@pan-kot pan-kot requested a review from a team as a code owner January 17, 2024 17:28
@pan-kot pan-kot requested review from Al-Dani and removed request for a team January 17, 2024 17:28
@pan-kot pan-kot merged commit afc80e1 into main Jan 18, 2024
1 check passed
@pan-kot pan-kot deleted the fix-flaky-integ-test branch January 18, 2024 10:14
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.

2 participants