bahmutov / bahmutov/effective-e2e-testing-with-cypress

Two describe blocks execute despite .only

Open
#1 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
2
Forks
0
PR merge metrics
No merged PRs in 30d

Description

In branch https://github.com/bahmutov/effective-e2e-testing-with-cypress/tree/double-only

when I have in `cypress/integration/todo-spec.js` two describe blocks with one having `.only` both run.
```js
describe.only('main features', function () {
it('first spec', function () {})
})

describe('main features with assertions', function () {
it('second spec', function () {})
})
```
The above should execute only "main features" but Cypress 0.20.0 has
screen shot 2017-09-11 at 4 38 33 pm
Here is the code bundled
```js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the case in cypress/integration/todo-spec.js using Cypress 0.20.0, first with the two original describe titles and then with the modified titles. Compare which blocks execute and investigate how .only selection handles describe titles; done means only the focused block runs regardless of title overlap.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, javascript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.