From f4c81a1348f31ac241d651b093556ac2de4cc327 Mon Sep 17 00:00:00 2001 From: Yanick Minder Date: Thu, 7 Nov 2024 11:38:56 +0100 Subject: [PATCH] set type delay gloabl and remove manual set --- frontend/cypress/e2e/checkIn.cy.ts | 10 ++--- frontend/cypress/e2e/crud.cy.ts | 2 +- frontend/cypress/e2e/duplicated-scoring.cy.ts | 4 +- frontend/cypress/e2e/keyresult.cy.ts | 36 ++++++++--------- frontend/cypress/e2e/objective-backlog.cy.ts | 6 +-- frontend/cypress/e2e/objective.cy.ts | 8 ++-- frontend/cypress/e2e/scoring.cy.ts | 10 ++--- frontend/cypress/e2e/tab.cy.ts | 4 +- frontend/cypress/e2e/teammanagement.cy.ts | 22 +++++----- frontend/cypress/support/commands.ts | 40 +++++++++---------- frontend/cypress/support/e2e.ts | 4 ++ 11 files changed, 73 insertions(+), 73 deletions(-) diff --git a/frontend/cypress/e2e/checkIn.cy.ts b/frontend/cypress/e2e/checkIn.cy.ts index 0d159c3faa..70c2c17a38 100644 --- a/frontend/cypress/e2e/checkIn.cy.ts +++ b/frontend/cypress/e2e/checkIn.cy.ts @@ -104,7 +104,7 @@ describe('OKR Check-in e2e tests', () => { cy.getByTestId('objective').first().getByTestId('add-keyResult').first().click(); cy.getByTestId('submit').should('be.disabled'); - cy.getByTestId('titleInput').type('Title', { delay: 0 }); + cy.getByTestId('titleInput').type('Title'); cy.getByTestId('ordinalTab').click(); cy.fillOutKeyResult( @@ -203,11 +203,11 @@ describe('OKR Check-in e2e tests', () => { cy.contains('CHF 30.-'); cy.contains('Confidence um Target Zone (CHF 213.-) zu erreichen'); cy.contains('5/10'); - cy.getByTestId('check-in-metric-value').click().clear().type('200', { delay: 0 }); + cy.getByTestId('check-in-metric-value').click().clear().type('200'); cy.getByTestId('confidence-slider').realMouseDown(); cy.contains('Here we are'); cy.contains('A cat would be great'); - cy.getByTestId('changeInfo').clear().type('We bought a new sheep', { delay: 0 }); + cy.getByTestId('changeInfo').clear().type('We bought a new sheep'); cy.getByTestId('submit-check-in').click(); cy.wait(200); @@ -219,7 +219,7 @@ describe('OKR Check-in e2e tests', () => { cy.getByTestId('objective').first().getByTestId('add-keyResult').first().click(); cy.getByTestId('submit').should('be.disabled'); - cy.getByTestId('titleInput').type('Title', { delay: 0 }); + cy.getByTestId('titleInput').type('Title'); cy.getByTestId('ordinalTab').click(); cy.fillOutKeyResult( @@ -250,7 +250,7 @@ describe('OKR Check-in e2e tests', () => { cy.getByTestId('confidence-slider').realMouseDown(); cy.contains('There is a new car'); cy.contains('Buy now a new pool'); - cy.getByTestId('changeInfo').clear().type('We bought a new dog', { delay: 0 }); + cy.getByTestId('changeInfo').clear().type('We bought a new dog'); cy.getByTestId('submit-check-in').click(); cy.wait(200); diff --git a/frontend/cypress/e2e/crud.cy.ts b/frontend/cypress/e2e/crud.cy.ts index 11015d21df..bbe1dec6cc 100644 --- a/frontend/cypress/e2e/crud.cy.ts +++ b/frontend/cypress/e2e/crud.cy.ts @@ -32,7 +32,7 @@ describe('CRUD operations', () => { it(`Create objective, should display error message`, () => { cy.getByTestId('add-objective').first().click(); - cy.getByTestId('title').first().type('description', { delay: 0 }).clear(); + cy.getByTestId('title').first().type('description').clear(); cy.contains('Titel muss folgende Länge haben: 2-250 Zeichen'); cy.getByTestId('safe').should('be.disabled'); cy.getByTestId('safe-draft').should('be.disabled'); diff --git a/frontend/cypress/e2e/duplicated-scoring.cy.ts b/frontend/cypress/e2e/duplicated-scoring.cy.ts index 607ecb875b..6a87dbd243 100644 --- a/frontend/cypress/e2e/duplicated-scoring.cy.ts +++ b/frontend/cypress/e2e/duplicated-scoring.cy.ts @@ -18,8 +18,8 @@ describe('e2e test for scoring adjustment on objective duplicate', () => { cy.getByTestId(`stretch-radio`).click(); cy.getByTestId('confidence-slider').click(); cy.realPress('{rightarrow}').realPress('{rightarrow}').realPress('{rightarrow}'); - cy.getByTestId('changeInfo').click().type('Testveränderungen', { delay: 0 }); - cy.getByTestId('initiatives').click().type('Testmassnahmen', { delay: 0 }); + cy.getByTestId('changeInfo').click().type('Testveränderungen'); + cy.getByTestId('initiatives').click().type('Testmassnahmen'); cy.getByTestId('submit-check-in').click(); cy.getByTestId('close-drawer').click({ force: true }); diff --git a/frontend/cypress/e2e/keyresult.cy.ts b/frontend/cypress/e2e/keyresult.cy.ts index a56bb140d4..aaa5d3b709 100644 --- a/frontend/cypress/e2e/keyresult.cy.ts +++ b/frontend/cypress/e2e/keyresult.cy.ts @@ -76,7 +76,7 @@ describe('OKR Overview', () => { cy.getByTestId('objective').first().getByTestId('add-keyResult').first().click(); cy.contains('Key Result erfassen'); cy.contains('Jaya Norris'); - cy.getByTestId('titleInput').type('Title', { delay: 0 }); + cy.getByTestId('titleInput').type('Title'); cy.getByTestId('ordinalTab').click(); cy.fillOutKeyResult( @@ -94,10 +94,10 @@ describe('OKR Overview', () => { cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('actionInput').should('have.length', 3); - cy.getByTestId('actionInput').first().type('A new car', { delay: 0 }); - cy.getByTestId('actionInput').last().type('A new house', { delay: 0 }); + cy.getByTestId('actionInput').first().type('A new car'); + cy.getByTestId('actionInput').last().type('A new house'); cy.getByTestId('add-action-plan-line').click(); - cy.getByTestId('actionInput').last().type('A new company', { delay: 0 }); + cy.getByTestId('actionInput').last().type('A new company'); cy.getByTestId('actionInput').first().should('have.value', 'A new car'); cy.getByTestId('actionInput').last().should('have.value', 'A new company'); @@ -222,67 +222,67 @@ describe('OKR Overview', () => { cy.getByTestId('submit').should('be.disabled'); cy.contains('Titel muss folgende Länge haben: 2-250 Zeichen'); - cy.getByTestId('titleInput').type('My title', { delay: 0 }); + cy.getByTestId('titleInput').type('My title'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('baseline').clear(); cy.getByTestId('submit').should('be.disabled'); cy.contains('Baseline muss eine Zahl sein'); - cy.getByTestId('baseline').type('abc', { delay: 0 }); + cy.getByTestId('baseline').type('abc'); cy.getByTestId('submit').should('be.disabled'); cy.contains('Baseline muss eine Zahl sein'); cy.getByTestId('baseline').clear(); - cy.getByTestId('baseline').type('45', { delay: 0 }); + cy.getByTestId('baseline').type('45'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('stretchGoal').clear(); cy.getByTestId('submit').should('be.disabled'); cy.contains('Stretch Goal muss eine Zahl sein'); - cy.getByTestId('stretchGoal').type('abc', { delay: 0 }); + cy.getByTestId('stretchGoal').type('abc'); cy.getByTestId('submit').should('be.disabled'); cy.contains('Stretch Goal muss eine Zahl sein'); cy.getByTestId('stretchGoal').clear(); - cy.getByTestId('stretchGoal').type('83', { delay: 0 }); + cy.getByTestId('stretchGoal').type('83'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('ownerInput').clear(); cy.getByTestId('submit').should('be.disabled'); - cy.getByTestId('ownerInput').type('abc', { delay: 0 }); - cy.getByTestId('titleInput').type('Hello', { delay: 0 }); + cy.getByTestId('ownerInput').type('abc'); + cy.getByTestId('titleInput').type('Hello'); cy.getByTestId('submit').should('be.disabled'); cy.contains('Owner muss ausgewählt sein'); cy.getByTestId('ownerInput').clear(); - cy.getByTestId('ownerInput').type('Pac').type('{downarrow}', { delay: 0 }).type('{enter}', { delay: 0 }); + cy.getByTestId('ownerInput').type('Pac').type('{downarrow}').type('{enter}'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('ordinalTab').click(); cy.getByTestId('submit').should('be.disabled'); - cy.getByTestId('commitZone').clear().type('Commit', { delay: 0 }); - cy.getByTestId('targetZone').clear().type('Target', { delay: 0 }); - cy.getByTestId('stretchZone').clear().type('Stretch', { delay: 0 }); + cy.getByTestId('commitZone').clear().type('Commit'); + cy.getByTestId('targetZone').clear().type('Target'); + cy.getByTestId('stretchZone').clear().type('Stretch'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('commitZone').clear(); cy.getByTestId('submit').should('be.disabled'); cy.contains('Commit Zone muss folgende Länge haben: 1-400 Zeichen'); - cy.getByTestId('commitZone').type('Commit', { delay: 0 }); + cy.getByTestId('commitZone').type('Commit'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('targetZone').clear(); cy.getByTestId('submit').should('be.disabled'); cy.contains('Target Zone muss folgende Länge haben: 1-400 Zeichen'); - cy.getByTestId('targetZone').type('Target', { delay: 0 }); + cy.getByTestId('targetZone').type('Target'); cy.getByTestId('submit').should('not.be.disabled'); cy.getByTestId('stretchZone').clear(); cy.getByTestId('submit').should('be.disabled'); cy.contains('Stretch Zone muss folgende Länge haben: 1-400 Zeichen'); - cy.getByTestId('stretchZone').type('Commit', { delay: 0 }); + cy.getByTestId('stretchZone').type('Commit'); cy.getByTestId('submit').should('not.be.disabled'); }); diff --git a/frontend/cypress/e2e/objective-backlog.cy.ts b/frontend/cypress/e2e/objective-backlog.cy.ts index 71e080c68c..5706262f4d 100644 --- a/frontend/cypress/e2e/objective-backlog.cy.ts +++ b/frontend/cypress/e2e/objective-backlog.cy.ts @@ -9,7 +9,7 @@ describe('OKR Objective Backlog e2e tests', () => { it(`Create Objective in backlog quarter should not have save button`, () => { cy.getByTestId('add-objective').first().click(); - cy.getByTestId('title').first().clear().type('Objective in quarter backlog', { delay: 0 }); + cy.getByTestId('title').first().clear().type('Objective in quarter backlog'); cy.get('select#quarter').select('Backlog'); cy.contains('Speichern').should('not.exist'); @@ -67,7 +67,7 @@ describe('OKR Objective Backlog e2e tests', () => { it(`Can release Objective to another quarter from backlog`, () => { cy.visit('/?quarter=999'); cy.getByTestId('add-objective').first().click(); - cy.getByTestId('title').first().clear().type('We can not release this', { delay: 0 }); + cy.getByTestId('title').first().clear().type('We can not release this'); cy.getByTestId('safe').should('not.exist'); cy.getByTestId('safe-draft').click(); @@ -86,7 +86,7 @@ describe('OKR Objective Backlog e2e tests', () => { cy.contains('Objective veröffentlichen'); - cy.getByTestId('title').first().clear().type('This is our first released objective', { delay: 0 }); + cy.getByTestId('title').first().clear().type('This is our first released objective'); cy.get('select#quarter').should('not.contain', 'Backlog'); cy.get('select#quarter').select('GJ ForTests'); diff --git a/frontend/cypress/e2e/objective.cy.ts b/frontend/cypress/e2e/objective.cy.ts index b46a79e172..83eb98496e 100644 --- a/frontend/cypress/e2e/objective.cy.ts +++ b/frontend/cypress/e2e/objective.cy.ts @@ -177,22 +177,22 @@ describe('OKR Objective e2e tests', () => { cy.wait(500); cy.getByTestId('objectiveSearch').first().click(); - cy.getByTestId('objectiveSearch').first().type('Search after', { delay: 0 }).wait(350); + cy.getByTestId('objectiveSearch').first().type('Search after').wait(350); cy.contains('Search after this objective'); cy.get('We dont want to search for this').should('not.exist'); - cy.getByTestId('objectiveSearch').first().clear().type('this', { delay: 0 }).wait(350); + cy.getByTestId('objectiveSearch').first().clear().type('this').wait(350); cy.contains('Search after this objective'); cy.contains('We dont want to search for this'); - cy.getByTestId('objectiveSearch').first().clear().type('dont want to', { delay: 0 }).wait(350); + cy.getByTestId('objectiveSearch').first().clear().type('dont want to').wait(350); cy.contains('We dont want to search for this'); cy.get('Search after this objective').should('not.exist'); - cy.getByTestId('objectiveSearch').first().clear().type('there is no objective', { delay: 0 }).wait(350); + cy.getByTestId('objectiveSearch').first().clear().type('there is no objective').wait(350); cy.get('We dont want to search for this').should('not.exist'); cy.get('Search after this objective').should('not.exist'); diff --git a/frontend/cypress/e2e/scoring.cy.ts b/frontend/cypress/e2e/scoring.cy.ts index 1a84722697..1a22f91596 100644 --- a/frontend/cypress/e2e/scoring.cy.ts +++ b/frontend/cypress/e2e/scoring.cy.ts @@ -65,8 +65,8 @@ describe('Scoring component e2e tests', () => { cy.getByTestId(`${zoneName}-radio`).click(); cy.getByTestId('confidence-slider').click(); cy.realPress('{rightarrow}').realPress('{rightarrow}').realPress('{rightarrow}'); - cy.getByTestId('changeInfo').click().type('Testveränderungen', { delay: 0 }); - cy.getByTestId('initiatives').click().type('Testmassnahmen', { delay: 0 }); + cy.getByTestId('changeInfo').click().type('Testveränderungen'); + cy.getByTestId('initiatives').click().type('Testmassnahmen'); cy.getByTestId('submit-check-in').click(); const percentage = getPercentageOrdinal(zoneName); cy.validateScoring(false, percentage); @@ -80,10 +80,10 @@ function setupMetricKR(baseline: number, stretchgoal: number, value: number) { cy.createMetricKeyresult('Metric scoring keyresult', String(baseline), String(stretchgoal)); cy.getByTestId('keyresult').get(':contains("Metric scoring keyresult")').last().click(); cy.getByTestId('add-check-in').click(); - cy.getByTestId('check-in-metric-value').clear().type(String(value), { delay: 0 }); + cy.getByTestId('check-in-metric-value').clear().type(String(value)); cy.getByTestId('confidence-slider').click(); cy.realPress('{rightarrow}').realPress('{rightarrow}').realPress('{rightarrow}'); - cy.getByTestId('changeInfo').click().type('Testveränderungen', { delay: 0 }); - cy.getByTestId('initiatives').click().type('Testmassnahmen', { delay: 0 }); + cy.getByTestId('changeInfo').click().type('Testveränderungen'); + cy.getByTestId('initiatives').click().type('Testmassnahmen'); cy.getByTestId('submit-check-in').click(); } diff --git a/frontend/cypress/e2e/tab.cy.ts b/frontend/cypress/e2e/tab.cy.ts index 02c93be4e8..5329c85454 100644 --- a/frontend/cypress/e2e/tab.cy.ts +++ b/frontend/cypress/e2e/tab.cy.ts @@ -43,9 +43,9 @@ describe('Tab workflow tests', () => { cy.realPress('Enter'); cy.contains('Objective für'); tabAndCheck('title'); - cy.realType('title', { delay: 0 }); + cy.realType('title'); tabAndCheck('description'); - cy.realType('description', { delay: 0 }); + cy.realType('description'); tabAndCheck('quarterSelect'); tabAndCheck('safe-draft'); tabAndCheck('safe'); diff --git a/frontend/cypress/e2e/teammanagement.cy.ts b/frontend/cypress/e2e/teammanagement.cy.ts index 68782fa22b..82aa9e3833 100644 --- a/frontend/cypress/e2e/teammanagement.cy.ts +++ b/frontend/cypress/e2e/teammanagement.cy.ts @@ -64,7 +64,7 @@ describe('Team management tests', () => { cy.contains('Teamverwaltung'); cy.getByTestId('add-team').click(); - cy.getByTestId('add-team-name').click().clear().type(teamName, { delay: 0 }); + cy.getByTestId('add-team-name').click().clear().type(teamName); cy.getByTestId('add-team-save').click(); cy.wait('@addTeam'); cy.contains(teamName); @@ -150,7 +150,7 @@ describe('Team management tests', () => { describe('Search', () => { it('Search user', () => { - cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('pa', { delay: 0 }); + cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('pa'); cy.contains('.mat-mdc-autocomplete-panel mat-option', 'Paco Eggimann (peggimann@puzzle.ch)'); cy.contains('.mat-mdc-autocomplete-panel mat-option', 'Paco Egiman (egiman@puzzle.ch)'); @@ -160,7 +160,7 @@ describe('Team management tests', () => { }); it('Search team', () => { - cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('we are', { delay: 0 }); + cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('we are'); cy.contains('.mat-mdc-autocomplete-panel mat-option', 'we are cube.³').click(); @@ -168,7 +168,7 @@ describe('Team management tests', () => { }); it('Search mixed', () => { - cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('puz', { delay: 0 }); + cy.get('app-team-management-banner').getByTestId('teamManagementSearch').click().type('puz'); cy.contains('.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label', 'Members'); cy.contains('.mat-mdc-autocomplete-panel .mat-mdc-optgroup-label', 'Teams'); @@ -206,11 +206,11 @@ describe('Team management tests', () => { cy.contains('Angabe benötigt'); cy.contains('E-Mail ungültig'); cy.getByTestId('email-col_2').focus(); - cy.realType('@puzzle.ch', { delay: 0 }); + cy.realType('@puzzle.ch'); cy.contains('E-Mail ungültig').should('not.exist'); cy.contains('E-Mail existiert bereits'); cy.tabBackward(); - cy.realType('Papirer', { delay: 0 }); + cy.realType('Papirer'); cy.contains('Angabe benötigt').should('not.exist'); // delete last entry @@ -346,7 +346,7 @@ describe('Team management tests', () => { cy.get(matOption).contains(nameEsha).should('not.exist'); // add findus peterson - cy.getByTestId('search-member-to-add').click().type('Find', { delay: 0 }); + cy.getByTestId('search-member-to-add').click().type('Find'); cy.contains(matOption, 'Findus Peterson').click(); // add robin papierer @@ -437,7 +437,7 @@ function checkRolesForEsha() { function editTeamNameAndTest(teamName: string) { cy.intercept('PUT', '**/teams/*').as('saveTeam'); cy.getByTestId('editTeamButton').click(); - cy.getByTestId('add-team-name').click().clear().type(teamName, { delay: 0 }); + cy.getByTestId('add-team-name').click().clear().type(teamName); cy.getByTestId('add-team-save').click(); cy.wait('@saveTeam'); cy.contains(teamName); @@ -450,9 +450,9 @@ function navigateToUser(userName: string) { } function fillOutNewUser(firstname: string, lastname: string, email: string) { - cy.realType(firstname, { delay: 0 }); + cy.realType(firstname); cy.tabForward(); - cy.realType(lastname, { delay: 0 }); + cy.realType(lastname); cy.tabForward(); - cy.realType(email, { delay: 0 }); + cy.realType(email); } diff --git a/frontend/cypress/support/commands.ts b/frontend/cypress/support/commands.ts index 9b4e967e20..e622e5bc67 100644 --- a/frontend/cypress/support/commands.ts +++ b/frontend/cypress/support/commands.ts @@ -42,11 +42,11 @@ Cypress.Commands.add( description?: string, createKeyResults: boolean = false, ) => { - cy.getByTestId('title').first().clear().type(objectiveTitle, { delay: 0 }); + cy.getByTestId('title').first().clear().type(objectiveTitle); cy.getByTestId('description') .first() .clear() - .type(description || 'This is the description of the new Objective', { delay: 0 }); + .type(description || 'This is the description of the new Objective'); if (quarter) { cy.get('select#quarter').select(quarter); } @@ -60,13 +60,13 @@ Cypress.Commands.add( Cypress.Commands.add( 'fillOutCheckInMetric', (currentValue: number, shouldChangeConfidence: number, changeInfo: string | null, initiatives: string | null) => { - cy.getByTestId('check-in-metric-value').clear().type(currentValue.toString(), { delay: 0 }); + cy.getByTestId('check-in-metric-value').clear().type(currentValue.toString()); setConfidence(shouldChangeConfidence); if (changeInfo) { - cy.getByTestId('changeInfo').clear().type(changeInfo!, { delay: 0 }); + cy.getByTestId('changeInfo').clear().type(changeInfo!); } if (initiatives) { - cy.getByTestId('initiatives').clear().type(initiatives!, { delay: 0 }); + cy.getByTestId('initiatives').clear().type(initiatives!); } cy.getByTestId('submit-check-in').click(); }, @@ -91,10 +91,10 @@ Cypress.Commands.add( } setConfidence(confidence); if (changeInfo) { - cy.getByTestId('changeInfo').clear().type(changeInfo!, { delay: 0 }); + cy.getByTestId('changeInfo').clear().type(changeInfo!); } if (initiatives) { - cy.getByTestId('initiatives').clear().type(initiatives!, { delay: 0 }); + cy.getByTestId('initiatives').clear().type(initiatives!); } cy.getByTestId('submit-check-in').click(); }, @@ -122,7 +122,7 @@ Cypress.Commands.add('createOrdinalKeyresult', (title: string | null = null, own cy.contains('Key Result erfassen'); cy.contains('Jaya Norris'); cy.contains('Titel'); - cy.getByTestId('titleInput').type('Title', { delay: 0 }); + cy.getByTestId('titleInput').type('Title'); cy.getByTestId('ordinalTab').click(); cy.contains('Metrisch'); cy.contains('Ordinal'); @@ -205,24 +205,20 @@ Cypress.Commands.add( owner: string | null, description: string, ) => { - cy.getByTestId('titleInput').clear().type(title, { delay: 0 }); + cy.getByTestId('titleInput').clear().type(title); if (commitZone == null) { cy.getByTestId('unit').select(unit!); - cy.getByTestId('baseline').clear().type(baseline!, { delay: 0 }); - cy.getByTestId('stretchGoal').clear().type(stretchGoal!, { delay: 0 }); + cy.getByTestId('baseline').clear().type(baseline!); + cy.getByTestId('stretchGoal').clear().type(stretchGoal!); } else { - cy.getByTestId('commitZone').clear().type(commitZone!, { delay: 0 }); - cy.getByTestId('targetZone').clear().type(targetZone!, { delay: 0 }); - cy.getByTestId('stretchZone').clear().type(stretchZone!, { delay: 0 }); + cy.getByTestId('commitZone').clear().type(commitZone!); + cy.getByTestId('targetZone').clear().type(targetZone!); + cy.getByTestId('stretchZone').clear().type(stretchZone!); } if (owner != null) { - cy.getByTestId('ownerInput') - .clear() - .type(owner, { delay: 0 }) - .type('{downarrow}', { delay: 0 }) - .type('{enter}', { delay: 0 }); + cy.getByTestId('ownerInput').clear().type(owner).type('{downarrow}').type('{enter}'); } - cy.getByTestId('descriptionInput').clear().type(description, { delay: 0 }); + cy.getByTestId('descriptionInput').clear().type(description); }, ); @@ -253,8 +249,8 @@ function loginWithCredentials(username: string, password: string) { cy.visit('/'); cy.intercept('GET', '**/users/current').as('getCurrentUser'); cy.origin(Cypress.env('login_url'), { args: { username, password } }, ({ username, password }) => { - cy.get('input[name="username"]').type(username, { delay: 0 }); - cy.get('input[name="password"]').type(password, { delay: 0 }); + cy.get('input[name="username"]').type(username); + cy.get('input[name="password"]').type(password); cy.get('button[type="submit"]').click(); cy.wait('@getCurrentUser', { responseTimeout: 10000 }); }); diff --git a/frontend/cypress/support/e2e.ts b/frontend/cypress/support/e2e.ts index b2a51aba7b..fff24428e8 100644 --- a/frontend/cypress/support/e2e.ts +++ b/frontend/cypress/support/e2e.ts @@ -15,3 +15,7 @@ import './commands'; import 'cypress-real-events'; + +Cypress.Keyboard.defaults({ + keystrokeDelay: 0, +});