bahmutov / bahmutov/effective-e2e-testing-with-cypress
Two describe blocks execute despite .only
- 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
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