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

[Playwright] - Error reading LabelName.PACKAGE #1142

Open
harmin-parra opened this issue Sep 18, 2024 · 0 comments
Open

[Playwright] - Error reading LabelName.PACKAGE #1142

harmin-parra opened this issue Sep 18, 2024 · 0 comments

Comments

@harmin-parra
Copy link

harmin-parra commented Sep 18, 2024

Describe the bug
Since [email protected], LabelName.PACKAGE is undefined

To Reproduce
Execute this playwright test

const { test, expect, Page } = require('@playwright/test');
import { allure, LabelName } from "allure-playwright";
import AjaxPage from '../pages/ajax.page';
const assert = require('assert');

  test.beforeEach(async ({ page }) => {
    await page.goto("https://harmin-demo.gitlab.io/reports/web/ajax.html");
  });


  test('Ajax verification with intercept', async ({ page }) => {
    await allure.description("Testing a webpage using AJAX");
    await allure.epic("Web interface (Playwright)");
    await allure.story("Ajax");
    await allure.parentSuite("Web interface (Playwright)");
    await allure.suite("Ajax");
    await allure.label(LabelName.PACKAGE, "web_playwright.ajax.spec.ts");
    // rest of test
  });

Result:

    TypeError: Cannot read properties of undefined (reading 'PACKAGE')

      22 |     await allure.parentSuite("Web interface (Playwright)");
      23 |     await allure.suite("Ajax");
    > 24 |     await allure.label(LabelName.PACKAGE, "web_playwright.ajax.spec.ts");
         |                                  ^

This error didn't happen in [email protected]

Expected behavior.
LabelName.PACKAGE is defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant