Skip to content

Commit 297c661

Browse files
committed
test: explicitly select specific test to avoid picking wrong one
1 parent 64d42d4 commit 297c661

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

cypress/e2e/results/main.cy.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ const expectedLinks = (mode, type) =>
138138
describe('Cucumber specific', () => {
139139
it('should contain data passed via tags', () => {
140140
const { cucumber } = result;
141-
const [test] = cucumber.tests;
142-
143-
console.log(test.labels);
141+
const expectedHistoryID = 'c700cb5cd10aa2ad9a8000c773a8fd3c';
142+
const [test] = cucumber.tests.filter(
143+
(t) => t.historyId === expectedHistoryID
144+
);
144145

145146
expect(test.labels).to.have.length(expectedLabels('cucumber').length);
146147
expect(test.labels).to.have.deep.members(expectedLabels('cucumber'));
@@ -150,7 +151,10 @@ describe('Cucumber specific', () => {
150151

151152
it('should contain cucumber steps', () => {
152153
const { cucumber } = result;
153-
const [test] = cucumber.tests;
154+
const expectedHistoryID = 'c700cb5cd10aa2ad9a8000c773a8fd3c';
155+
const [test] = cucumber.tests.filter(
156+
(t) => t.historyId === expectedHistoryID
157+
);
154158

155159
const expectedSteps = [
156160
{

0 commit comments

Comments
 (0)