docs: Add Playwright MCP documentation and update testing instructions
This commit is contained in:
@@ -145,6 +145,25 @@ bundle exec rspec spec/acceptance/tournament_partnership_spec.rb:280
|
||||
bundle exec rspec spec/acceptance/ --format documentation
|
||||
```
|
||||
|
||||
**Run Playwright mobile responsiveness tests:**
|
||||
|
||||
```bash
|
||||
# Start the server
|
||||
bundle exec hanami server --port 2300 &
|
||||
|
||||
# Run Playwright tests
|
||||
bundle exec rspec spec/playwright/mobile_responsiveness_spec.rb
|
||||
```
|
||||
|
||||
**Test with Playwright MCP (browser automation):**
|
||||
|
||||
1. Start the Hanami server: `bundle exec hanami server --port 2300`
|
||||
2. Use opencode with Playwright MCP tools to:
|
||||
- Navigate to pages
|
||||
- Take screenshots
|
||||
- Test responsive layouts
|
||||
- Verify mobile UI elements
|
||||
|
||||
### Assets
|
||||
|
||||
**Compile CSS for development:**
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require 'bcrypt'
|
||||
|
||||
module EuchreCamp
|
||||
module Actions
|
||||
module Auth
|
||||
@@ -14,12 +16,21 @@ module EuchreCamp
|
||||
user = users_repo.by_email(email)
|
||||
|
||||
if user && valid_password?(user, password)
|
||||
if user.locked?
|
||||
# Check if account is locked
|
||||
locked_until = user[:locked_until]
|
||||
if locked_until && locked_until > Time.now
|
||||
response.flash[:error] = 'Account is locked. Please contact support.'
|
||||
response.redirect_to '/login'
|
||||
return
|
||||
end
|
||||
|
||||
# Check if account is confirmed
|
||||
unless user[:confirmed]
|
||||
response.flash[:error] = 'Account not confirmed. Please check your email.'
|
||||
response.redirect_to '/login'
|
||||
return
|
||||
end
|
||||
|
||||
# Record successful login
|
||||
ip_address = request.env['REMOTE_ADDR']
|
||||
users_repo.record_login(user[:id], ip_address)
|
||||
@@ -30,7 +41,7 @@ module EuchreCamp
|
||||
session[:player_id] = user[:player_id]
|
||||
|
||||
response.flash[:success] = 'Welcome back!'
|
||||
response.redirect_to '/rankings'
|
||||
response.redirect_to '/'
|
||||
else
|
||||
# Record failed login
|
||||
users_repo.record_failed_login(user[:id]) if user
|
||||
|
||||
Reference in New Issue
Block a user