fix: cypress selector (#753)

This commit is contained in:
Dominik Pschenitschni 2025-05-13 12:51:11 +02:00 committed by GitHub
parent d422d78496
commit 4937127898
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 11 additions and 7 deletions

View File

@ -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')
})

View File

@ -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)

View File

@ -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')

View File

@ -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(() => {