From eae53cc75eb07f674b341993d7078774ec49ecb1 Mon Sep 17 00:00:00 2001 From: Pyry Koivisto Date: Thu, 29 Feb 2024 16:45:01 +0200 Subject: [PATCH] YKI(Frontend): Fix tests [deploy] --- frontend/packages/yki/src/redux/sagas/examSession.ts | 2 +- .../cypress/support/page-objects/publicRegistrationPage.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/packages/yki/src/redux/sagas/examSession.ts b/frontend/packages/yki/src/redux/sagas/examSession.ts index 8787729299..85dcd052e6 100644 --- a/frontend/packages/yki/src/redux/sagas/examSession.ts +++ b/frontend/packages/yki/src/redux/sagas/examSession.ts @@ -1,4 +1,4 @@ -import { call, delay, put, takeLatest } from '@redux-saga/core/effects'; +import { call, put, takeLatest } from '@redux-saga/core/effects'; import { PayloadAction } from '@reduxjs/toolkit'; import { AxiosResponse } from 'axios'; diff --git a/frontend/packages/yki/src/tests/cypress/support/page-objects/publicRegistrationPage.ts b/frontend/packages/yki/src/tests/cypress/support/page-objects/publicRegistrationPage.ts index 599b2c9a8b..05e89f93a1 100644 --- a/frontend/packages/yki/src/tests/cypress/support/page-objects/publicRegistrationPage.ts +++ b/frontend/packages/yki/src/tests/cypress/support/page-objects/publicRegistrationPage.ts @@ -13,7 +13,7 @@ class PublicRegistrationPage { cy.findByLabelText( 'Näytä vain kielitutkinnot, joihin voi ilmoittautua nyt', ), - searchButton: () => cy.contains('Hae'), + searchButton: () => cy.findByRole('button', { name: /Hae/ }), title: () => cy.findByTestId('public-registration-page__title-heading'), }; @@ -51,6 +51,7 @@ class PublicRegistrationPage { } search() { + this.elements.searchButton().should('not.be.disabled'); this.elements.searchButton().click(); }