-
Notifications
You must be signed in to change notification settings - Fork 39
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: pwt static image accepter #596
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import {get, pick, set, uniq, isEmpty} from 'lodash'; | ||
import {EXPAND_ALL, EXPAND_ERRORS, EXPAND_RETRIES} from '../../../../constants/expand-modes'; | ||
import {ensureDiffProperty, getUpdatedProperty} from '../../utils/state'; | ||
import {determineFinalStatus, determineStatus, isAssertViewError, isUpdatedStatus} from '../../../../common-utils'; | ||
import {determineFinalStatus, determineStatus, isImageError, isUpdatedStatus} from '../../../../common-utils'; | ||
import {updateParentSuitesStatus, calcSuitesShowness, calcSuitesOpenness} from './nodes/suites'; | ||
import {calcBrowsersShowness, calcBrowsersOpenness} from './nodes/browsers'; | ||
import {changeImageStatus, calcImagesOpenness} from './nodes/images'; | ||
|
@@ -110,9 +110,9 @@ export function updateImagesStatus({tree, view, images, imageIdsArray, newStatus | |
.map(imageId => getUpdatedProperty(tree, diff, ['images', 'byId', imageId, 'status'])); | ||
|
||
const finalStatus = determineFinalStatus(imageStatuses); | ||
const trueResultStatus = isAssertViewError(result.error) && finalStatus === ERROR ? FAIL : finalStatus; | ||
const trueResultStatus = isImageError(result.error) && finalStatus === ERROR ? FAIL : finalStatus; | ||
|
||
if (isAssertViewError(result.error) && trueResultStatus !== result.status) { | ||
if (isImageError(result.error) && trueResultStatus !== result.status) { | ||
Comment on lines
+113
to
+115
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Testplane, we have a contract: if test result has image errors, test result has "AssertViewError", and images can have either In Playwright adapter, though, we can have |
||
browserIds.push(result.parentId); | ||
changeNodeState(tree.results.byId, resultId, {status: trueResultStatus}, diff.results.byId); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't want to pollute
ImageFile
type, which is used in Testplane and generally has no guaranteed "relativePath" property