@revoloo/cypress6
Version:
Cypress.io end to end testing tool
32 lines (27 loc) • 771 B
JavaScript
import _ from 'lodash'
import { computed, observable } from 'mobx'
export default class Spec {
path
name
absolute
displayName
// TODO clarify the role of "type" vs "specType"
type
specType // "integration" | "component"
isChosen = false
constructor ({ path, name, absolute, relative, displayName, type, specType }) {
this.path = path
this.name = name
this.absolute = absolute
this.relative = relative
this.displayName = displayName
this.type = type
this.specType = specType || 'integration'
}
get hasChildren () {
return false
}
get file () {
return _.pick(this, 'name', 'absolute', 'relative')
}
}