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: result state after screenshot-accepter image accept #560

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

KuznetsovRoman
Copy link
Member

The idea is to calc new result state based on the latest result, not the current one

Comment on lines +176 to +179
const latestAttempt = reportBuilder.getLatestAttempt({
fullName: updateResult.fullTitle(),
browserId: updateResult.browserId
});
Copy link
Member Author

Choose a reason for hiding this comment

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

updateResult has TestplaneTestResult type.
Since reportBuilder is not currently tied to Testplane, im not bringing Testplane* to reportBuilder either.

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-105.fix_result_state branch from 7530a86 to 8a17382 Compare June 26, 2024 14:43

reportBuilder.getLatestAttempt.withArgs({fullName: 'some-title', browserId: 'yabro'}).returns(100500);
reportBuilder.getUpdatedReferenceTestStatus = (result) => {
return result.attempt === 100500 ? TestStatus.UPDATED : TestStatus.FAIL;
Copy link
Member

Choose a reason for hiding this comment

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

А зачем это условие? Можно же просто застабать getUpdatedReferenceTestStatus и при вызове его с 100500 возвращать необходимый статус

Copy link
Member Author

Choose a reason for hiding this comment

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

Действительно. Исправил.

@KuznetsovRoman KuznetsovRoman force-pushed the TESTPLANE-105.fix_result_state branch from 8a17382 to fa18026 Compare June 26, 2024 15:38
@KuznetsovRoman KuznetsovRoman merged commit 18effb5 into master Jun 26, 2024
4 checks passed
@KuznetsovRoman KuznetsovRoman deleted the TESTPLANE-105.fix_result_state branch June 26, 2024 15:47
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