From e1a217ffa0a7b4122b93a6e4268552957ed26f83 Mon Sep 17 00:00:00 2001 From: Georg krause Date: Mon, 12 Jun 2023 08:08:36 +0200 Subject: [PATCH] style: Fix linting errors Part-of: --- front/cypress/e2e/favorite.cy.ts | 1 - front/cypress/e2e/login.cy.ts | 4 ++-- front/cypress/support/commands.ts | 8 ++++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/front/cypress/e2e/favorite.cy.ts b/front/cypress/e2e/favorite.cy.ts index 04a6f605e..834334bc2 100644 --- a/front/cypress/e2e/favorite.cy.ts +++ b/front/cypress/e2e/favorite.cy.ts @@ -17,7 +17,6 @@ describe('Favorites', () => { $favButton.click() // In case everything worked the favorite button should be pink cy.wrap($favButton).should('have.class', 'pink') - }) cy.get('.favorite-icon.pink').then(($unfavButton) => { diff --git a/front/cypress/e2e/login.cy.ts b/front/cypress/e2e/login.cy.ts index 802008c5f..eb8a96d50 100644 --- a/front/cypress/e2e/login.cy.ts +++ b/front/cypress/e2e/login.cy.ts @@ -2,8 +2,8 @@ describe('The login', () => { it('is working with UI', () => { cy.fixture('testuser.json').then((user) => { cy.visit('/login') - cy.get('input[name=username]').type(user['username']) - cy.get('input[name=password]').type(`${user['password']}{enter}`) + cy.get('input[name=username]').type(user.username) + cy.get('input[name=password]').type(`${user.password}{enter}`) }) cy.url().should('include', '/library') diff --git a/front/cypress/support/commands.ts b/front/cypress/support/commands.ts index 0476c3ceb..d1abd2e0c 100644 --- a/front/cypress/support/commands.ts +++ b/front/cypress/support/commands.ts @@ -2,8 +2,8 @@ // graphical login until the vue3 branch is merged Cypress.Commands.add('login', () => { cy.fixture('testuser.json').then((user) => { - var username = user["username"] - var password = user["password"] + const username = user.username + const password = user.password cy.visit('/login') cy.wait(1000) cy.getCookie('csrftoken').then(($cookie) => { @@ -15,12 +15,12 @@ Cypress.Commands.add('login', () => { form: true, headers: { 'X-CSRFTOKEN': csrfToken, - Referer: Cypress.config().baseUrl + '/login', + Referer: Cypress.config().baseUrl + '/login' }, body: { username, password - }, + } }) }) })