Skip to content
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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
12 changes: 8 additions & 4 deletions e2e/specs/openConceptLab.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,26 @@ test.beforeEach(async ({ api }) => {
test('should be able to setup a subscription and import concepts', async ({ page }) => {
dilankavishka marked this conversation as resolved.
Show resolved Hide resolved
const openConceptLabPage = new OpenConceptLabPage(page);

// Setup the subscription
await test.step('When I setup the subscription', async () => {
await openConceptLabPage.goto();
await openConceptLabPage.addOclSubscription();
});

// Start an Import
await test.step('And I starts and import', async () => {
dilankavishka marked this conversation as resolved.
Show resolved Hide resolved
await openConceptLabPage.importTab().click();
await openConceptLabPage.startImport();
});

// Check results of the import
await test.step('Then the import results should show in the test report', async () => {
dilankavishka marked this conversation as resolved.
Show resolved Hide resolved
await openConceptLabPage.goto();
await openConceptLabPage.previousImportsTab().click();
await expect(openConceptLabPage.previousImportsTable()).toHaveText(/\d+ items fetched/);
});

// Unsubscribe
await test.step('And I unsubscribes', async () => {
dilankavishka marked this conversation as resolved.
Show resolved Hide resolved
await openConceptLabPage.subscriptionTab().click();
await openConceptLabPage.unsubscribe();
});
dilankavishka marked this conversation as resolved.
Show resolved Hide resolved
});

test.afterEach(async ({ api }) => {
Expand Down
Loading