mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
17 lines
584 B
JavaScript
17 lines
584 B
JavaScript
const { When, Then } = require('@cucumber/cucumber');
|
|
const util = require('util');
|
|
const { expect } = require('playwright/test');
|
|
|
|
const DashboardPage = require('../pageObjects/DashboardPage');
|
|
|
|
const dashboardPage = new DashboardPage();
|
|
|
|
When('the user creates a project with name {string} using the webUI', async function (project) {
|
|
await dashboardPage.createProject(project);
|
|
});
|
|
|
|
Then('the created project {string} should be opened', async function (project) {
|
|
expect(
|
|
await page.locator(util.format(dashboardPage.projectTitleSelector, project)),
|
|
).toBeVisible();
|
|
});
|