fix: cypress selector (#753)
This commit is contained in:
parent
d422d78496
commit
4937127898
|
|
@ -68,7 +68,7 @@ describe('Project View List', () => {
|
|||
|
||||
cy.get('.project-title-wrapper .icon')
|
||||
.should('not.exist')
|
||||
cy.get('input.input[placeholder="Add a task..."')
|
||||
cy.get('input.input[placeholder="Add a task…"]')
|
||||
.should('not.exist')
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {createProjects} from '../project/prepareProjects'
|
|||
function prepareLinkShare() {
|
||||
const projects = createProjects()
|
||||
const tasks = TaskFactory.create(10, {
|
||||
project_id: projects[0].id
|
||||
project_id: projects[0].id,
|
||||
})
|
||||
const linkShares = LinkShareFactory.create(1, {
|
||||
project_id: projects[0].id,
|
||||
|
|
@ -27,7 +27,7 @@ describe('Link shares', () => {
|
|||
|
||||
cy.get('h1.title')
|
||||
.should('contain', project.title)
|
||||
cy.get('input.input[placeholder="Add a task..."')
|
||||
cy.get('input.input[placeholder="Add a task…"]')
|
||||
.should('not.exist')
|
||||
cy.get('.tasks')
|
||||
.should('contain', tasks[0].title)
|
||||
|
|
@ -42,7 +42,7 @@ describe('Link shares', () => {
|
|||
|
||||
cy.get('h1.title')
|
||||
.should('contain', project.title)
|
||||
cy.get('input.input[placeholder="Add a task..."')
|
||||
cy.get('input.input[placeholder="Add a task…"]')
|
||||
.should('not.exist')
|
||||
cy.get('.tasks')
|
||||
.should('contain', tasks[0].title)
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ describe('Task', () => {
|
|||
|
||||
it('Should be created new', () => {
|
||||
cy.visit('/projects/1/1')
|
||||
cy.get('.input[placeholder="Add a task…"')
|
||||
cy.get('.input[placeholder="Add a task…"]')
|
||||
.type('New Task')
|
||||
cy.get('.button')
|
||||
.contains('Add')
|
||||
|
|
@ -81,7 +81,7 @@ describe('Task', () => {
|
|||
cy.visit('/projects/1/1')
|
||||
cy.get('.project-is-empty-notice')
|
||||
.should('not.exist')
|
||||
cy.get('.input[placeholder="Add a task…"')
|
||||
cy.get('.input[placeholder="Add a task…"]')
|
||||
.type('New Task')
|
||||
cy.get('.button')
|
||||
.contains('Add')
|
||||
|
|
|
|||
|
|
@ -21,10 +21,14 @@ export function login(user, cacheAcrossSpecs = false) {
|
|||
})
|
||||
}
|
||||
|
||||
export function createFakeUser() {
|
||||
return UserFactory.create(1)[0]
|
||||
}
|
||||
|
||||
export function createFakeUserAndLogin() {
|
||||
let user
|
||||
before(() => {
|
||||
user = UserFactory.create(1)[0]
|
||||
user = createFakeUser()
|
||||
})
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue