generated from openmrs/openmrs-esm-template-app
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(test) O3-3601 : E2E tests for User onboarding #7
Merged
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
d4b2a95
Merge remote-tracking branch 'origin/test/O3-3601' into test/O3-3601
Vijaykv5 fff13b0
update selectors
Vijaykv5 0152bbf
Replace the joyride tooltip selectors
Vijaykv5 e03c7a2
updated bash script to have patient-search-app module
Vijaykv5 42c96ee
Updated script with other modules and playwright config file
Vijaykv5 6bf8b78
Updated playwrightto set the videos and trace on
Vijaykv5 7b91aee
separated tests and modifying selector for tooltip
Vijaykv5 de4310f
change description of the last step
Vijaykv5 f8061ba
updated to ghost button and list to unordered list
Vijaykv5 b1ea065
updated the selector for basic walkthrough test
Vijaykv5 79eacf9
(fix) : add full content of steps
Vijaykv5 7bebe00
Update playwright.config.ts
jayasanka-sack File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,60 @@ | ||||||
import { test } from '@playwright/test'; | ||||||
import { HomePage } from '../pages'; | ||||||
import { expect } from '@playwright/test'; | ||||||
|
||||||
test('Basic Walkthrough', async ({ page }) => { | ||||||
const homePage = new HomePage(page); | ||||||
|
||||||
await test.step('When I visit the home page', async () => { | ||||||
await homePage.goto(); | ||||||
}); | ||||||
|
||||||
await test.step('And I click on the help menu button', async () => { | ||||||
await page.locator('[id="single-spa-application\\:\\@openmrs\\/esm-help-menu-app-page-0"]').getByRole('button').click(); | ||||||
}); | ||||||
|
||||||
await test.step('And I click on the tutorials button', async () => { | ||||||
await page.getByText(/tutorials/i).click(); | ||||||
}); | ||||||
|
||||||
await test.step('Then I should see the tutorial modal', async () => { | ||||||
await expect(page.getByRole('heading', { name: 'Tutorials' })).toBeVisible(); | ||||||
await expect( | ||||||
page.getByText(/find walkthroughs and video tutorials on some of the core features of openMRS./i), | ||||||
).toBeVisible(); | ||||||
}); | ||||||
|
||||||
await test.step('And I click on the Basic Tutorial walkthrough', async () => { | ||||||
await page.getByText('Walkthrough').nth(1).click(); | ||||||
}); | ||||||
|
||||||
await test.step('Then I should see the first Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'Welcome to OpenMRS!' }).nth(1)).toBeVisible(); | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
await page.getByLabel('Next', { exact: true }).click(); | ||||||
jayasanka-sack marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
}); | ||||||
|
||||||
await test.step('And I should see the search icon Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'This is the search icon.' }).nth(1)).toBeVisible(); | ||||||
await page.getByLabel('Next', { exact: true }).click(); | ||||||
}); | ||||||
|
||||||
await test.step('Then I should see the add patient icon Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'This is the add patient' }).nth(1)).toBeVisible(); | ||||||
await page.getByLabel('Next', { exact: true }).click(); | ||||||
}); | ||||||
|
||||||
await test.step('And I should see the user icon Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'The user icon' }).nth(1)).toBeVisible(); | ||||||
await page.getByLabel('Next', { exact: true }).click(); | ||||||
}); | ||||||
|
||||||
await test.step('Then I should see the active visits Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'This table displays active visits' }).nth(1)).toBeVisible(); | ||||||
await page.getByLabel('Next', { exact: true }).click(); | ||||||
}); | ||||||
|
||||||
await test.step('And I should see the appointments table Joyride tooltip', async () => { | ||||||
await expect(page.locator('div').filter({ hasText: 'This table shows appointments' }).nth(1)).toBeVisible(); | ||||||
await page.getByLabel('Last').click(); | ||||||
}); | ||||||
}); |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't guarantee the order of the list. The order may change when we add new tutorials. So, we need to think of a better selector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jayasanka-sack I didn't figure out how we can select those walkthoroughs.
An approach that came to my mind is having a selector in the tutorial modal #L49 and searching for the Heading and corresponding walkthrough. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First of all, I've noticed a few adjustments needed for the tutorial to follow best practices:
Here is how your code should look (there won't be any visual changes):
Once you've done that, you can select the button with this:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a small visual change in the alignment of buttons. is this fine?
walkthrough-btn.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's fine. Btw, can we get the close button fixed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is due to the upgrade in carbon dependencies in this PR
This would be the fix #215, I'll talk with dennis regarding merge of that PR in todays coffee call.