mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
fix: test suggestions when skip exp + only test (#10090)
This commit is contained in:
parent
1b125094b9
commit
f6ae5764f7
@ -144,11 +144,24 @@ export function getExpectationUpdates(
|
|||||||
pass
|
pass
|
||||||
);
|
);
|
||||||
if (expectationEntry && !expectationEntry.expectations.includes('PASS')) {
|
if (expectationEntry && !expectationEntry.expectations.includes('PASS')) {
|
||||||
addEntry({
|
if (isWildCardPattern(expectationEntry.testIdPattern)) {
|
||||||
expectation: expectationEntry,
|
addEntry({
|
||||||
action: 'remove',
|
expectation: {
|
||||||
basedOn: expectationEntry,
|
testIdPattern: getTestId(pass.file, pass.fullTitle),
|
||||||
});
|
platforms: context.platforms,
|
||||||
|
parameters: context.parameters,
|
||||||
|
expectations: ['PASS'],
|
||||||
|
},
|
||||||
|
action: 'add',
|
||||||
|
basedOn: expectationEntry,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
addEntry({
|
||||||
|
expectation: expectationEntry,
|
||||||
|
action: 'remove',
|
||||||
|
basedOn: expectationEntry,
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,7 +176,7 @@ export function getExpectationUpdates(
|
|||||||
expectations,
|
expectations,
|
||||||
failure
|
failure
|
||||||
);
|
);
|
||||||
if (expectationEntry) {
|
if (expectationEntry && !expectationEntry.expectations.includes('SKIP')) {
|
||||||
if (
|
if (
|
||||||
!expectationEntry.expectations.includes(
|
!expectationEntry.expectations.includes(
|
||||||
getTestResultForFailure(failure)
|
getTestResultForFailure(failure)
|
||||||
@ -197,7 +210,7 @@ export function getExpectationUpdates(
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!expectationEntry) {
|
||||||
addEntry({
|
addEntry({
|
||||||
expectation: {
|
expectation: {
|
||||||
testIdPattern: getTestId(failure.file, failure.fullTitle),
|
testIdPattern: getTestId(failure.file, failure.fullTitle),
|
||||||
@ -206,7 +219,6 @@ export function getExpectationUpdates(
|
|||||||
expectations: [getTestResultForFailure(failure)],
|
expectations: [getTestResultForFailure(failure)],
|
||||||
},
|
},
|
||||||
action: 'add',
|
action: 'add',
|
||||||
basedOn: expectationEntry,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user