-
Notifications
You must be signed in to change notification settings - Fork 1
Add BDD tests for article content validation and enable test workflow #263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Copilot
wants to merge
8
commits into
master
Choose a base branch
from
copilot/fix-262
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
248fde2
Initial plan
Copilot 8a41e9e
Create BDD tests for article content validation
Copilot 0667dbd
Complete BDD tests implementation with validation script and document…
Copilot c76a87e
Address PR feedback: remove fallback script, simplify docs, fix test …
Copilot 6615e67
Update documentation based on PR feedback
Copilot 08eee49
Merge branch 'master' into copilot/fix-262
dannystaple 1359c28
Remove paths restriction from PR test workflow to enable BDD tests
Copilot 2d61724
Merge branch 'master' into copilot/fix-262
dannystaple File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # Article Content Tests | ||
dannystaple marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| This directory contains BDD tests for validating article content and layout. | ||
|
|
||
| ## Test Files | ||
|
|
||
| ### `article-content.feature` | ||
| Contains two scenarios testing the article at `/2025/07/08/08-comparing-anker-power-packs.html`: | ||
|
|
||
| 1. **Article Content Validation**: Tests that the article has: | ||
| - Tags navigation with links to tag slugs | ||
| - Post header in H2 element | ||
| - Page title containing post title and "orionrobots" | ||
| - Visible images inside article tag without dead links | ||
| - Date and author in div element | ||
| - Footer with Discord and YouTube links | ||
| - Main navigation menu at top | ||
|
|
||
| 2. **Desktop Layout Validation**: Tests that in desktop view: | ||
| - Images, tables and text don't overflow the article container margin | ||
dannystaple marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Running Tests | ||
|
|
||
| To run the BDD integration tests: | ||
| ```bash | ||
| docker compose run test | ||
| ``` | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - Playwright browsers installed (handled automatically in Docker) | ||
| - Site built and served (see project README) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| Feature: Article Content Tests | ||
|
|
||
| Scenario: Article has required content elements | ||
| Given the Staging site is started | ||
| When I navigate to the article "/2025/07/08/08-comparing-anker-power-packs.html" | ||
| Then the article should have a set of tags in a nav linking to tag slugs | ||
| And the article should have a post header in an H2 element | ||
| And the page title should contain the post title and "orionrobots" | ||
| And the article should have visible images inside the article tag | ||
| And the article should have a date and author in a div element | ||
| And the page should have a footer with Discord and YouTube links | ||
| And the page should have the main menu in a nav element at the top | ||
|
|
||
| Scenario: Desktop view layout does not overflow | ||
| Given the Staging site is started | ||
| When I navigate to the article "/2025/07/08/08-comparing-anker-power-packs.html" | ||
| And I am in desktop view | ||
| Then the images, tables and text should not overflow the article container |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.