Skip to content

Commit

Permalink
Merge branch 'main' of github.com:mechanical-orchard/playwright-elixir
Browse files Browse the repository at this point in the history
  • Loading branch information
roznawsk committed Oct 8, 2024
2 parents d1dc043 + 37a9833 commit b5f9c63
Show file tree
Hide file tree
Showing 563 changed files with 134,085 additions and 64,745 deletions.
10 changes: 4 additions & 6 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/env bash

source_up
export PROJECT="$(expand_path .)"
source_up_if_exists
export REPO="$(expand_path .)"
export ERL_AFLAGS="-kernel shell_history enabled" # persistent iex history

# default: true
# export PLAYWRIGHT_HEADLESS=false

# default: driver
# default transport: driver (websocket is the one alternative)
# export PLAYWRIGHT_TRANSPORT=websocket

# default: ws://localhost:3000/playwright
# export PLAYWRIGHT_ENDPOINT="ws://localhost:3000/chromium"
# export PLAYWRIGHT_ENDPOINT="ws://localhost:3000/"

# put your custom/local overrides in here:
source_env_if_exists .local/envrc
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,17 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Elixir
uses: erlef/setup-elixir@v1
uses: erlef/setup-beam@v1
with:
elixir-version: '1.12.0'
otp-version: '24.0.1'
elixir-version: '1.16.2'
otp-version: '26.2.5'
- name: Install Elixir dependencies
run: mix deps.get
- name: Install Node dependencies
run: npm install --prefix assets
- name: Install Playwright dependencies (e.g., browsers)
run: mix playwright.install
# NOTE: not needed for now, while assets are
# directly installed to `priv/static`.
# - name: Install Node dependencies
# run: npm install --prefix assets
- name: Run tests
run: mix test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ playwright-*.tar
.medic/skipped/
.doctor.out
.vscode
*.iml
/.idea/
6 changes: 3 additions & 3 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.14.4-otp-25
erlang 25.3
nodejs 19.8.1
elixir 1.16.2-otp-26
erlang 26.2.5
nodejs 22.2.0
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### Changed

- **BREAKING:** **(WIP/UNSTABLE)** - Substantial API/usage changes are underway. e.g.:
- We intend to restore the use of tagged-tuple results (`{:ok, _}` and `{:error, _}`) throughout the code base, internally as well as for the "API".
- Bulk Package renaming.
- ...

---

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2021 geometerio
Copyright (c) 2024 Mechanical Orchard

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Playwright for Elixir

**NOTE:** This package is currently in "preview". The features are not yet at parity with other Playwright implementations. Once `playwright-elixir` is at or near parity with [`playwright`](https://github.com/microsoft/playwright), the version number will be updated to mirror the supported version of `playwright`.
**NOTE:** This package is currently in "preview" (or "alpha"). The features are not yet at parity with other Playwright implementations. Once `playwright-elixir` is at or near parity with [`playwright`](https://github.com/microsoft/playwright), the version number will be updated to mirror the supported version of `playwright`.

## Overview

[Playwright](https://github.com/geometerio/playwright-elixir) is an Elixir library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**. [See how Playwright is better](https://playwright.dev/docs/why-playwright).
[Playwright](https://github.com/mechanical-orchard/playwright-elixir) is an Elixir library to automate Chromium, Firefox and WebKit with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**. [See how Playwright is better](https://playwright.dev/docs/why-playwright).

## Installation

Expand All @@ -13,14 +13,14 @@ The package can be installed by adding `playwright` to your list of dependencies
```elixir
def deps do
[
{:playwright, "~> 1.18.0-alpha.1"}
{:playwright, "~> 1.44.0-alpha.4"}
]
end
```

## Usage

- [README](https://hexdocs.pm/playwright/README.html)
- [README](https://hexdocs.pm/playwright/readme.html)
- [Getting started](https://hexdocs.pm/playwright/basics-getting-started.html)
- [API Reference](https://hexdocs.pm/playwright/api-reference.html)

Expand All @@ -45,6 +45,10 @@ defmodule Test.ExampleTest do
end
```

## Releases

This project aims to track the release versioning found in [Playwright proper](https://github.com/microsoft/playwright).

## Contributing

### Getting started
Expand All @@ -60,6 +64,10 @@ end
- Start server: `bin/dev/start`
- Run tests and push: `bin/dev/shipit`

### Building assets for a release
### Releasing

`mix assets.build`
1. Update the version in `mix.exs`
a. Search for and update the version anywhere it appears in the repo, such as this README
2. `git tag -a v${version_number}` such that the tag look like `v1.44.0-alpha.3` or `v1.44.0`
3. `git push --tags`
4. `mix hex.publish`
Loading

0 comments on commit b5f9c63

Please sign in to comment.