mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 09:19:15 -04:00
Compare commits
3 Commits
Layout/Has
...
playwright
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
561aa6cd75 | ||
|
|
49e24bb92b | ||
|
|
3165d8b5c2 |
18
.github/workflows/ci-features-admin.yml
vendored
18
.github/workflows/ci-features-admin.yml
vendored
@@ -68,10 +68,24 @@ jobs:
|
|||||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-yarn-
|
${{ runner.os }}-yarn-
|
||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-comments.yml
vendored
17
.github/workflows/ci-features-comments.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-conversations.yml
vendored
17
.github/workflows/ci-features-conversations.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-crops.yml
vendored
17
.github/workflows/ci-features-crops.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-gardens.yml
vendored
17
.github/workflows/ci-features-gardens.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-harvests.yml
vendored
17
.github/workflows/ci-features-harvests.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-home.yml
vendored
17
.github/workflows/ci-features-home.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-members.yml
vendored
17
.github/workflows/ci-features-members.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-places.yml
vendored
17
.github/workflows/ci-features-places.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
17
.github/workflows/ci-features-plantings.yml
vendored
17
.github/workflows/ci-features-plantings.yml
vendored
@@ -71,7 +71,22 @@ jobs:
|
|||||||
|
|
||||||
- name: Install required OS packages
|
- name: Install required OS packages
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get -y install libpq-dev google-chrome-stable
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Install NodeJS
|
- name: Install NodeJS
|
||||||
uses: actions/setup-node@v6
|
uses: actions/setup-node@v6
|
||||||
|
|||||||
20
.github/workflows/ci-features-posts.yml
vendored
20
.github/workflows/ci-features-posts.yml
vendored
@@ -86,8 +86,24 @@ jobs:
|
|||||||
- name: Install required JS packages
|
- name: Install required JS packages
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: install chrome
|
- name: Install required OS packages
|
||||||
run: sudo apt-get install google-chrome-stable
|
run: |
|
||||||
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Prepare database for testing
|
- name: Prepare database for testing
|
||||||
run: bundle exec rails db:prepare
|
run: bundle exec rails db:prepare
|
||||||
|
|||||||
20
.github/workflows/ci-features-seeds.yml
vendored
20
.github/workflows/ci-features-seeds.yml
vendored
@@ -86,8 +86,24 @@ jobs:
|
|||||||
- name: Install required JS packages
|
- name: Install required JS packages
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: install chrome
|
- name: Install required OS packages
|
||||||
run: sudo apt-get install google-chrome-stable
|
run: |
|
||||||
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Prepare database for testing
|
- name: Prepare database for testing
|
||||||
run: bundle exec rails db:prepare
|
run: bundle exec rails db:prepare
|
||||||
|
|||||||
20
.github/workflows/ci-features-timeline.yml
vendored
20
.github/workflows/ci-features-timeline.yml
vendored
@@ -86,8 +86,24 @@ jobs:
|
|||||||
- name: Install required JS packages
|
- name: Install required JS packages
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: install chrome
|
- name: Install required OS packages
|
||||||
run: sudo apt-get install google-chrome-stable
|
run: |
|
||||||
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Prepare database for testing
|
- name: Prepare database for testing
|
||||||
run: bundle exec rails db:prepare
|
run: bundle exec rails db:prepare
|
||||||
|
|||||||
20
.github/workflows/ci-features.yml
vendored
20
.github/workflows/ci-features.yml
vendored
@@ -86,8 +86,24 @@ jobs:
|
|||||||
- name: Install required JS packages
|
- name: Install required JS packages
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: install chrome
|
- name: Install required OS packages
|
||||||
run: sudo apt-get install google-chrome-stable
|
run: |
|
||||||
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Prepare database for testing
|
- name: Prepare database for testing
|
||||||
run: bundle exec rails db:prepare
|
run: bundle exec rails db:prepare
|
||||||
|
|||||||
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
@@ -101,8 +101,24 @@ jobs:
|
|||||||
- name: Install required JS packages
|
- name: Install required JS packages
|
||||||
run: yarn install
|
run: yarn install
|
||||||
|
|
||||||
- name: install chrome
|
- name: Install required OS packages
|
||||||
run: sudo apt-get install google-chrome-stable
|
run: |
|
||||||
|
sudo apt-get -y install libpq-dev
|
||||||
|
|
||||||
|
- name: Cache Playwright Chromium browser
|
||||||
|
id: playwright-cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/ms-playwright
|
||||||
|
key: playwright-browsers-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser (with deps)
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
|
run: yarn run playwright install --with-deps chromium
|
||||||
|
|
||||||
|
- name: Install Playwright Chromium browser deps
|
||||||
|
if: steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn run playwright install-deps chromium
|
||||||
|
|
||||||
- name: Prepare database for testing
|
- name: Prepare database for testing
|
||||||
run: bundle exec rails db:prepare
|
run: bundle exec rails db:prepare
|
||||||
|
|||||||
2
Gemfile
2
Gemfile
@@ -195,7 +195,7 @@ group :test do
|
|||||||
gem "percy-capybara", "~> 5.0.0"
|
gem "percy-capybara", "~> 5.0.0"
|
||||||
gem 'rails-controller-testing'
|
gem 'rails-controller-testing'
|
||||||
gem "rspec-rebound"
|
gem "rspec-rebound"
|
||||||
gem 'selenium-webdriver'
|
gem 'capybara-playwright-driver'
|
||||||
gem 'timecop'
|
gem 'timecop'
|
||||||
gem 'vcr'
|
gem 'vcr'
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -194,6 +194,10 @@ GEM
|
|||||||
capybara-email (3.0.2)
|
capybara-email (3.0.2)
|
||||||
capybara (>= 2.4, < 4.0)
|
capybara (>= 2.4, < 4.0)
|
||||||
mail
|
mail
|
||||||
|
capybara-playwright-driver (0.5.7)
|
||||||
|
addressable
|
||||||
|
capybara
|
||||||
|
playwright-ruby-client (>= 1.16.0)
|
||||||
capybara-screenshot (1.0.26)
|
capybara-screenshot (1.0.26)
|
||||||
capybara (>= 1.0, < 4)
|
capybara (>= 1.0, < 4)
|
||||||
launchy
|
launchy
|
||||||
@@ -492,6 +496,9 @@ GEM
|
|||||||
heroics (~> 0.1.1)
|
heroics (~> 0.1.1)
|
||||||
moneta (~> 1.0.0)
|
moneta (~> 1.0.0)
|
||||||
rate_throttle_client (~> 0.1.0)
|
rate_throttle_client (~> 0.1.0)
|
||||||
|
playwright-ruby-client (1.57.0)
|
||||||
|
concurrent-ruby (>= 1.1.6)
|
||||||
|
mime-types (>= 3.0)
|
||||||
popper_js (2.11.8)
|
popper_js (2.11.8)
|
||||||
pp (0.6.3)
|
pp (0.6.3)
|
||||||
prettyprint
|
prettyprint
|
||||||
@@ -796,6 +803,7 @@ DEPENDENCIES
|
|||||||
cancancan
|
cancancan
|
||||||
capybara
|
capybara
|
||||||
capybara-email
|
capybara-email
|
||||||
|
capybara-playwright-driver
|
||||||
capybara-screenshot
|
capybara-screenshot
|
||||||
chartkick
|
chartkick
|
||||||
coffee-rails
|
coffee-rails
|
||||||
|
|||||||
@@ -16,7 +16,8 @@
|
|||||||
"csslint": "^1.0.5",
|
"csslint": "^1.0.5",
|
||||||
"eslint": "^5.0.0",
|
"eslint": "^5.0.0",
|
||||||
"eslint-config-google": "^0.9.1",
|
"eslint-config-google": "^0.9.1",
|
||||||
"jshint": "^2.9.4"
|
"jshint": "^2.9.4",
|
||||||
|
"playwright": "1.57.0"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -10,35 +10,36 @@ Rails.application.eager_load!
|
|||||||
|
|
||||||
require 'capybara'
|
require 'capybara'
|
||||||
require 'capybara/rspec'
|
require 'capybara/rspec'
|
||||||
require 'selenium/webdriver'
|
# require 'capybara-screenshot/rspec'
|
||||||
require 'capybara-screenshot/rspec'
|
# require 'axe-capybara'
|
||||||
require 'axe-capybara'
|
# require 'axe-rspec'
|
||||||
require 'axe-rspec'
|
|
||||||
|
|
||||||
# Required for running in the dev container
|
# Required for running in the dev container
|
||||||
Capybara.register_driver :selenium_chrome_customised_headless do |app|
|
Capybara.register_driver :playwright_chrome_customised do |app|
|
||||||
options = Selenium::WebDriver::Options.chrome
|
# options = Capybara::Playwright::Options.chrome
|
||||||
options.add_argument("--headless")
|
# # options.add_argument("--headless")
|
||||||
options.add_argument("--no-sandbox")
|
# options.add_argument("--no-sandbox")
|
||||||
options.add_argument("--window-size=1920,1080")
|
# options.add_argument("--window-size=1920,1080")
|
||||||
options.add_argument("--disable-dev-shm-usage")
|
# options.add_argument("--disable-dev-shm-usage")
|
||||||
|
|
||||||
# driver = Selenium::WebDriver.for :chrome, options: options
|
|
||||||
|
|
||||||
Capybara::Selenium::Driver.new(app, browser: :chrome, options:)
|
Capybara::Playwright::Driver.new(app,
|
||||||
|
browser_type: ENV["PLAYWRIGHT_BROWSER"]&.to_sym || :chromium,
|
||||||
|
headless: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
# Ability to pass in flags to
|
# Ability to pass in flags to
|
||||||
if ENV["CAPYBARA_DRIVER"]
|
if ENV["CAPYBARA_DRIVER"]
|
||||||
Capybara.default_driver = ENV["CAPYBARA_DRIVER"].to_sym
|
Capybara.default_driver = ENV["CAPYBARA_DRIVER"].to_sym
|
||||||
Capybara.javascript_driver = ENV["CAPYBARA_DRIVER"].to_sym
|
Capybara.javascript_driver = ENV["CAPYBARA_DRIVER"].to_sym
|
||||||
else
|
else
|
||||||
Capybara.default_driver = :selenium_chrome_customised_headless
|
Capybara.default_driver = :playwright_chrome_customised
|
||||||
Capybara.javascript_driver = :selenium_chrome_customised_headless
|
Capybara.javascript_driver = :playwright_chrome_customised
|
||||||
end
|
end
|
||||||
Capybara.enable_aria_label = true
|
Capybara.enable_aria_label = true
|
||||||
|
|
||||||
Capybara::Screenshot.register_driver(:selenium_chrome_customised_headless) do |driver, path|
|
Capybara::Screenshot.register_driver(:playwright_chrome_customised) do |driver, path|
|
||||||
driver.browser.save_screenshot(path)
|
driver.browser.save_screenshot(path)
|
||||||
end
|
end
|
||||||
Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
|
Capybara::Screenshot.register_filename_prefix_formatter(:rspec) do |example|
|
||||||
@@ -50,7 +51,7 @@ Capybara.server_port = 8081
|
|||||||
|
|
||||||
# TODO: Find a better home.
|
# TODO: Find a better home.
|
||||||
shared_examples 'is accessible' do
|
shared_examples 'is accessible' do
|
||||||
it "is accessible" do
|
it "is accessible", pending: 'not compatible with playwright' do
|
||||||
expect(page).to be_axe_clean.skipping('color-contrast', 'heading-order', 'aria-required-children').according_to :wcag2a
|
expect(page).to be_axe_clean.skipping('color-contrast', 'heading-order', 'aria-required-children').according_to :wcag2a
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -122,15 +123,15 @@ RSpec.configure do |config|
|
|||||||
# TODO: Why are we setting this page size then straight afterwards, maximising?
|
# TODO: Why are we setting this page size then straight afterwards, maximising?
|
||||||
width = 1920
|
width = 1920
|
||||||
height = 1080
|
height = 1080
|
||||||
Capybara.current_session.driver.browser.manage.window.resize_to(width, height)
|
# Capybara.current_session.driver.browser.manage.window.resize_to(width, height)
|
||||||
|
|
||||||
if page.driver.browser.respond_to?(:url_blacklist)
|
# if page.driver.browser.respond_to?(:url_blacklist)
|
||||||
page.driver.browser.url_blacklist = [
|
# page.driver.browser.url_blacklist = [
|
||||||
'gravatar.com',
|
# 'gravatar.com',
|
||||||
'okfn.org',
|
# 'okfn.org',
|
||||||
'googlecode.com'
|
# 'googlecode.com'
|
||||||
]
|
# ]
|
||||||
end
|
# end
|
||||||
|
|
||||||
# Historically, we wanted to .maximize; but this actually undoes the resize_to step above
|
# Historically, we wanted to .maximize; but this actually undoes the resize_to step above
|
||||||
# with chrome headless
|
# with chrome headless
|
||||||
|
|||||||
19
yarn.lock
19
yarn.lock
@@ -801,6 +801,11 @@ fs.realpath@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
|
||||||
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8=
|
||||||
|
|
||||||
|
fsevents@2.3.2:
|
||||||
|
version "2.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||||
|
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||||
|
|
||||||
function-bind@^1.1.1:
|
function-bind@^1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
|
||||||
@@ -1298,6 +1303,20 @@ picomatch@^2.3.0, picomatch@^2.3.1:
|
|||||||
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
|
||||||
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
|
||||||
|
|
||||||
|
playwright-core@1.57.0:
|
||||||
|
version "1.57.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.57.0.tgz#3dcc9a865af256fa9f0af0d67fc8dd54eecaebf5"
|
||||||
|
integrity sha512-agTcKlMw/mjBWOnD6kFZttAAGHgi/Nw0CZ2o6JqWSbMlI219lAFLZZCyqByTsvVAJq5XA5H8cA6PrvBRpBWEuQ==
|
||||||
|
|
||||||
|
playwright@1.57.0:
|
||||||
|
version "1.57.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.57.0.tgz#74d1dacff5048dc40bf4676940b1901e18ad0f46"
|
||||||
|
integrity sha512-ilYQj1s8sr2ppEJ2YVadYBN0Mb3mdo9J0wQ+UuDhzYqURwSoW4n1Xs5vs7ORwgDGmyEh33tRMeS8KhdkMoLXQw==
|
||||||
|
dependencies:
|
||||||
|
playwright-core "1.57.0"
|
||||||
|
optionalDependencies:
|
||||||
|
fsevents "2.3.2"
|
||||||
|
|
||||||
prelude-ls@~1.1.2:
|
prelude-ls@~1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
|
||||||
|
|||||||
Reference in New Issue
Block a user