fix: test suggestions when skip exp + only test (#10090)
This commit is contained in:
parent
1b125094b9
commit
f6ae5764f7
@ -144,6 +144,18 @@ export function getExpectationUpdates(
|
||||
pass
|
||||
);
|
||||
if (expectationEntry && !expectationEntry.expectations.includes('PASS')) {
|
||||
if (isWildCardPattern(expectationEntry.testIdPattern)) {
|
||||
addEntry({
|
||||
expectation: {
|
||||
testIdPattern: getTestId(pass.file, pass.fullTitle),
|
||||
platforms: context.platforms,
|
||||
parameters: context.parameters,
|
||||
expectations: ['PASS'],
|
||||
},
|
||||
action: 'add',
|
||||
basedOn: expectationEntry,
|
||||
});
|
||||
} else {
|
||||
addEntry({
|
||||
expectation: expectationEntry,
|
||||
action: 'remove',
|
||||
@ -151,6 +163,7 @@ export function getExpectationUpdates(
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (const failure of results.failures) {
|
||||
// If an error occurs during a hook
|
||||
@ -163,7 +176,7 @@ export function getExpectationUpdates(
|
||||
expectations,
|
||||
failure
|
||||
);
|
||||
if (expectationEntry) {
|
||||
if (expectationEntry && !expectationEntry.expectations.includes('SKIP')) {
|
||||
if (
|
||||
!expectationEntry.expectations.includes(
|
||||
getTestResultForFailure(failure)
|
||||
@ -197,7 +210,7 @@ export function getExpectationUpdates(
|
||||
});
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (!expectationEntry) {
|
||||
addEntry({
|
||||
expectation: {
|
||||
testIdPattern: getTestId(failure.file, failure.fullTitle),
|
||||
@ -206,7 +219,6 @@ export function getExpectationUpdates(
|
||||
expectations: [getTestResultForFailure(failure)],
|
||||
},
|
||||
action: 'add',
|
||||
basedOn: expectationEntry,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user