Skip to content

Commit ec84180

Browse files
authored
Merge pull request #898 from nextcloud-libraries/chore/deprecate-selectors
2 parents cb07180 + 1a5b6ba commit ec84180

4 files changed

Lines changed: 17 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66

77
All notable changes to this project will be documented in this file.
88

9+
10+
## v0.4.0 - UNRELEASED
11+
### Notes
12+
The Cypress selectors provided by the package are now deprecated and will be removed with the next release.
13+
Instead use role based selectors like `cy.findByRole` from `@testing-library/cypress`.
14+
915
## v0.3.0 - 2025-10-14
1016
### Added
1117
- feat: rename repository to e2e test server \([#758](https://github.com/nextcloud-libraries/nextcloud-e2e-test-server/pull/758)\)

__tests__/tsconfig.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

lib/selectors/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
* A Selector is a function that returns a cypress get or find chain.
88
* You can pass an object to use its data and narrow down
99
* tests against the various elements.
10+
*
11+
* @deprecated - Use role based selectors instead (cy.findByRole, cy.findByLabelText, etc.)
1012
*/
1113
export interface Selector {
1214
(args?: Object): Cypress.Chainable<JQuery>

lib/selectors/uploadPicker.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ import type { Selector } from "."
77
// This is a list of selectors for the @nextcloud/upload library
88
// @see https://github.com/nextcloud/nextcloud-upload
99

10+
/**
11+
* @deprecated - Use role based selectors instead (cy.findByRole, cy.findByLabelText, etc.)
12+
*/
1013
export const UploadPicker: Selector = () => cy.get('[data-cy-upload-picker]')
14+
/**
15+
* @deprecated - Use role based selectors instead (cy.findByRole, cy.findByLabelText, etc.)
16+
*/
1117
export const UploadPickerInput: Selector = () => UploadPicker().find('[data-cy-upload-picker-input]')
18+
/**
19+
* @deprecated - Use role based selectors instead (cy.findByRole, cy.findByLabelText, etc.)
20+
*/
1221
export const UploadPickerAddButton: Selector = () => UploadPicker().find('[data-cy-upload-picker-add]')

0 commit comments

Comments
 (0)