Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Jun 6, 2024
2 parents ce26030 + 5b7836c commit aeb0887
Show file tree
Hide file tree
Showing 44 changed files with 243 additions and 230 deletions.
23 changes: 0 additions & 23 deletions .eslintrc.json

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/Code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ body:
attributes:
label: 👀 Before submitting...
options:
- label: I upgraded to pagy version 8.4.3
- label: I upgraded to pagy version 8.4.4
required: true
- label: I searched through the [Documentation](https://ddnexus.github.io/pagy/)
required: true
Expand Down
4 changes: 2 additions & 2 deletions .github/latest_release_body.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
the [details](https://github.com/ddnexus/pagy/discussions/672#discussioncomment-9212328))
- See the [CHANGELOG](https://ddnexus.github.io/pagy/changelog) for possible breaking changes

### Changes in 8.4.3
### Changes in 8.4.4

<!-- changes start -->
- Deprecate/rename javascript files keeping copies of old files to avoid production breaking changes; updates playground apps
- Update eslint: new configuration, stricter rules and javascript code
<!-- changes end -->

[CHANGELOG](https://ddnexus.github.io/pagy/changelog)

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Bump_Version.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Cypress_Open.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .idea/runConfigurations/Cyress_Test.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ If you upgrade from version `< 8.0.0` see the following:
- `pagy-module.d.ts`: use `pagy.d.ts`
<hr>

## Version 8.4.4

- Update eslint: new configuration, stricter rules and javascript code

## Version 8.4.3

- Deprecate/rename javascript files keeping copies of old files to avoid production breaking changes; updates playground apps
Expand Down
113 changes: 57 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
PATH
remote: gem
specs:
pagy (8.4.3)
pagy (8.4.4)

GEM
remote: https://rubygems.org/
specs:
actioncable (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
actioncable (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
zeitwerk (~> 2.6)
actionmailbox (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
actionmailbox (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.1.3.3)
actionpack (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activesupport (= 7.1.3.3)
actionmailer (7.1.3.4)
actionpack (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activesupport (= 7.1.3.4)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.2)
actionpack (7.1.3.3)
actionview (= 7.1.3.3)
activesupport (= 7.1.3.3)
actionpack (7.1.3.4)
actionview (= 7.1.3.4)
activesupport (= 7.1.3.4)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actiontext (7.1.3.3)
actionpack (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
actiontext (7.1.3.4)
actionpack (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.1.3.3)
activesupport (= 7.1.3.3)
actionview (7.1.3.4)
activesupport (= 7.1.3.4)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activejob (7.1.3.3)
activesupport (= 7.1.3.3)
activejob (7.1.3.4)
activesupport (= 7.1.3.4)
globalid (>= 0.3.6)
activemodel (7.1.3.3)
activesupport (= 7.1.3.3)
activerecord (7.1.3.3)
activemodel (= 7.1.3.3)
activesupport (= 7.1.3.3)
activemodel (7.1.3.4)
activesupport (= 7.1.3.4)
activerecord (7.1.3.4)
activemodel (= 7.1.3.4)
activesupport (= 7.1.3.4)
timeout (>= 0.4.0)
activestorage (7.1.3.3)
actionpack (= 7.1.3.3)
activejob (= 7.1.3.3)
activerecord (= 7.1.3.3)
activesupport (= 7.1.3.3)
activestorage (7.1.3.4)
actionpack (= 7.1.3.4)
activejob (= 7.1.3.4)
activerecord (= 7.1.3.4)
activesupport (= 7.1.3.4)
marcel (~> 1.0)
activesupport (7.1.3.3)
activesupport (7.1.3.4)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
Expand All @@ -95,7 +95,8 @@ GEM
domain_name (0.6.20240107)
drb (2.2.1)
erubi (1.12.0)
ffi (1.16.3)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
Expand Down Expand Up @@ -144,7 +145,7 @@ GEM
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
mutex_m (0.2.0)
net-imap (0.4.11)
net-imap (0.4.12)
date
net-protocol
net-pop (0.1.2)
Expand Down Expand Up @@ -181,30 +182,30 @@ GEM
rackup (2.1.0)
rack (>= 3)
webrick (~> 1.8)
rails (7.1.3.3)
actioncable (= 7.1.3.3)
actionmailbox (= 7.1.3.3)
actionmailer (= 7.1.3.3)
actionpack (= 7.1.3.3)
actiontext (= 7.1.3.3)
actionview (= 7.1.3.3)
activejob (= 7.1.3.3)
activemodel (= 7.1.3.3)
activerecord (= 7.1.3.3)
activestorage (= 7.1.3.3)
activesupport (= 7.1.3.3)
rails (7.1.3.4)
actioncable (= 7.1.3.4)
actionmailbox (= 7.1.3.4)
actionmailer (= 7.1.3.4)
actionpack (= 7.1.3.4)
actiontext (= 7.1.3.4)
actionview (= 7.1.3.4)
activejob (= 7.1.3.4)
activemodel (= 7.1.3.4)
activerecord (= 7.1.3.4)
activestorage (= 7.1.3.4)
activesupport (= 7.1.3.4)
bundler (>= 1.15.0)
railties (= 7.1.3.3)
railties (= 7.1.3.4)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.1.3.3)
actionpack (= 7.1.3.3)
activesupport (= 7.1.3.3)
railties (7.1.3.4)
actionpack (= 7.1.3.4)
activesupport (= 7.1.3.4)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
Expand Down
Binary file modified bun.lockb
Binary file not shown.
12 changes: 0 additions & 12 deletions e2e/.eslintrc.json

This file was deleted.

20 changes: 12 additions & 8 deletions e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,28 @@
Pagy provides quite a few helpers that render the pagination elements for different js-frameworks on the client side. They are
tested with the [Pagy Playground](https://ddnexus.github.io/pagy/playground/) apps and [Cypress](https://www.cypress.io).

If you you need to run the E2E tests, here are two different ways to run them.
Notice: the `e2e` dir containing the cypress tests is also a minimalistic workspace. That is a solution needed to workaround [this cypress issue](https://github.com/cypress-io/cypress/issues/22273) and keep everything cypress-related in a single dir inside the project (instead of files and dirs mixed with the main project).

## Testing

## 1. Github Actions
You have two different ways to run the tests:

### 1. Github Actions

Just create a PR and all the ruby and e2e tests will run on GitHub. Usually this option is fine for simple PRs that pass the ruby
tests.

**Notice**: This option is not enabled by default in Github for new contributors, however after you create a PR it will get
enabled ASAP.

## 2. Run E2E Tests On Your System
### 2. Run E2E Tests On Your System

The test environment uses [bun](https://bun.sh) ([cypress still needs node ATM](https://github.com/cypress-io/cypress/issues/28962) )
The test environment uses [bun](https://bun.sh) ([but cypress still needs node ATM](https://github.com/cypress-io/cypress/issues/28962) )
- Install [bun](https://bun.sh/docs/installation)
- Optional for updating: install `npm-check`: `bun install -g npm-check`.
- Optional for updating package: install `npm-check`: `bun install -g npm-check`
- Install modules: `bun install`

### Run the test for all the apps
#### Run the test for all the apps

You can run all the cypress tests in parallel with:

Expand All @@ -33,15 +37,15 @@ Notice:
- The output of the parallel processes get mixed in the same log stream, however the test summaries are prefixed with the app name.
- The script will return a non-zero status if any of the test fail, and will print a brief feedback.

### Run the test for a single app
#### Run the test for a single app

You can limit the cypress test to a specific APP:

```shell
<local-pagy-dir>/e2e $ ./cy-test repro
```

### Run the test interactively
#### Run the test interactively

You can also run the cypress test interactively (only one APP/file at the time) opening cypress UI:

Expand Down
3 changes: 2 additions & 1 deletion e2e/cy-open
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ set -e
app=$1
port=${2:-8080}

cd -- "$(dirname "$0")"
root="$(git rev-parse --show-toplevel)"
. "$root/scripts/root-pwd.sh"

start-test "bundle exec pagy $app -p $port" http://0.0.0.0:$port "cypress open"
3 changes: 2 additions & 1 deletion e2e/cy-test
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -e
app=$1
port=${2:-8080}

cd -- "$(dirname "$0")"
root="$(git rev-parse --show-toplevel)"
. "$root/scripts/cd-and-back.sh"

test () {
NODE_NO_WARNINGS=1 \
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineConfig(
e2e: {
// supportFolder: "support",
baseUrl: "http://0.0.0.0:8080",
setupNodeEvents(on, config) {
setupNodeEvents(on) {
htmlvalidate.install(on, {
rules: {
// a few frameworks use improper elements to render various roles
Expand Down
2 changes: 1 addition & 1 deletion e2e/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import "cypress-html-validate/dist/commands";
import * as cypressSnapshots from "@cypress/snapshot";
// @ts-expect-error: register does not exist
cypressSnapshots.register();
cypressSnapshots.register(); // eslint-disable-line @typescript-eslint/no-unsafe-call
afterEach(() => cy.htmlvalidate());
// Silence issue https://github.com/quasarframework/quasar/issues/2233#issuecomment-1006506083
// Cypress issue (open) https://github.com/cypress-io/cypress/issues/20341
Expand Down
Loading

0 comments on commit aeb0887

Please sign in to comment.