Skip to content

Commit 3fc094e

Browse files
Merge branch 'main' into fix/ai-chat-buffer
2 parents f498b4d + fe198eb commit 3fc094e

32 files changed

+1051
-585
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
run: npm ci
3737

3838
- name: NPM Build
39-
run: SERVER_ROOT=https://playground.accordproject.org && NODE_OPTIONS=--max_old_space_size=8192 npm run build
39+
run: SERVER_ROOT=https://playground.accordproject.org NODE_OPTIONS=--max_old_space_size=8192 npm run build
4040
if: github.ref == 'refs/heads/main'
4141

4242
- name: Set S3

.github/workflows/pr-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
run: npm ci
3434

3535
- name: NPM Build
36-
run: SERVER_ROOT=https://playground.accordproject.org && NODE_OPTIONS=--max_old_space_size=8192 npm run build
36+
run: SERVER_ROOT=https://playground.accordproject.org NODE_OPTIONS=--max_old_space_size=8192 npm run build

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13-
cancel-in-progress: true
13+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
1414

1515
jobs:
1616
build:

e2e/app.spec.ts

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ test.describe('App Loading', () => {
4343
});
4444

4545
test.describe('Dark Mode', () => {
46-
test('should toggle dark mode', async ({ page }) => {
46+
test('should toggle dark mode via Settings modal', async ({ page }) => {
4747
await page.goto('/');
4848
await expect(page.locator('.app-spinner-container')).toBeHidden({ timeout: 30000 });
4949

@@ -52,13 +52,37 @@ test.describe('Dark Mode', () => {
5252
document.documentElement.getAttribute('data-theme')
5353
);
5454

55-
// Find the dark mode toggle - assert it exists
56-
const darkModeToggle = page.locator('[data-testid="toggle-dark-mode"]');
57-
await expect(darkModeToggle, 'Dark mode toggle should be visible').toBeVisible();
55+
// Open Settings modal - the gear icon button in sidebar
56+
const settingsButton = page.getByRole('button', { name: 'Settings' });
57+
await expect(settingsButton).toBeVisible();
58+
await settingsButton.click();
5859

59-
// Click the toggle
60+
// Wait for the Settings modal to appear
61+
const settingsModal = page.getByRole('dialog');
62+
await expect(settingsModal).toBeVisible({ timeout: 5000 });
63+
64+
// Find and click the Dark Mode toggle inside the modal
65+
// The react-dark-mode-toggle library renders a button element
66+
// Find the section containing "Dark Mode" text, then locate the button within it
67+
const darkModeSection = settingsModal.locator('div').filter({ hasText: /^Dark Mode/ }).first();
68+
const darkModeToggle = darkModeSection.locator('button').first();
69+
await expect(darkModeToggle, 'Dark mode toggle should be visible in Settings modal').toBeVisible();
6070
await darkModeToggle.click();
6171

72+
// Close the modal
73+
const closeButton = settingsModal.getByRole('button', { name: /close/i }).or(
74+
settingsModal.locator('[aria-label="Close"]')
75+
);
76+
if (await closeButton.isVisible()) {
77+
await closeButton.click();
78+
} else {
79+
// Press Escape to close modal
80+
await page.keyboard.press('Escape');
81+
}
82+
83+
// Wait for modal to close
84+
await expect(settingsModal).toBeHidden({ timeout: 3000 });
85+
6286
// Theme should change
6387
const newTheme = await page.evaluate(() =>
6488
document.documentElement.getAttribute('data-theme')

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<link
66
rel="icon"
77
type="image"
8-
href="https://i0.wp.com/accordproject.org/wp-content/uploads/2020/08/cropped-ms-icon-310x310-1.png?fit=512%2C512&ssl=1"
8+
href="/favicon.webp"
99
/>
1010
<meta
1111
name="viewport"
@@ -15,7 +15,7 @@
1515
<meta property="og:description" content="Template Playground" />
1616
<meta
1717
property="og:image"
18-
content="https://i0.wp.com/accordproject.org/wp-content/uploads/2020/08/cropped-ms-icon-310x310-1.png?fit=512%2C512&ssl=1"
18+
content="/favicon.webp"
1919
/>
2020
<meta property="og:url" content="https://playground.accordproject.org/" />
2121
<title>Template Playground</title>

0 commit comments

Comments
 (0)