Skip to content

Commit e83f095

Browse files
committed
Linting
1 parent 0f494ba commit e83f095

18 files changed

+149
-135
lines changed

.github/workflows/smart-test-runner.yml

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run-jekyll-build: ${{ steps.filter.outputs.jekyll }}
2424
is-data-only: ${{ steps.filter.outputs.data-only }}
2525
test-strategy: ${{ steps.strategy.outputs.strategy }}
26-
26+
2727
steps:
2828
- name: 📂 Checkout repository
2929
uses: actions/checkout@v5
@@ -43,7 +43,7 @@ jobs:
4343
- 'package.json'
4444
- 'package-lock.json'
4545
- 'jest.config.js'
46-
46+
4747
# Changes requiring E2E tests
4848
e2e:
4949
- 'static/js/**/*.js'
@@ -52,15 +52,15 @@ jobs:
5252
- '_pages/**'
5353
- 'tests/e2e/**'
5454
- 'playwright.config.js'
55-
55+
5656
# Python utility changes
5757
python:
5858
- 'utils/**/*.py'
5959
- 'tests/python/**'
6060
- 'pixi.toml'
6161
- 'pyproject.toml'
6262
- 'requirements*.txt'
63-
63+
6464
# Jekyll/Ruby changes
6565
jekyll:
6666
- '_config*.yml'
@@ -69,7 +69,7 @@ jobs:
6969
- '_includes/**'
7070
- '_sass/**'
7171
- 'Gemfile*'
72-
72+
7373
# Data-only changes (no tests needed)
7474
data-only:
7575
- '_data/conferences.yml'
@@ -116,25 +116,25 @@ jobs:
116116
script: |
117117
const strategy = '${{ steps.strategy.outputs.strategy }}';
118118
let comment = '## 🧪 Test Strategy Analysis\n\n';
119-
119+
120120
const changes = {
121121
frontend: ${{ steps.filter.outputs.frontend }},
122122
e2e: ${{ steps.filter.outputs.e2e }},
123123
python: ${{ steps.filter.outputs.python }},
124124
jekyll: ${{ steps.filter.outputs.jekyll }},
125125
dataOnly: ${{ steps.filter.outputs.data-only }}
126126
};
127-
127+
128128
comment += '### 📊 Detected Changes:\n';
129129
comment += `- Frontend JS: ${changes.frontend ? '✅ Yes' : '❌ No'}\n`;
130130
comment += `- E2E Required: ${changes.e2e ? '✅ Yes' : '❌ No'}\n`;
131131
comment += `- Python Utils: ${changes.python ? '✅ Yes' : '❌ No'}\n`;
132132
comment += `- Jekyll Config: ${changes.jekyll ? '✅ Yes' : '❌ No'}\n`;
133133
comment += `- Data Only: ${changes.dataOnly ? '✅ Yes' : '❌ No'}\n`;
134134
comment += '\n';
135-
135+
136136
comment += '### 🎯 Test Strategy: `' + strategy + '`\n\n';
137-
137+
138138
switch(strategy) {
139139
case 'data-validation-only':
140140
comment += '✨ **Optimized Run**: Only conference data validation will run.\n';
@@ -152,21 +152,21 @@ jobs:
152152
default:
153153
comment += '✅ **Minimal Checks**: Running basic validation only.\n';
154154
}
155-
155+
156156
comment += '\n💰 **Cost Savings**: This intelligent test selection reduces unnecessary CI runs.';
157-
157+
158158
// Find and update or create comment
159159
const { data: comments } = await github.rest.issues.listComments({
160160
owner: context.repo.owner,
161161
repo: context.repo.repo,
162162
issue_number: context.issue.number,
163163
});
164-
164+
165165
const botComment = comments.find(comment =>
166166
comment.user.type === 'Bot' &&
167167
comment.body.includes('Test Strategy Analysis')
168168
);
169-
169+
170170
if (botComment) {
171171
await github.rest.issues.updateComment({
172172
owner: context.repo.owner,
@@ -189,23 +189,23 @@ jobs:
189189
needs: analyze-changes
190190
if: always() # Always run data validation
191191
runs-on: ubuntu-latest
192-
192+
193193
steps:
194194
- name: 📂 Checkout repository
195195
uses: actions/checkout@v5
196-
196+
197197
- name: 🐍 Setup Pixi
198198
uses: prefix-dev/[email protected]
199-
199+
200200
- name: ✅ Validate conference data
201201
run: |
202202
pixi run sort --check
203203
pixi run validate
204-
204+
205205
- name: 📊 Check for duplicates
206206
run: |
207207
python utils/check_duplicates.py || true
208-
208+
209209
- name: 🔗 Validate URLs (sample)
210210
if: needs.analyze-changes.outputs.is-data-only == 'true'
211211
run: |
@@ -234,14 +234,14 @@ jobs:
234234
needs: analyze-changes
235235
if: needs.analyze-changes.outputs.run-python-tests == 'true'
236236
runs-on: ubuntu-latest
237-
237+
238238
steps:
239239
- name: 📂 Checkout repository
240240
uses: actions/checkout@v5
241-
241+
242242
- name: 🐍 Setup Pixi
243243
uses: prefix-dev/[email protected]
244-
244+
245245
- name: 🧪 Run Python tests
246246
run: |
247247
pixi run test
@@ -252,17 +252,17 @@ jobs:
252252
needs: analyze-changes
253253
if: needs.analyze-changes.outputs.run-jekyll-build == 'true'
254254
runs-on: ubuntu-latest
255-
255+
256256
steps:
257257
- name: 📂 Checkout repository
258258
uses: actions/checkout@v5
259-
259+
260260
- name: 💎 Setup Ruby
261261
uses: ruby/setup-ruby@v1
262262
with:
263263
ruby-version: '3.3'
264264
bundler-cache: true
265-
265+
266266
- name: 🏗️ Test Jekyll build
267267
run: |
268268
bundle exec jekyll build
@@ -275,7 +275,7 @@ jobs:
275275
runs-on: ubuntu-latest
276276
needs: [data-validation, frontend-tests, e2e-tests, python-tests, jekyll-build-test]
277277
if: always()
278-
278+
279279
steps:
280280
- name: ✅ All tests passed
281281
if: |
@@ -287,7 +287,7 @@ jobs:
287287
run: |
288288
echo "✅ All required tests passed!"
289289
echo "Test strategy successfully reduced unnecessary runs."
290-
290+
291291
- name: ❌ Some tests failed
292292
if: |
293293
needs.data-validation.result == 'failure' ||

tests/e2e/specs/conference-filters.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,4 +452,4 @@ test.describe('Conference Filters', () => {
452452
}
453453
});
454454
});
455-
});
455+
});

tests/e2e/specs/search-functionality.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,4 +400,4 @@ test.describe('Search Functionality', () => {
400400
await expect(results).toBeVisible();
401401
});
402402
});
403-
});
403+
});

tests/frontend/unit/action-bar.test.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ describe('ActionBar', () => {
189189

190190
test('should handle empty preferences gracefully', () => {
191191
storeMock.get.mockReturnValue(null);
192-
192+
193193
// Should not throw
194194
expect(() => {
195195
document.querySelectorAll('.action-indicator').forEach(indicator => {
@@ -317,10 +317,10 @@ describe('ActionBar', () => {
317317

318318
test('should handle tap interactions on mobile', () => {
319319
const indicator = document.querySelector('.action-indicator[data-conf-id="pycon-2025"]');
320-
320+
321321
const touchEvent = new TouchEvent('touchstart');
322322
indicator.dispatchEvent(touchEvent);
323-
323+
324324
// Mobile should show popover on tap
325325
expect(document.querySelector('.action-content')).toBeDefined();
326326
});
@@ -329,7 +329,7 @@ describe('ActionBar', () => {
329329
describe('Conference Data Extraction', () => {
330330
test('should extract conference data from indicator attributes', () => {
331331
const indicator = document.querySelector('.action-indicator[data-conf-id="pycon-2025"]');
332-
332+
333333
expect(indicator.dataset.confId).toBe('pycon-2025');
334334
expect(indicator.dataset.confName).toBe('PyCon US');
335335
expect(indicator.dataset.confCfp).toBe('2025-02-15 23:59:00');
@@ -374,7 +374,7 @@ describe('ActionBar', () => {
374374
const clickEvent = new MouseEvent('click', { bubbles: true });
375375
Object.defineProperty(clickEvent, 'target', { value: saveBtn, enumerable: true });
376376
document.dispatchEvent(clickEvent);
377-
377+
378378
expect(window.dispatchEvent).toHaveBeenCalledWith(
379379
expect.objectContaining({
380380
type: 'favoritesUpdated',
@@ -392,9 +392,9 @@ describe('ActionBar', () => {
392392
savedConferences: {}
393393
}
394394
});
395-
395+
396396
window.dispatchEvent(event);
397-
397+
398398
// Indicators should update based on event
399399
const indicator = document.querySelector('.action-indicator[data-conf-id="pycon-2025"]');
400400
// Would need actual event handler implementation
@@ -406,7 +406,7 @@ describe('ActionBar', () => {
406406
storeMock.get.mockImplementation(() => {
407407
throw new Error('localStorage unavailable');
408408
});
409-
409+
410410
// Should not throw
411411
expect(() => {
412412
document.querySelectorAll('.action-indicator').forEach(indicator => {
@@ -420,7 +420,7 @@ describe('ActionBar', () => {
420420
indicator.className = 'action-indicator';
421421
// No data-conf-id
422422
document.body.appendChild(indicator);
423-
423+
424424
// Should not process indicators without conf-id
425425
expect(() => {
426426
document.querySelectorAll('.action-indicator').forEach(ind => {

tests/frontend/unit/conference-manager.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,4 +488,4 @@ describe('ConferenceStateManager', () => {
488488
expect(manager.archiveLoaded).toBe(false);
489489
});
490490
});
491-
});
491+
});

0 commit comments

Comments
 (0)