-
Notifications
You must be signed in to change notification settings - Fork 20
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
O3 - 2199 : Add BDD steps on tests #40
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,22 +13,26 @@ test.beforeEach(async ({ api }) => { | |
test('should be able to setup a subscription and import concepts', async ({ page }) => { | ||
const openConceptLabPage = new OpenConceptLabPage(page); | ||
|
||
// Setup the subscription | ||
await openConceptLabPage.goto(); | ||
await openConceptLabPage.addOclSubscription(); | ||
await test.step('When I setup the subscription', async () => { | ||
await openConceptLabPage.goto(); | ||
await openConceptLabPage.addOclSubscription(); | ||
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. @Piumal1999 @dilankavishka Since Then break down it in to steps.
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. @jayasanka-sack Sure! |
||
}); | ||
|
||
// Start an Import | ||
await openConceptLabPage.importTab().click(); | ||
await openConceptLabPage.startImport(); | ||
await test.step('And I starts an import', async () => { | ||
await openConceptLabPage.importTab().click(); | ||
await openConceptLabPage.startImport(); | ||
}); | ||
|
||
// Check results of the import | ||
await openConceptLabPage.goto(); | ||
await openConceptLabPage.previousImportsTab().click(); | ||
await expect(openConceptLabPage.previousImportsTable()).toHaveText(/\d+ items fetched/); | ||
await test.step('Then the import results should appear in previous imports', async () => { | ||
await openConceptLabPage.goto(); | ||
await openConceptLabPage.previousImportsTab().click(); | ||
await expect(openConceptLabPage.previousImportsTable()).toHaveText(/\d+ items fetched/); | ||
}); | ||
|
||
// Unsubscribe | ||
await openConceptLabPage.subscriptionTab().click(); | ||
await openConceptLabPage.unsubscribe(); | ||
await test.step('And I unsubscribe', async () => { | ||
await openConceptLabPage.subscriptionTab().click(); | ||
await openConceptLabPage.unsubscribe(); | ||
}); | ||
Comment on lines
+32
to
+35
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. Don't we need to expect anything after performing this step? 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. @jayasanka-sack 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. No. I mean, what we can expect after unsubscribing? A success message? I think an extra "Then" step would be nice to have. |
||
}); | ||
|
||
test.afterEach(async ({ api }) => { | ||
|
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.
Test name should be renamed with the action. Check other repos.
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 Sure!