1
0
Fork 0
mirror of https://github.com/plankanban/planka.git synced 2025-08-04 13:05:24 +02:00

test: Add BDD UI tests using Playwright (#911)

This commit is contained in:
Nalem7 2024-10-18 01:51:48 +05:45 committed by GitHub
parent df7746f896
commit e7d7425768
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 1260 additions and 120 deletions

View file

@ -0,0 +1,17 @@
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();
});