Skip to content

Commit

Permalink
chore: cleanup before PR review
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAllenTech committed Oct 14, 2024
1 parent 5f89326 commit fc64a92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 44 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,52 +89,10 @@ jobs:
run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'

- name: Create Auth Folder and File
run: |
AUTH_FOLDER="./playwright/.auth"
AUTH_FILE="$AUTH_FOLDER/browser.json"
# Create the directory if it doesn't exist
if [ ! -d "$AUTH_FOLDER" ]; then
mkdir -p "$AUTH_FOLDER"
echo "Browser state directory was created successfully."
else
echo "Browser state directory already exists."
fi
# Create the file if it doesn't exist
if [ ! -f "$AUTH_FILE" ]; then
echo "Browser.json file was not found. Creating file:"
echo '{"cookies": []}' > "$AUTH_FILE"
echo "Browser.json file was created successfully."
else
echo "Browser.json file already exists."
fi
- name: Seed database
run: |
AUTH_FOLDER="./playwright/.auth"
AUTH_FILE="$AUTH_FOLDER/browser.json"
# Create the directory if it doesn't exist
if [ ! -d "$AUTH_FOLDER" ]; then
mkdir -p "$AUTH_FOLDER"
echo "Browser state directory was created successfully."
else
echo "Browser state directory already exists."
fi
# Create the file if it doesn't exist
if [ ! -f "$AUTH_FILE" ]; then
echo "Browser.json file was not found. Creating file:"
echo '{"cookies": []}' > "$AUTH_FILE"
echo "Browser.json file was created successfully."
else
echo "Browser.json file already exists."
fi
npm run db:push
npm run db:seed
npm run e2e:seed
- name: Run Playwright tests
id: playwright-tests
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ Note the sample .env [here](./sample.env) is fine to use.

### Session and User setup

First you need to add your E2E test user to your locally running database. Do this by running the following script
First you need to add your E2E test user to your locally running database. Do this by running the following script if you havent already

```
npm run e2e:seed
npm run db:seed
```

This will create a user and session for your E2E tests. Details of the E2E user created can be seen [here](./drizzle/seedE2E.ts)
Expand Down

0 comments on commit fc64a92

Please sign in to comment.