Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2759c08a96 | |||
| efd1c0e975 |
@@ -1,3 +1,9 @@
|
|||||||
|
## [0.1.8] - 2026-04-27
|
||||||
|
|
||||||
|
### Patch Changes
|
||||||
|
|
||||||
|
- test: migrate rankings and home-page tests from Playwright to Cucumber
|
||||||
|
|
||||||
## [0.1.7] - 2026-04-27
|
## [0.1.7] - 2026-04-27
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
Feature: Home Page
|
||||||
|
As a visitor
|
||||||
|
I want to see the home page
|
||||||
|
So that I can learn about the club and view player rankings
|
||||||
|
|
||||||
|
@happy-path @public @home
|
||||||
|
Scenario: Home page displays Top 10 Players
|
||||||
|
Given I am on the home page
|
||||||
|
Then I should see "Top 10 Players"
|
||||||
|
And I should see a rankings table
|
||||||
|
|
||||||
|
@happy-path @public @home
|
||||||
|
Scenario: Home page displays club information
|
||||||
|
Given I am on the home page
|
||||||
|
Then I should see "Club Information"
|
||||||
|
And I should see "Club President"
|
||||||
|
|
||||||
|
@happy-path @public @home
|
||||||
|
Scenario: Home page displays most recent tournament
|
||||||
|
Given I am on the home page
|
||||||
|
Then I should see "Most Recent Tournament"
|
||||||
|
|
||||||
|
@happy-path @public @home
|
||||||
|
Scenario: Home page has sign in and create account links
|
||||||
|
Given I am on the home page
|
||||||
|
Then I should see "Sign In"
|
||||||
|
And I should see "Create Account"
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
Feature: Rankings Page
|
||||||
|
As a visitor
|
||||||
|
I want to view player rankings
|
||||||
|
So that I can see top players and their statistics
|
||||||
|
|
||||||
|
@happy-path @public @rankings
|
||||||
|
Scenario: Rankings page loads and displays rankings table
|
||||||
|
When I go to the rankings page
|
||||||
|
Then I should see "Player Rankings" in the page heading
|
||||||
|
And I should see a rankings table
|
||||||
|
|
||||||
|
@happy-path @public @rankings
|
||||||
|
Scenario: Rankings table displays player columns
|
||||||
|
When I go to the rankings page
|
||||||
|
Then I should see a rankings table with columns
|
||||||
|
And the table should have column headers
|
||||||
|
|
||||||
|
@happy-path @public @rankings
|
||||||
|
Scenario: Rankings page is publicly accessible (no login required)
|
||||||
|
Given I am not logged in
|
||||||
|
When I go to the rankings page
|
||||||
|
Then I should be on the rankings page
|
||||||
|
And I should see the rankings table
|
||||||
@@ -551,3 +551,51 @@ Then('the settings should be saved successfully', async function () {
|
|||||||
await expect(world.page.locator('text=Settings saved successfully')).toBeVisible();
|
await expect(world.page.locator('text=Settings saved successfully')).toBeVisible();
|
||||||
console.log('🌍 Verified settings were saved successfully');
|
console.log('🌍 Verified settings were saved successfully');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Rankings Page Steps
|
||||||
|
When('I go to the rankings page', async function () {
|
||||||
|
console.log('🌍 Going to rankings page');
|
||||||
|
await world.page.goto(`${world.baseURL}/rankings`);
|
||||||
|
await world.page.waitForLoadState('domcontentloaded');
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('I should see {string} in the page heading', async function (heading: string) {
|
||||||
|
// Use a more flexible selector that matches text content
|
||||||
|
await expect(world.page.locator(`text=${heading}`)).toBeVisible();
|
||||||
|
console.log(`🌍 Verified heading "${heading}" is visible`);
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('I should see a rankings table', async function () {
|
||||||
|
await expect(world.page.locator('table')).toBeVisible();
|
||||||
|
console.log('🌍 Verified rankings table is visible');
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('I should see a rankings table with columns', async function () {
|
||||||
|
const table = world.page.locator('table');
|
||||||
|
await expect(table).toBeVisible();
|
||||||
|
const headerCount = await world.page.locator('th').count();
|
||||||
|
expect(headerCount).toBeGreaterThan(0);
|
||||||
|
console.log(`🌍 Verified rankings table has ${headerCount} columns`);
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('the table should have column headers', async function () {
|
||||||
|
const headerCount = await world.page.locator('th').count();
|
||||||
|
expect(headerCount).toBeGreaterThan(0);
|
||||||
|
console.log(`🌍 Verified table has ${headerCount} column headers`);
|
||||||
|
});
|
||||||
|
|
||||||
|
Given('I am not logged in', async function () {
|
||||||
|
// This is just a documentation step - the test environment starts fresh
|
||||||
|
console.log('🌍 User is not logged in (fresh session)');
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('I should be on the rankings page', async function () {
|
||||||
|
const currentUrl = world.page.url();
|
||||||
|
console.log(`🌍 Checking current URL: ${currentUrl}`);
|
||||||
|
expect(currentUrl).toContain('/rankings');
|
||||||
|
});
|
||||||
|
|
||||||
|
Then('I should see the rankings table', async function () {
|
||||||
|
await expect(world.page.locator('table')).toBeVisible();
|
||||||
|
console.log('🌍 Verified rankings table is visible');
|
||||||
|
});
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "euchre_camp",
|
"name": "euchre_camp",
|
||||||
"version": "0.1.7",
|
"version": "0.1.8",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "NEXT_PUBLIC_GIT_COMMIT=$(git rev-parse --short HEAD) next dev",
|
"dev": "NEXT_PUBLIC_GIT_COMMIT=$(git rev-parse --short HEAD) next dev",
|
||||||
|
|||||||
Reference in New Issue
Block a user