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

feat(deps): upgrade all deps #38

Merged
merged 1 commit into from
Apr 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ never done that before, that's great! Check this free short video tutorial to
learn how: http://kcd.im/pull-request
-->

* `cypress-testing-library` version:
* `node` version:
* `npm` (or `yarn`) version:
- `cypress-testing-library` version:
- `node` version:
- `npm` (or `yarn`) version:

Relevant code or config

Expand Down
7 changes: 3 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ merge of your pull request!

<!-- to check an item, place an "x" in the box like so: "- [x] Documentation" -->

* [ ] Documentation
* [ ] Tests
* [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->
* [ ] Added myself to contributors table <!-- this is optional, see the contributing guidelines for instructions -->
- [ ] Documentation
- [ ] Tests
- [ ] Ready to be merged <!-- In your opinion, is this ready to be merged as soon as it's reviewed? -->

<!-- feel free to add additional comments -->
16 changes: 0 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,6 @@ Thanks for being willing to contribute!
> branch. Whenever you want to update your version of `master`, do a regular
> `git pull`.

## Add yourself as a contributor
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using the bot now.


This project follows the [all contributors][all-contributors] specification.
To add yourself to the table of contributors on the `README.md`, please use the
automated script as part of your PR:

```console
npm run add-contributor
```

Follow the prompt and commit `.all-contributorsrc` and `README.md` in the PR.
If you've already added yourself to the list and are making
a new type of contribution, you can run it again and select the added
contribution type.

## Committing and Pushing changes

Please make sure to run the tests before you commit your changes. You can run
Expand All @@ -68,5 +53,4 @@ Also, please watch the repo and respond to questions/bug reports/feature
requests! Thanks!

[egghead]: https://egghead.io/series/how-to-contribute-to-an-open-source-project-on-github
[all-contributors]: https://github.com/kentcdodds/all-contributors
[issues]: https://github.com/kentcdodds/cypress-testing-library/issues
20 changes: 10 additions & 10 deletions other/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ orientation.
Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
- The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
- Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities
Expand Down
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
"precommit": "kcd-scripts precommit",
"dtslint": "dtslint typings"
},
"husky": {
"hooks": {
"pre-commit": "kcd-scripts pre-commit"
}
},
"files": [
"dist",
"add-commands.js",
Expand All @@ -44,14 +49,15 @@
"author": "Kent C. Dodds <kent@doddsfamily.us> (http://kentcdodds.com/)",
"license": "MIT",
"dependencies": {
"@babel/runtime": "^7.4.3",
"dom-testing-library": "^3.12.4"
},
"devDependencies": {
"cypress": "3.1.1",
"dtslint": "^0.3.0",
"kcd-scripts": "^0.37.0",
"cypress": "3.2.0",
"dtslint": "^0.6.0",
"kcd-scripts": "^1.1.3",
"npm-run-all": "^4.1.2",
"serve": "^10.0.0",
"serve": "^11.0.0",
"typescript": "^3.1.6",
"wait-port": "^0.2.2"
},
Expand Down
16 changes: 16 additions & 0 deletions src/__tests__/__snapshots__/commands.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,22 @@ Array [
"getAllByDisplayValue",
"getAllByRole",
"getByRole",
"findByLabelText",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This just came along for the ride. I'm actually not sure how these ones will behave in Cypress world, but I think they'll be fine to include.

"findAllByLabelText",
"findByPlaceholderText",
"findAllByPlaceholderText",
"findByText",
"findAllByText",
"findByAltText",
"findAllByAltText",
"findByTitle",
"findAllByTitle",
"findByDisplayValue",
"findAllByDisplayValue",
"findByRole",
"findAllByRole",
"findByTestId",
"findAllByTestId",
"queryByPlaceholderText",
"queryAllByPlaceholderText",
"queryByTestId",
Expand Down
14 changes: 5 additions & 9 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,15 @@ const commands = Object.keys(queries).map(queryName => {
const lastArg = args[args.length - 1]
const defaults = getDefaultCommandOptions()
const waitOptions =
typeof lastArg === 'object'
? Object.assign({}, defaults, lastArg)
: defaults
typeof lastArg === 'object' ? {...defaults, ...lastArg} : defaults

const queryImpl = queries[queryName]
const baseCommandImpl = doc => {
const container = getContainer(waitOptions.container || doc)
return waitForElement(
() => queryImpl(container, ...args),
Object.assign({}, waitOptions, {
container,
}),
)
return waitForElement(() => queryImpl(container, ...args), {
...waitOptions,
container,
})
}
let commandImpl
if (
Expand Down
5 changes: 1 addition & 4 deletions src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ function getContainer(container) {
return getFirstElement(container)
}

export {
getFirstElement,
getContainer,
}
export {getFirstElement, getContainer}

/* globals Cypress, cy */