-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OZ-352: Creating OpenMRS role syncs the role into Keycloak
- Loading branch information
Showing
7 changed files
with
67 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { test, expect } from '@playwright/test'; | ||
import { HomePage } from '../utils/functions/testBase'; | ||
|
||
let homePage: HomePage; | ||
|
||
test.beforeEach(async ({ page }) => { | ||
const homePage = new HomePage(page); | ||
await homePage.initiateLogin(); | ||
|
||
await expect(page).toHaveURL(/.*home/); | ||
}); | ||
|
||
test('Creating OpenMRS role syncs the role into Keycloak', async ({ page }) => { | ||
// setup | ||
await page.goto(`${process.env.E2E_BASE_URL}/openmrs`); | ||
await page.getByRole('link', { name: 'Administration' }).click(); | ||
await page.getByRole('link', { name: 'Manage Roles' }).click(); | ||
const homePage = new HomePage(page); | ||
await homePage.addRole(); | ||
|
||
// replay | ||
await homePage.goToKeycloak(); | ||
await page.getByTestId('realmSelectorToggle').click(); | ||
await page.getByRole('menuitem', { name: 'ozone' }).click(); | ||
await page.getByRole('link', { name: 'Clients' }).click(); | ||
await page.getByRole('link', { name: 'openmrs', exact: true }).click(); | ||
await page.getByTestId('rolesTab').click(); | ||
|
||
// verify | ||
const role = await page.locator("table tbody tr td:nth-child(1) a"); | ||
await expect(role).toHaveText('System Developer'); | ||
}); | ||
|
||
test.afterEach(async ({ page }) => { | ||
await page.close(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters