class ReleaseTest(unittest.TestCase): log = cl.customLogger(logging.DEBUG) @pytest.fixture(autouse=True) def objectSetup(self, oneTimeSetUp): self.release = ReleasePage(self.driver) def test_01VerifyReleaseEToD(self): self.log.info("*#" * 20) self.log.info(" test_01VerifyReleaseEToD ") self.log.info("*#" * 20) self.release.ReleaseEToD() def test_02AddFloors(self): self.log.info("*#" * 20) self.log.info(" test_02AddFloors ") self.log.info("*#" * 20) self.release.AddFloors() def test_03VerifyReleaseDToC(self): self.log.info("*#" * 20) self.log.info(" test_03VerifyReleaseDToC ") self.log.info("*#" * 20) self.release.ReleaseDToC() def test_04VerifyGlobalApproversDoNotExistOnCToBDeals(self): self.log.info("*#" * 20) self.log.info(" test_04VerifyGlobalApproversDoNotExistOnCToBDeals ") self.log.info("*#" * 20) self.release.VerifyGlobalApproversDoNotExistOnCToBDeals() def test_05ReleaseCToB(self): self.log.info("*#" * 20) self.log.info(" test_04ReleaseCToB ") self.log.info("*#" * 20) self.release.ReleaseCToB() def test_06ReleaseB(self): self.log.info("*#" * 20) self.log.info(" test_05ReleaseB ") self.log.info("*#" * 20) self.release.ReleaseMoveToB() """def test_07ReleaseToA(self):
class RequestRevisionPages(SeleniumDriver): def __init__(self, driver): super().__init__(driver) self.deal = DealList(self.driver) self.dealdetail = DealDetailScreenPages(self.driver) self.unrelease = UnReleasePages(self.driver) self.release = ReleasePage(self.driver) self.driver = driver # C53688 Request revision button says "Request changes" ''' Preconditions User is logged in Steps Create or find a deal with release request when you are an approver Open deal details page Expected Result Reject button title is "Request changes" ''' select_d_to_c = "//div[5]/div/div/div[2]/div[3]/div/img" select_c_to_b = "//div[5]/div/div/div[2]/div[5]/div/img" select_b_to_a = "//div[5]/div/div/div[2]/div[7]/div/img" request_change_button = "//span[contains(text(),'Request changes')]" def SelectCtoB(self): self.elementClick(self.select_c_to_b) def SelectBToA(self): self.elementClick(self.select_b_to_a) # Verify request button available on the page # test_01VerifyRequestRevisionButtonDToC def VerifyRequestRevisionButtonAvailable(self): time.sleep(2) self.release.ReleaseEToD() self.release.AddFloors() self.release.ReleaseDToCForm() self.VerifyRequestButton() def VerifyRequestButton(self): button_text = self.getText(self.request_change_button) button_text1 = "Request changes" self.verifyTextContains(actualText=button_text, expectedText=button_text1) # C53690 No approval buttons after "Request changes" ''' Preconditions User is logged in Steps Create or find a deal with release request when you are an approver Open deal details page Click "Request changes" Fill in all of the fields in the modal Click submit Expected Result "Request changes" modal is dismissed Approval buttons ("Request changes" and "Approve release" should disappear) ''' click_select_a_change_drop_down = "//select[@name='reason']" select_incorrect_value = "//div[@id='app']/div/div[2]/div/div/div/div/div/div/label/div/select/option[2]" enter_comment = "//textarea[@placeholder='Enter a comment']" request_modal_submit_button = "//span[contains(text(),'Submit')]" # Click submit button of request modal pop up def RequestModalSubmitButton(self): self.elementClick(self.request_modal_submit_button) # Enter comment on request modal box def EnterComment(self, comment): self.elementClick(self.enter_comment) time.sleep(2) self.sendKeys(comment, self.enter_comment) # GLOBAL method to add comment def Comment(self): comment = "Request release changes" self.EnterComment(comment) # click on request change button def ClickRequestChangeModalButton(self): time.sleep(2) self.elementClick(self.request_change_button) ''' Steps: Create a new deal Process from e to d add floors verify request changes button click request change button select from drop down enter comment click submit verify upload button verify requested change text on approver at the bottom of the page scroll to upload document click upload document click add memo and upload pdf Click submit ''' doc_upload_button = "//div[@id='app']/div/div/div[2]/div/div[2]/div/div/div/div/div[3]/button/span" cancel_button = "//p[contains(text(),'Cancel release request')]" update_document = "//span[contains(text(),'Update documents')]" def ClickDealDetailPageCancelButton(self): self.dealdetail.ClickMenuIcon() time.sleep(2) self.elementClick(self.cancel_button) self.dealdetail.SubmitButton() # test_02VerifyNoApprovalButtonsAfterRequestChanges def NoApprovalButtonsAfterRequestChanges(self): time.sleep(2) self.ClickRequestChangeModalButton() time.sleep(2) self.elementClick(self.select_incorrect_value) time.sleep(2) self.Comment() time.sleep(2) self.RequestModalSubmitButton() time.sleep(4) get_button = self.getText(self.update_document) text = "Update documents" self.verifyTextContains(actualText=get_button, expectedText=text) # CTA button should say "Upload documents" ''' Preconditions User should be logged in Steps Find a deal that you have requested changes on Expected Result In the header area to the right of the approval progress bar there should be two buttons floated to the right: 1. "Cancel release" 2. "Upload documents" ''' # test_04VerifyCTAButtonShouldSayUploadDocuments def CTAButtonShouldSayUploadDocuments(self): time.sleep(2) get_button = self.getText(self.update_document) text = "Update documents" self.verifyTextContains(actualText=get_button, expectedText=text) # C53691 Approver section updates to reflect "Requested changes" status ''' Preconditions User is logged in Steps Create or find a deal with release request when you are an approver Open deal details page Click "Request changes" Fill in all of the fields in the modal Click submit Expected Result Look for your name in the Approvers section To the right of your name it should read in yellow text: "(Requested changes)" ''' requested_changes_on_deal_detail_page = "//span[contains(text(),'Requested changes')]" submit_button = "//span[contains(text(),'Submit')]" # test_05VerifyApproverSectionUpdatesToReflectRequestedChangesStatus def ApproverSectionUpdatesToReflectRequestedChangesStatus(self): time.sleep(2) #self.dealdetail.innerScroll(self.dealdetail.scroll_to_team) approver_request_text = self.getText( self.requested_changes_on_deal_detail_page) text = "Requested changes" self.verifyTextContains(actualText=approver_request_text, expectedText=text) # test_06VerifyRequestRevisionFromDToC def VerifyRequestRevisionFromDToC(self): time.sleep(2) # self.dealdetail.innerScrollUp(self.doc_upload_button) # time.sleep(2) self.elementClick(self.update_document) time.sleep(2) self.release.AddDealMemo() time.sleep(2) self.RequestModalSubmitButton() time.sleep(2) self.VerifyRequestButton() time.sleep(2) self.release.ApproveReleaseButtonClick() ''' Click release to b button Enter all the detail on the form Click submit on step 3 Expected Verify request change button Click request change button Select value from drop down Enter comment Click submit Expected: Verify request button should not be shown now Scroll to the bottom of the page Expected: VERIFY Requested change text just near the approver name Scroll the screen to top Click on upload documenmt Upload the deal memo document again Click submit ''' def VerifyNoApprovalButtonsAfterRequestChangesFromCtoB(self): self.release.ReleaseProcessCTOB() time.sleep(2) self.dealdetail.SubmitButton() self.release.AddMeetingNote() time.sleep(4) self.NoApprovalButtonsAfterRequestChanges() def ApproverSectionUpdatesToReflectRequestedChangesStatusFromCToB(self): time.sleep(2) self.ApproverSectionUpdatesToReflectRequestedChangesStatus() click_first_close_icon = "//div[@id='app']/div/div[2]/div/div/div/div/div/div[2]/div/div[1]/div/img" def VerifyRequestRevisionFromCToB(self): time.sleep(2) # self.dealdetail.innerScrollUp(self.doc_upload_button) # time.sleep(2) self.elementClick(self.doc_upload_button) time.sleep(2) self.elementClick(self.click_first_close_icon) time.sleep(2) self.release.AddDealMemo() time.sleep(2) self.RequestModalSubmitButton() time.sleep(2) self.VerifyRequestButton() # C53692 Deal list filter type "Needs my approval" list does not include deals where I have request changes ''' Preconditions User is logged in Steps Find a deal that has changes requested Click "Update documents" (only if you are part of the deal team should you see update document) The submit button should be disabled. Click the X next to one of the file tokens to remove it Add a new file by clicking on the "Add file" button Once a new document is added, noticed the submit button is enabled Click submit Expected Result The new document should appear on the deal details page IF you are an approver on the deal, approval buttons should be visible again ''' def ApprovalButtonsReturnAfterUpdatingDocumentsAfterChangesAreRequested( self): time.sleep(3) approve_button = self.getText(self.release.approve_release_button) approve_button_text = "Approve release" self.verifyTextContains(actualText=approve_button, expectedText=approve_button_text) time.sleep(3) self.release.ApproveReleaseButtonClick() ''' Click button release to a Ente all the details and click submit Expected: Verify request button should be there Click requested button Enter comment and select value from drop down Click submit Scroll to bottom of screen Expected: Verify approver text at the bottom of the screen. Scroll to the top and click on upload document Upload deal memo doc Click submit ''' def VerifyNoApprovalButtonsAfterRequestChangesFromBtoA(self): self.release.ReleaseMoveToB() self.release.ReleasePopUpFieldEntry() time.sleep(2) self.dealdetail.SubmitButton() time.sleep(2) self.NoApprovalButtonsAfterRequestChanges() def ApproverSectionUpdatesToReflectRequestedChangesStatusFromBToA(self): time.sleep(2) self.ApproverSectionUpdatesToReflectRequestedChangesStatus() click_first_close_from_b_to_c = "//div[@id='app']/div/div[2]/div/div/div/div/div/div[3]/div/div[1]/div/img" def VerifyRequestRevisionFromBToA(self): time.sleep(2) # self.dealdetail.innerScrollUp(self.doc_upload_button) # time.sleep(2) self.elementClick(self.doc_upload_button) time.sleep(2) self.elementClick(self.click_first_close_icon) time.sleep(2) self.release.AddDealMemo() time.sleep(2) self.RequestModalSubmitButton() time.sleep(2) self.VerifyRequestButton() self.release.ApproveReleaseButtonClick() # C53692 Deal list filter type "Needs my approval" list does not include deals where I have request changes ''' Preconditions User has logged in Steps Create or find deal that needs your approval Navigate to deal from “Needs my approval” Click "Request changes" Navigate back to “Needs my approval” Expected Result The deal should not appear in the "Needs my approval" deal list ''' # change deal name deal_name_change = "//input[@placeholder='Unknown']" def ChangeDealName(self, dealname): time.sleep(2) self.elementClick(self.deal_name_change) time.sleep(2) self.clearField(self.deal_name_change) self.sendKeys(dealname, self.deal_name_change) # Enter deal name def EnterDealName(self): time.sleep(2) dealname = "#" self.ChangeDealName(dealname) more_filter = ".sidebar--header-icon:nth-child(4)" search_textbox = "//input[@placeholder='Search for deals']" no_deal_found = "//h3[contains(text(),'No deals matching your filters')]" def EnterSearchTextBox(self, name): self.elementClick(self.search_textbox) time.sleep(2) self.sendKeys(name, self.search_textbox) def PressEnter(self, value): self.sendKeys(value, self.search_textbox) def DealRemovedFromNeedMyApprovalAfterRequestChanges(self): time.sleep(3) self.elementClick(self.deal.click_need_my_approval) time.sleep(2) self.EnterDealName() time.sleep(2) self.NoApprovalButtonsAfterRequestChanges() time.sleep(2) self.deal.ClickBackArrow() time.sleep(4) self.elementClick(self.deal.click_need_my_approval) time.sleep(2) name = "#" self.EnterSearchTextBox(name) time.sleep(2) self.PressEnter(Keys.ENTER) time.sleep(2) no_deal_text = self.getText(self.no_deal_found) deal_text = "No deals matching your filters" self.verifyTextContains(actualText=no_deal_text, expectedText=deal_text)
class KeyChangesPages(SeleniumDriver): def __init__(self, driver): super().__init__(driver) self.deal = DealList(self.driver) self.dealdetail = DealDetailScreenPages(self.driver) self.unrelease = UnReleasePages(self.driver) self.release = ReleasePage(self.driver) self.driver = driver # Key changes chart does not show on deals with no previous data ''' Preconditions User is logged in to dealtrack Steps Click on the (+) on the bottom left of the page to add a new deal Enter a new address Click Add Go to the deal details page of deal added Expected Result Above the “Ganeral Info” & below Timeline section of the deal details page, there should be no mention of “Key changes” Note : This section will be displayed once deal is released to stage D & floors been added ''' scroll_to_financial = "//a[contains(text(),'Financials')]" key_changes_text = "//span[contains(text(),'Key changes since release')]" def ClickFinancialTab(self): self.elementClick(self.scroll_to_financial) def VerifyKeyChangesChartDoesNotShowOnDealsWithNoPreviousData(self): time.sleep(2) self.deal.AddNewDeal() time.sleep(2) self.ClickFinancialTab() time.sleep(2) if not self.isElementDisplayed(self.key_changes_text): self.log.info('Pass') assert True else: self.log.info('Fail') assert False # Key changes chart only shows values that have changed ''' Preconditions User is logged in to dealtrack User created a deal in E:(https://wework.testrail.net/index.php?/cases/view/58647&group_by=cases:section_id&group_id=6586&group_order=asc ) Steps Navigate to the deal created Click 'Release to D' CTA button In Modal add a Real estate manager Enter Desks and RSF values and select Est. C release and Possession date (remember RSF and Desk values) Press submit Observe: note there is no Key changes section! Click 'Add floors' CTA in 'Add floors' text box add '1' and press enter on keyboard In RSF add a different value than previously added in release to D modal, add USF value, add a different Desks value than previously added in release to D modal Add Possession and Opening dates Press save Expected Result On deal details page under description there is a Key changes since release section with a drop down stating the most recent stage (Stage D (Sourcing)) (this example will not have any other options in dropdown) Within chart you will see 4 columns: Data point column (Desks, RSF), Stage 'D ' (will change depending on stage, column contains the original value in that particular stage), Now (the changed value), Change (if it has Increased with a upward arrow icon in front, Decreased with a downward arrow in front, Added or Removed) Key Changes will have data points Desk RSF ''' desk_text = "//strong[contains(text(),'Desks')]" rsf_text = "//strong[contains(text(),'RSF')]" now_text = "//p[contains(text(),'Now')]" change_text = "//p[contains(text(),'Change')]" def VerifyKeyChangesChartOnlyShowsValuesThatHaveChanged(self): time.sleep(2) self.release.ReleaseEToD() self.release.AddFloors() self.isElementDisplayed(self.key_changes_text) self.isElementPresent(self.desk_text) self.isElementPresent(self.rsf_text) self.isElementPresent(self.now_text) self.isElementPresent(self.change_text) increase_decrease_change = ".sc-1c6ibka-0:nth-child(2) > .key-changes--change-column > .Mono-sc-1pt1tnu" def CheckChangeInText(self): self.getText(self.increase_decrease_change, locatorType='css') def VerifyChangeColumnVariation(self): time.sleep(2) actual_text = self.getText(self.increase_decrease_change, locatorType='css') expected_text = "Decreased" self.verifyTextContains(actualText=actual_text, expectedText=expected_text) # Change column signifies change in data D-C ''' Preconditions User is logged in to Dealtrack Page must be viewed with browser in full screen User has created a deal that has Key changes section: in Stage D (https://wework.testrail.net/index.php?/cases/view/58648&group_by=cases:section_id&group_id=6586&group_order=asc ) Steps: Click Release to C Expected Release to C modal appears 2 Upload Financial Model Update required deal info and add approvers Press submit Expected Release is submitted and modal is closed, once FiMo is done scrapping observe 'Key changes since release' has data points: -RSF -USF/desk -Gross construction cost -EBITDA -Payback -IRR 3 Observe 'Stage D' column has '-' and 'Now' column has the value scrapped from Financial Model Expected 'Now' column should display scraped values from Financial Model for data points with any changes: -Rent -Desks -RSF -USF/desk -Gross construction cost -EBITDA -Payback -IRR 4 The column on the far right of the key changes chart should be labeled “Change” Expected Change with display if the change has increased, decreased, added or removed ''' usf_desk = "//strong[contains(text(),'USF/desk')]" gross_construction_cost = "//strong[contains(text(),'Gross construction cost')]" ebitda = "//strong[contains(text(),'EBITDA')]" payback = "//strong[contains(text(),'Payback')]" irr = "//strong[contains(text(),'IRR')]" def VerifyDataChangeAfterReleasingDtoC(self): self.release.ReleaseDToCForm() time.sleep(2) self.ClickFinancialTab() time.sleep(2) self.isElementPresent(self.usf_desk) self.isElementPresent(self.gross_construction_cost) self.isElementPresent(self.ebitda) self.isElementPresent(self.payback) self.isElementPresent(self.irr) change_value = "//div[@id='financials']//div[2]/div[2]/div[1]" def VerifyChangesInChangeColumn(self): time.sleep(2) actual_text = self.getText(self.increase_decrease_change, locatorType='css') expected_text = "added" self.verifyTextContains(actualText=actual_text, expectedText=expected_text) def ChangeColumnSignifiesChangeInDataCToB(self): time.sleep(2) self.release.ReleaseProcessCTOB() time.sleep(2)
class DocumentSpecificPages(SeleniumDriver): def __init__(self, driver): super().__init__(driver) self.deall = DealList(self.driver) self.dealdetail = DealDetailScreenPages(self.driver) self.release = ReleasePage(self.driver) self.unrelease = UnReleasePages(self.driver) self.request = RequestRevisionPages(self.driver) self.driver = driver # C63079 Document View """ Preconditions User is logged into dealtrack Create a new deal by clicking on the (+) on the bottom left side of the page, Add an address and Click Add Steps Scroll below General info tab Expected Result 'Documents' section is displayed with the following associated tags in this order (Financial model, term sheet, deal memo, lease first then the rest in alphabetical order) 1. Financial Model 2. Term Sheet 3. Deal Memo 4. Lease 5. Budget 6. Ops Rider 7. Programming package (pkg) 8. Project schedule 9. Test Fit 10. RevOps FiMo Below the associated file tag you have a grey thumbnail with a (+) icon in the center Below target tags there is an 'Other attachments' section with a (+) icon next to it to upload attachments. Depending on side of the page the documents thumbnail displays will shift, if screen is wide enough all the target tags will be on one row, number of rows increase depending on how small the screen is but the size of the thumbnail does not change """ scroll_to_documents = "//a[contains(text(),'Documents')]" financial_model = "//span[contains(text(),'Financial model')]" deal_memo = "//span[contains(text(),'Deal memo')]" lease = "//span[contains(text(),'Lease')]" budget = "//span[contains(text(),'Budget')]" ops_rider = "//span[contains(text(),'Ops rider')]" programing_pkg = "//span[contains(text(),'Programming pkg')]" project_schedule = "//span[contains(text(),'Project schedule')]" revops = "//span[contains(text(),'RevOps FiMo')]" testFit = "//span[contains(text(),'Test fit')]" def Scroll_to_documents(self): self.elementClick(self.scroll_to_documents) def VerifyDocumentView(self): time.sleep(2) self.deall.ClickBackArrow() time.sleep(2) self.deall.AddNewDeal() time.sleep(2) self.Scroll_to_documents() time.sleep(2) self.elementPresenceCheck(self.deal_memo, byType='xpath') self.elementPresenceCheck(self.financial_model, byType='xpath') self.elementPresenceCheck(self.lease, byType='xpath') self.elementPresenceCheck(self.budget, byType='xpath') self.elementPresenceCheck(self.ops_rider, byType='xpath') self.elementPresenceCheck(self.programing_pkg, byType='xpath') self.elementPresenceCheck(self.project_schedule, byType='xpath') self.elementPresenceCheck(self.revops, byType='xpath') self.elementPresenceCheck(self.testFit, byType='xpath') # Specific target tag upload view ''' Preconditions User is logged into dealtrack User has created a new deal and is in stage E: (https://wework.testrail.net/index.php?/cases/view/59784 ) Upload each documents one by one. ''' click_new_financial_model = ".sc-12w36a0-0:nth-child(2) svg" click_lease_upload_pdf = ".sc-12w36a0-0:nth-child(5) svg" click_budget_upload_xls = ".sc-12w36a0-0:nth-child(6) svg" click_ops_rider_upload_pdf = ".sc-12w36a0-0:nth-child(7) svg" click_programing_pkg_upload_pdf = ".sc-12w36a0-0:nth-child(8) svg" click_project_schedule_upload_pdf = ".sc-12w36a0-0:nth-child(9) svg" click_revOps_upload_xls = ".sc-12w36a0-0:nth-child(10) svg" click_test_fit_upload_pdf = ".sc-12w36a0-0:nth-child(10) svg" click_other_attachment_upload_pdf = ".sc-12w36a0-0:nth-child(12) svg" def UploadPDF(self): doc = "C:/Users/Sagar/PycharmProjects/DealTrack/files/1.pdf" self.dealdetail.UploadDocuments(doc) time.sleep(20) def UploadCSV(self): doc = "C:/Users/Sagar/PycharmProjects/DealTrack/files/v4.2_Proforma(1).xlsb" self.dealdetail.UploadDocuments(doc) time.sleep(45) def ClickNewFinancialModel(self): self.elementClick(self.click_new_financial_model, locatorType='css') self.UploadPDF() def LeaseUpload(self): self.elementClick(self.click_lease_upload_pdf, locatorType="css") self.UploadPDF() def BudgetUpload(self): self.elementClick(self.click_budget_upload_xls, locatorType="css") self.UploadCSV() def OpsRiderUpload(self): self.elementClick(self.click_ops_rider_upload_pdf, locatorType="css") self.UploadPDF() def ProgramingPkgUpload(self): self.elementClick(self.click_programing_pkg_upload_pdf, locatorType="css") self.UploadPDF() def ProjectScheduleUpload(self): self.elementClick(self.click_project_schedule_upload_pdf, locatorType="css") self.UploadPDF() def RevOpsUpload(self): self.elementClick(self.click_revOps_upload_xls, locatorType="css") self.UploadCSV() def TestFitUpload(self): self.elementClick(self.click_test_fit_upload_pdf, locatorType="css") self.UploadPDF() def OtherAttachmentUpload(self): self.elementClick(self.click_other_attachment_upload_pdf, locatorType="css") self.UploadPDF() def UploadDocumentOneByOne(self): time.sleep(2) self.dealdetail.TermSheetDocument() self.dealdetail.FinacialDocuments() self.dealdetail.DealMemo() self.ClickNewFinancialModel() self.LeaseUpload() self.BudgetUpload() self.OpsRiderUpload() self.ProgramingPkgUpload() self.ProjectScheduleUpload() self.RevOpsUpload() self.TestFitUpload() self.OtherAttachmentUpload() # Lease target upload """ Lease thumbnail has a locked icon and is not viewable and does not download when clicked on """ lock_icon = ".Regular-sc-178ixox path" def LockIcon(self): self.getElement(self.lock_icon, locatorType='css') def VerifyLockIconAfterUploadingLeaseDocument(self): time.sleep(2) self.isElementPresent(self.LockIcon()) # Deal in stage D-C ''' Preconditions User is logged into dealtrack User created/ finds a deal in stage D Create a new deal by clicking on the (+) on the bottom left side of the page, Add an address and Click Add, Click release to D (Add release estate manager, Desks, RSF, Est C release date, possession date and press submit) Step Expected Result 1 Go to Documents section of deal details page Next to Documents with orange caution icon it says 1 needed Under target tag Financial Model it says "Upload needed" with an orange caution icon 2 Click on the (+) under financial model and upload a proforma Financial model thumbnail says {"D to C release"}{Time: Just now} Under Financial model tag it says 'Ready for approval'' Next to 'Documents' section it says 'Ready for approval' 3 Click on "Release to C" Modal opens and Financial modal has the document that was added on the deal details page under Financial model 4 Enter "edit deal info" details (description, market and landlord) Add approvers and press submit Modal closes (approval buttons appear if you made yourself an approver) unable to go back and upload any required document, can still cancel release request ''' # test_04VerifyDocumentDealInStageDtoC text_ready_for_approval = "//div[@id='documents']/div/div/div/div/div[2]" def DocumentDealInStageDtoC(self): time.sleep(2) self.release.ReleaseEToD() self.release.AddFloors() self.Scroll_to_documents() time.sleep(2) self.dealdetail.FinacialDocuments() self.elementPresenceCheck(self.text_ready_for_approval, byType='xpath') self.release.ReleaseDToC() # test_05VerifyDocumentDealInStageCtoB def DocumentDealInStageCtoB(self): time.sleep(2) self.Scroll_to_documents() time.sleep(2) text_to_verify = self.getText(self.text_ready_for_approval) original_text = "4 needed" self.verifyTextContains(actualText=text_to_verify, expectedText=original_text) time.sleep(2) self.dealdetail.TermSheetDocument() self.dealdetail.FinacialDocuments() self.dealdetail.DealMemo() self.ClickNewFinancialModel() self.elementPresenceCheck(self.text_ready_for_approval, byType='xpath') time.sleep(2) self.release.ClickButtonReleaseToC() self.release.ReleaseProcessCtoBStep2() self.release.ReleaseCToB() self.release.ReleaseMoveToB() # test_06VerifyDocumentDealInStageBtoA def DocumentDealInStageBtoA(self): time.sleep(2) self.Scroll_to_documents() time.sleep(2) text_to_verify = self.getText(self.text_ready_for_approval) original_text = "4 needed" self.verifyTextContains(actualText=text_to_verify, expectedText=original_text) time.sleep(2) self.dealdetail.TermSheetDocument() self.dealdetail.FinacialDocuments() self.dealdetail.DealMemo() self.ClickNewFinancialModel() self.LeaseUpload() text_to_verify_after_uploading = self.getText(self.text_ready_for_approval) original_text_after_uploading = "Ready for approval" self.verifyTextContains(actualText=text_to_verify_after_uploading, expectedText=original_text_after_uploading) self.elementPresenceCheck(self.text_ready_for_approval, byType='xpath') time.sleep(2) # Request changes newly uploaded required doc is on thumbnail ''' Step 1 Press Request changes button Expected Result Request changes Modal appears 2 Select "What needs to change" and comment and press submit Expected Result Modal is closed and "Upload documents" cta appears 3 Click "Upload documents" and change the Financial model that is present with a different financial model and press submit Expected Result under documents, the most recent financial modal is in the thumbnail and on the thumbnail it states {"D to C release"}{Time: Just now} ''' uploaded_needed = "//strong[contains(text(),'Upload needed')]" close_icon_to_remove_file = "//img[@class='close']" check_text_after_uploading_the_document = "//span[text()='D to C release']" # test_07VerifyRequestChangesNewlyUploadedRequiredDocIsOnThumbnail def RequestChangesNewlyUploadedRequiredDocIsOnThumbnail(self): time.sleep(2) self.release.ReleaseEToD() self.release.AddFloors() self.release.ReleaseDToCForm() time.sleep(2) self.request.NoApprovalButtonsAfterRequestChanges() time.sleep(2) self.elementClick(self.request.update_document) time.sleep(2) self.elementClick(self.close_icon_to_remove_file) time.sleep(2) self.release.AddFileMemoSheet() time.sleep(30) self.request.RequestModalSubmitButton() time.sleep(2) self.Scroll_to_documents() time.sleep(2) actual_text = self.getText(self.check_text_after_uploading_the_document) expected_text = "D to C release" self.verifyTextContains(actualText=actual_text, expectedText=expected_text) # Canceling a release request ''' Preconditions User is logged into dealtrack User has a deal awaiting a release request approval User completed Steps: Click on the 'Cancel Release' CTA Expected : Release request is canceled and all the documents that were added for the release in the thumbnail displays: {Stage canceled}{name}{Time} Example: {D to C release Canceled}{Rumi Begum, 2days ago} ''' # test_08VerifyCancelingAReleaseRequest click_cancel_release_request_from_overflow_menu = "//p[contains(text(),'Cancel release request')]" text_release_canceled = "//span[contains(text(),'(Canceled)')]" def CancelingAReleaseRequest(self): time.sleep(2) self.dealdetail.ClickMenuIcon() time.sleep(2) self.elementClick(self.click_cancel_release_request_from_overflow_menu) time.sleep(2) self.dealdetail.SubmitButton() time.sleep(2) self.Scroll_to_documents() time.sleep(2) actual_text = self.getText(self.text_release_canceled) expected_text = "Canceled" self.verifyTextContains(actualText=actual_text, expectedText=expected_text)