![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@appfolio/react-gears-cypress
Advanced tools
This is a collection of helpers for testing
react-gears browser UIs with
Cypress. It provides "finder" functions for finding react-gears
components
in the DOM, Cypress commands for interacting with compomnents, and some fuzzy
text-matching functions to promote more reliable tests.
NOTE: due to historical precedent and the limitations of GitHub packages, this package is confusingly published to two different NPM scope names depending on the repository.
@appfolio/react-gears-cypress
npm.pkg.github.com
, it is @appfolio-im/react-gears-cypress
The package contents are identical for a given version; the only difference is the distribution
mechanism.
Clients should choose a distribution repository and use the suitable corresponding scope name.
In the long run we hope to move this repository back to the @appfolio
org and unify the scopes.
Install the commands at startup by adding a few lines to cypress/support/commands.js
:
import { commands as gears } from 'react-gears-cypress'
// Adds all commands: clear, fill, gears, select. Pass string[] to
// install just some of the commands.
gears.add();
Then, in each test where you want to interact with react-gears components:
import { BlockPanel, Datapair, Input, Select } from 'react-gears-cypress';
cy.component(BlockPanel, 'Personal Information').within(() => {
cy.component(Datapair, 'First Name').contains('Alice')
cy.component(Input, 'Last Name').clear().type('Liddel')
cy.component(Select, 'Favorite Color').select('red')
})
Inputs and other components are always identified by their label/title. The
intended usage is with the form-labelling component FormLabelGroup
, which provides a <label>
element for basically any nested component(s).
import { FormLabelGroup, Input } from '@appfolio/react-gears';
...
const TestableComponent = () => (
<FormLabelGroup label="foo"><Input/></FormLabelGroup>
)
To deal with labels, values and other text whose whitespace varies, you
can use the match
helpers which return a RegExp that can be passed
instead of a string for more precise or relaxed matching.
import {Datapair, match} from 'react-gears-cypress
// Matches "Name" or "Name *" but not "First Name"
cy.component(Datapair, match.exact('Name'))
// Matches "foo bar", "foo badger bar", "foo badger badger mushroom bar", etc
cy.component(Datapair, match.fuzzyFirstLast('foo', 'bar'))
// Matches "foo\nbar baz", "foo bar\nbaz", etc
cy.component(Datapair, match.fuzzyMultiline('foo bar baz'))
npm run build
npm run type-check
And to run in --watch
mode:
npm run type-check:watch
To release a new version:
Merge your work to master.
Check package.json
for the previously released version X.Y.Z.
Run git log vX.Y.Z..HEAD
to review new work from yourself and others. Decide on a new version number according to semver guidelines; for the sake of this example, let's say
you decide the new version will be X.Y.W
.
X.Y.Z-rc.0
(then rc.1
, etc)npm version X.Y.W
to bump to the new version you decided on above.npm version <patch|minor|major>
if you just want to increment one of those components.Run npm run build
to produce distributables with the new version number.
npm publish
to share your distributables with the world.
--tags=beta
to the npm publish
command!git push
and git push --tags
to ensure that the npm version bump is preserved
for posterity.FAQs
# What is this?
The npm package @appfolio/react-gears-cypress receives a total of 9 weekly downloads. As such, @appfolio/react-gears-cypress popularity was classified as not popular.
We found that @appfolio/react-gears-cypress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.