it.only('Only a Care Team member can view a "Patient Profile".', () => { const proUser = users.proUser(); const confirmedPatient = users.patient(); userBasePage.createProfessional(proUser, process.env.COUNTRYAPI); const patient = userBasePage.createPatient( process.env.LANGUAGE, false, confirmedPatient, process.env.COUNTRYAPI, ); const practiseData = fixtureHelper.getFixture('practices').sharedPractice(); const practice = userBasePage.createSharedPractice(proUser, practiseData); userBasePage.addPracticeToPatient(patient, practice.practiceId); const proUserTemplateList = userBasePage.createProUsers( 4, proUser, practice.id, ); CountryOfResidencePage.open().submitForm( process.env.COUNTRY, process.env.LANGUAGE, ); IndexPage.login(proUser.email, proUser.password) .goToPatientsDashboard() .closeFirstUseModal(); PatientDashboardPage.openUserProfile(patient.firstName); PatientProfilePage.closeFirstUseModal().clickOnProfileNavButton(); NavigationBar.clickMainHeaderHamburgerButton(); MenuBarFrame.clickMenuSignOutLink(); IndexPage.login( proUserTemplateList[0].email, proUserTemplateList[0].password, proUserTemplateList[0], true, ) .goToPatientsDashboard() .closeFirstUseModal(); PatientDashboardPage.openUserProfile(patient.firstName); PatientProfilePage.closeFirstUseModal().clickOnProfileNavButton(); NavigationBar.clickMainHeaderHamburgerButton(); MenuBarFrame.clickMenuSignOutLink(); IndexPage.login( proUserTemplateList[1].email, proUserTemplateList[1].password, proUserTemplateList[1], true, ) .goToPatientsDashboard() .closeFirstUseModal(); PatientDashboardPage.openUserProfile(patient.firstName); PatientProfilePage.closeFirstUseModal().clickOnProfileNavButton(); NavigationBar.clickMainHeaderHamburgerButton(); MenuBarFrame.clickMenuSignOutLink(); IndexPage.login( proUserTemplateList[2].email, proUserTemplateList[2].password, proUserTemplateList[2], true, ) .goToPatientsDashboard() .closeFirstUseModal(); PatientDashboardPage.openUserProfile(patient.firstName); PatientProfilePage.closeFirstUseModal().clickOnProfileNavButton(); NavigationBar.clickMainHeaderHamburgerButton(); MenuBarFrame.clickMenuSignOutLink(); IndexPage.login( proUserTemplateList[3].email, proUserTemplateList[3].password, proUserTemplateList[3], true, ) .goToPatientsDashboard() .closeFirstUseModal(); PatientDashboardPage.openUserProfile(patient.firstName); PatientProfilePage.closeFirstUseModal().clickOnProfileNavButton(); });