71 lines
1.4 KiB
TypeScript
71 lines
1.4 KiB
TypeScript
|
|
/**
|
||
|
|
* Centralized Playwright selectors — mirrors TESTID from
|
||
|
|
* apps/web/src/components/ui/testids.ts
|
||
|
|
*
|
||
|
|
* Usage:
|
||
|
|
* import { SEL } from './helpers/selectors';
|
||
|
|
* await page.getByTestId(SEL.toast.success).click();
|
||
|
|
*/
|
||
|
|
export const SEL = {
|
||
|
|
// Toast
|
||
|
|
toast: {
|
||
|
|
success: 'toast-success',
|
||
|
|
error: 'toast-error',
|
||
|
|
info: 'toast-info',
|
||
|
|
message: 'toast-message',
|
||
|
|
close: 'toast-close',
|
||
|
|
},
|
||
|
|
|
||
|
|
// Dialog
|
||
|
|
dialog: {
|
||
|
|
root: 'dialog',
|
||
|
|
title: 'dialog-title',
|
||
|
|
close: 'dialog-close',
|
||
|
|
content: 'dialog-content',
|
||
|
|
footer: 'dialog-footer',
|
||
|
|
confirm: 'dialog-confirm',
|
||
|
|
cancel: 'dialog-cancel',
|
||
|
|
},
|
||
|
|
|
||
|
|
// Confirmation Dialog
|
||
|
|
confirmationDialog: {
|
||
|
|
root: 'confirmation-dialog',
|
||
|
|
description: 'confirmation-description',
|
||
|
|
icon: 'confirmation-icon',
|
||
|
|
},
|
||
|
|
|
||
|
|
// Radio
|
||
|
|
radioGroup: {
|
||
|
|
root: 'radio-group',
|
||
|
|
item: (value: string) => `radio-item-${value}`,
|
||
|
|
},
|
||
|
|
|
||
|
|
// Checkbox
|
||
|
|
checkbox: {
|
||
|
|
root: 'checkbox',
|
||
|
|
input: 'checkbox-input',
|
||
|
|
label: 'checkbox-label',
|
||
|
|
},
|
||
|
|
|
||
|
|
// Layout
|
||
|
|
sidebar: 'app-sidebar',
|
||
|
|
header: 'app-header',
|
||
|
|
player: 'global-player',
|
||
|
|
|
||
|
|
// Auth
|
||
|
|
loginForm: 'login-form',
|
||
|
|
loginSubmit: 'login-submit',
|
||
|
|
registerForm: 'register-form',
|
||
|
|
|
||
|
|
// Player
|
||
|
|
audioElement: 'audio-element',
|
||
|
|
volumeControl: 'volume-control',
|
||
|
|
|
||
|
|
// Search
|
||
|
|
searchInput: 'search-input',
|
||
|
|
|
||
|
|
// Cards
|
||
|
|
trackCard: 'track-card',
|
||
|
|
playlistCard: 'playlist-card',
|
||
|
|
} as const;
|