@@ -13,6 +13,7 @@ import { expect } from "@playwright/test";
1313import {
1414 BudgetProposalContactInformationProps ,
1515 BudgetProposalProps ,
16+ CompanyEnum ,
1617} from "@types" ;
1718
1819test . beforeEach ( async ( ) => {
@@ -40,34 +41,183 @@ test.describe("Budget proposal 01 wallet", () => {
4041 test . describe ( "Budget proposal with proposalSubmissionPageNavigation" , ( ) => {
4142 let budgetProposalSubmissionPage : BudgetDiscussionSubmissionPage ;
4243 test . beforeEach ( async ( { page } ) => {
43- const budgetSubmissionPage = new BudgetDiscussionSubmissionPage ( page ) ;
44- await budgetSubmissionPage . goto ( ) ;
44+ budgetProposalSubmissionPage = new BudgetDiscussionSubmissionPage ( page ) ;
45+ await budgetProposalSubmissionPage . goto ( ) ;
4546 } ) ;
47+
4648 test . describe ( "Budget proposal field verification" , ( ) => {
47- test ( "12D_1. Should verify all field of “contact information” section" , async ( { } ) => { } ) ;
48- test ( "12D_2. Should verify all field of “proposal ownership” section" , async ( { } ) => { } ) ;
49- test ( "12D_3. Should verify all field of “problem statements and proposal benefits” section" , async ( { } ) => { } ) ;
50- test ( "12D_4. Should verify all field of “costing” section" , async ( { } ) => { } ) ;
51- test ( "12D_5. Should verify all field of “further information” section" , async ( { } ) => { } ) ;
52- test ( "12D_6. Should verify all field of “administration and auditing” section" , async ( { } ) => { } ) ;
53- test ( "12D_7. Should verify all field of “submit” section" , async ( { } ) => { } ) ;
49+ test ( "12D_1. Should verify all field of “contact information” section" , async ( ) => {
50+ await expect (
51+ budgetProposalSubmissionPage . beneficiaryFullNameInput
52+ ) . toBeVisible ( ) ;
53+ await expect (
54+ budgetProposalSubmissionPage . beneficiaryEmailInput
55+ ) . toBeVisible ( ) ;
56+ await expect (
57+ budgetProposalSubmissionPage . beneficiaryCountrySelect
58+ ) . toBeVisible ( ) ;
59+ await expect (
60+ budgetProposalSubmissionPage . beneficiaryNationalitySelect
61+ ) . toBeVisible ( ) ;
62+ await expect (
63+ budgetProposalSubmissionPage . submissionLeadFullNameInput
64+ ) . toBeVisible ( ) ;
65+ } ) ;
66+
67+ test ( "12D_2. Should verify all field of “proposal ownership” section" , async ( ) => {
68+ const proposalContactInformationContent =
69+ budgetProposalSubmissionPage . generateValidBudgetProposalContactInformation ( ) ;
70+ await budgetProposalSubmissionPage . fillupContactInformationForm (
71+ proposalContactInformationContent
72+ ) ;
73+
74+ // default field
75+ await expect (
76+ budgetProposalSubmissionPage . companyTypeSelect
77+ ) . toBeVisible ( ) ;
78+ await expect (
79+ budgetProposalSubmissionPage . publicChampionSelect
80+ ) . toBeVisible ( ) ;
81+ await expect (
82+ budgetProposalSubmissionPage . contactDetailsInput
83+ ) . toBeVisible ( ) ;
84+
85+ // company type field
86+ await budgetProposalSubmissionPage . companyTypeSelect . click ( ) ;
87+ await budgetProposalSubmissionPage . currentPage
88+ . getByRole ( "option" , { name : CompanyEnum . Company } )
89+ . click ( ) ; //BUG missing testId
90+
91+ await expect (
92+ budgetProposalSubmissionPage . companyNameInput
93+ ) . toBeVisible ( ) ;
94+ await expect (
95+ budgetProposalSubmissionPage . companyDomainNameInput
96+ ) . toBeVisible ( ) ;
97+ await expect (
98+ budgetProposalSubmissionPage . countryOfIncorporationBtn
99+ ) . toBeVisible ( ) ;
100+
101+ // group type field
102+ await budgetProposalSubmissionPage . companyTypeSelect . click ( ) ;
103+ await budgetProposalSubmissionPage . currentPage
104+ . getByRole ( "option" , { name : CompanyEnum . Group } )
105+ . click ( ) ; //BUG missing testId
106+ await expect ( budgetProposalSubmissionPage . groupNameInput ) . toBeVisible ( ) ;
107+ await expect ( budgetProposalSubmissionPage . groupTypeInput ) . toBeVisible ( ) ;
108+ await expect (
109+ budgetProposalSubmissionPage . keyInformationOfGroupInput
110+ ) . toBeVisible ( ) ;
111+ } ) ;
112+
113+ test ( "12D_3. Should verify all field of “problem statements and proposal benefits” section" , async ( ) => {
114+ const proposalInformation =
115+ budgetProposalSubmissionPage . generateValidBudgetProposalInformation ( ) ;
116+ await budgetProposalSubmissionPage . fillupForm ( proposalInformation , 3 ) ;
117+
118+ await expect (
119+ budgetProposalSubmissionPage . problemStatementInput
120+ ) . toBeVisible ( ) ;
121+ await expect (
122+ budgetProposalSubmissionPage . proposalBenefitInput
123+ ) . toBeVisible ( ) ;
124+ await expect (
125+ budgetProposalSubmissionPage . roadmapNameSelect
126+ ) . toBeVisible ( ) ;
127+ await expect (
128+ budgetProposalSubmissionPage . budgetDiscussionTypeSelect
129+ ) . toBeVisible ( ) ;
130+ await expect (
131+ budgetProposalSubmissionPage . committeeAlignmentTypeSelect
132+ ) . toBeVisible ( ) ;
133+ await expect (
134+ budgetProposalSubmissionPage . suplimentaryEndorsementInput
135+ ) . toBeVisible ( ) ;
136+ } ) ;
137+
138+ test ( "12D_4. Should verify all field of “proposal details” section" , async ( ) => {
139+ const proposalInformation =
140+ budgetProposalSubmissionPage . generateValidBudgetProposalInformation ( ) ;
141+ await budgetProposalSubmissionPage . fillupForm ( proposalInformation , 4 ) ;
142+
143+ await expect (
144+ budgetProposalSubmissionPage . proposalNameInput
145+ ) . toBeVisible ( ) ;
146+ await expect (
147+ budgetProposalSubmissionPage . proposalDescriptionInput
148+ ) . toBeVisible ( ) ;
149+ await expect (
150+ budgetProposalSubmissionPage . proposalKeyDependenciesInput
151+ ) . toBeVisible ( ) ;
152+ await expect (
153+ budgetProposalSubmissionPage . milestonesInput
154+ ) . toBeVisible ( ) ;
155+ await expect (
156+ budgetProposalSubmissionPage . teamSizeAndDurationInput
157+ ) . toBeVisible ( ) ;
158+ await expect (
159+ budgetProposalSubmissionPage . previousExperienceInput
160+ ) . toBeVisible ( ) ;
161+ await expect (
162+ budgetProposalSubmissionPage . contractingTypeSelect
163+ ) . toBeVisible ( ) ;
164+ } ) ;
165+
166+ test ( "12D_5. Should verify all field of “costing” section" , async ( ) => {
167+ const proposalInformation =
168+ budgetProposalSubmissionPage . generateValidBudgetProposalInformation ( ) ;
169+ await budgetProposalSubmissionPage . fillupForm ( proposalInformation , 5 ) ;
170+
171+ await expect ( budgetProposalSubmissionPage . adaAmountInput ) . toBeVisible ( ) ;
172+ await expect (
173+ budgetProposalSubmissionPage . usaToAdaCnversionRateInput
174+ ) . toBeVisible ( ) ;
175+ await expect (
176+ budgetProposalSubmissionPage . preferredCurrencySelect
177+ ) . toBeVisible ( ) ;
178+ await expect (
179+ budgetProposalSubmissionPage . preferredCurrencyAmountInput
180+ ) . toBeVisible ( ) ;
181+ await expect (
182+ budgetProposalSubmissionPage . costBreakdownInput
183+ ) . toBeVisible ( ) ;
184+ } ) ;
185+
186+ test ( "12D_6. Should verify all field of “further information” section" , async ( ) => {
187+ const proposalInformation =
188+ budgetProposalSubmissionPage . generateValidBudgetProposalInformation ( ) ;
189+ await budgetProposalSubmissionPage . fillupForm ( proposalInformation , 6 ) ;
190+
191+ await expect ( budgetProposalSubmissionPage . linkTextInput ) . toBeVisible ( ) ;
192+ await expect ( budgetProposalSubmissionPage . linkUrlInput ) . toBeVisible ( ) ;
193+ await expect ( budgetProposalSubmissionPage . addLinkBtn ) . toBeVisible ( ) ;
194+ } ) ;
195+
196+ test ( "12D_7. Should verify all field of “administration and auditing” section" , async ( ) => {
197+ const proposalInformation =
198+ budgetProposalSubmissionPage . generateValidBudgetProposalInformation ( ) ;
199+ await budgetProposalSubmissionPage . fillupForm ( proposalInformation , 7 ) ;
200+
201+ await expect (
202+ budgetProposalSubmissionPage . intersectNamedAdministratorSelect
203+ ) . toBeVisible ( ) ;
204+ } ) ;
54205 } ) ;
55206
56207 test . describe ( "Budget proposal field validation" , ( ) => {
57208 test ( "12E_1. Should accept valid data in “contact information” section" , async ( { } ) => { } ) ;
58209 test ( "12E_2. Should accept valid data in “proposal ownership” section" , async ( { } ) => { } ) ;
59210 test ( "12E_3. Should accept valid data in “problem statements and proposal benefits” section" , async ( { } ) => { } ) ;
60- test ( "12E_4. Should accept valid data in “costing ” section" , async ( { } ) => { } ) ;
61- test ( "12E_5. Should accept valid data in “further information ” section" , async ( { } ) => { } ) ;
62- test ( "12E_6. Should accept valid data in “administration and auditing ” section" , async ( { } ) => { } ) ;
63- test ( "12E_7. Should accept valid data in “submit” section" , async ( { } ) => { } ) ;
211+ test ( "12E_4. Should accept valid data in “proposal details ” section" , async ( { } ) => { } ) ;
212+ test ( "12E_5. Should accept valid data in “costing ” section" , async ( { } ) => { } ) ;
213+ test ( "12E_6. Should accept valid data in “further information ” section" , async ( { } ) => { } ) ;
214+
64215 test ( "12F_1. Should reject invalid data in “contact information” section" , async ( { } ) => { } ) ;
65216 test ( "12F_2. Should reject invalid data in “proposal ownership” section" , async ( { } ) => { } ) ;
66217 test ( "12F_3. Should reject invalid data in “problem statements and proposal benefits” section" , async ( { } ) => { } ) ;
67- test ( "12F_4. Should reject invalid data in “costing” section" , async ( { } ) => { } ) ;
68- test ( "12F_5. Should reject invalid data in “further information” section" , async ( { } ) => { } ) ;
69- test ( "12F_6. Should reject invalid data in “administration and auditing” section" , async ( { } ) => { } ) ;
70- test ( "12F_7. Should reject invalid data in “submit” section" , async ( { } ) => { } ) ;
218+ test ( "12E_4. Should accept invalid data in “proposal details” section" , async ( { } ) => { } ) ;
219+ test ( "12F_5. Should reject invalid data in “costing” section" , async ( { } ) => { } ) ;
220+ test ( "12F_6. Should reject invalid data in “further information” section" , async ( { } ) => { } ) ;
71221 } ) ;
72222
73223 test ( "12G. Should validate and review submitted budget proposal" , async ( { } ) => { } ) ;
0 commit comments