Skip to content

O3 - 2199 : Add BDD steps on tests #40

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

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }) => {
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 () => {
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 () => {
await openConceptLabPage.goto();
await openConceptLabPage.previousImportsTab().click();
await expect(openConceptLabPage.previousImportsTable()).toHaveText(/\d+ items fetched/);
});

// Unsubscribe
await test.step('And I unsubscribes', async () => {
await openConceptLabPage.subscriptionTab().click();
await openConceptLabPage.unsubscribe();
});
});

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