@@ -2,10 +2,14 @@ import { check, fail, sleep } from 'k6';
22import { browser } from 'k6/browser' ;
33import exec from 'k6/execution' ;
44import { Counter , Trend } from 'k6/metrics' ;
5- import { getRandomUser , randomIntBetween , randomString , randomWords } from '../../utils/helperFunctions' ;
5+ import {
6+ getRandomUser ,
7+ randomIntBetween ,
8+ randomString ,
9+ randomWords ,
10+ } from '../../utils/helperFunctions' ;
611import { SharedData } from '../../utils/sharedType' ;
712
8-
913const proposalSubmissionDuration = new Trend (
1014 'proposal_submission_duration' ,
1115 true
@@ -74,22 +78,24 @@ export default async function proposalSubmissionTest(sharedData: SharedData) {
7478 sleep ( 5 ) ;
7579
7680 await page . locator ( 'button[data-cy="add-participant-button"]' ) . click ( ) ;
77- const emailInput = page . locator ( '#Email-input' ) ;
81+ sleep ( 5 ) ;
82+
83+ const emailInput = page . locator ( 'div[data-cy="invite-user-autocomplete"] ' ) ;
7884 await emailInput . waitFor ( {
7985 state : 'visible' ,
8086 } ) ;
87+ emailInput . click ( ) ;
8188 const piEmail = getRandomUser ( sharedData . users , currentUser ) . email ;
82- emailInput . type ( piEmail ) ;
83- const emailFilledInput = page . locator ( `input[value="${ piEmail } "]` ) ;
84- await emailFilledInput . waitFor ( {
85- state : 'visible' ,
86- } ) ;
8789
88- await page . locator ( 'button[data-cy="findUser"]' ) . click ( ) ;
90+ sleep ( 10 ) ;
8991
90- sleep ( 5 ) ;
92+ await page . keyboard . type ( piEmail ) ;
93+
94+ sleep ( 10 ) ;
95+ await page . keyboard . press ( 'Enter' ) ;
9196
92- await page . locator ( 'button[data-cy="assign-selected-users"]' ) . click ( ) ;
97+ sleep ( 10 ) ;
98+ await page . locator ( 'button[data-cy="invite-user-submit-button"]' ) . click ( ) ;
9399
94100 sleep ( 5 ) ;
95101
0 commit comments