mirror of
https://github.com/Redocly/redoc.git
synced 2025-11-04 17:57:30 +03:00
Co-authored-by: Roman Hotsiy <gotsijroman@gmail.com> Co-authored-by: Alex Varchuk <olexandr.varchuk@gmail.com> Co-authored-by: Oprysk Vyacheslav <vyacheslav@redocly.com> Co-authored-by: Ivan Kropyvnytskyi <130547411+ivankropyvnytskyi@users.noreply.github.com> Co-authored-by: Yevhen Pylyp <yevhen.pylyp@redocly.com> Co-authored-by: Vladyslav Makarenko <vladyslav.makarenko@redocly.com> Co-authored-by: Yevhenii Medviediev <yevhenii.medviediev@redocly.com> Co-authored-by: Oleksii Horbachevskyi <oleksii.horbachevskyi@redocly.com> Co-authored-by: volodymyr-rutskyi <rutskyi.v@gmail.com> Co-authored-by: Adam Altman <adam@redoc.ly> Co-authored-by: Andrew Tatomyr <andrew.tatomyr@redocly.com> Co-authored-by: Anastasiia Derymarko <anastasiia@redocly.com> Co-authored-by: Roman Marshevskyy <roman.marshevskyy@redoc.ly> Co-authored-by: Lorna Mitchell <lorna.mitchell@redocly.com> Co-authored-by: Taylor Krusen <taylor.krusen@redocly.com>
32 lines
745 B
TypeScript
32 lines
745 B
TypeScript
import { type Page } from '@playwright/test';
|
|
|
|
export default class Panel {
|
|
readonly page: Page;
|
|
readonly samplesSelector: string;
|
|
|
|
constructor(page) {
|
|
this.page = page;
|
|
this.samplesSelector = '#pet\\/updatepet [data-testid="example-switch"]';
|
|
}
|
|
|
|
getOverview() {
|
|
return this.page.locator('[data-testid="panel-overview"]');
|
|
}
|
|
|
|
getDownloadDescription() {
|
|
return this.page.locator('[data-testid="panel-download-openapi-description"]');
|
|
}
|
|
|
|
getServers() {
|
|
return this.page.locator('[data-testid="panel-servers"]');
|
|
}
|
|
|
|
get samples() {
|
|
return this.page.locator(this.samplesSelector);
|
|
}
|
|
|
|
async getLabel(text: string) {
|
|
return this.samples.locator('.dropdown-wrapper > label').getByText(text);
|
|
}
|
|
}
|