Skip to content

Commit

Permalink
Merge pull request #23 from mukilan/remove-focus-folder-grouping
Browse files Browse the repository at this point in the history
remove CSS2 Focus Folder grouping
  • Loading branch information
mukilan authored Mar 22, 2024
2 parents 4774fcc + cbce8a2 commit d3f2e48
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 33 deletions.
48 changes: 22 additions & 26 deletions process-wpt-results.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,61 +93,57 @@ const CSS2_FOCUS_FOLDERS = [
'positioning'
]

const CSS2_FOCUS_REGEXP = new RegExp(
`^/css/CSS2/(${CSS2_FOCUS_FOLDERS.join('|')})/`
)

const CSS_TABLES_PREDICATE = /^\/css\/(CSS2\/tables|css-tables)\//

const FOCUS_AREAS = {
css2: {
name: 'Focus Areas',
predicate: regex_predicate(CSS2_FOCUS_REGEXP),
all: {
name: 'All WPT tests',
predicate: prefix_predicate(''),
order: 0
},
css: {
name: '/css',
predicate: prefix_predicate('/css/'),
order: 1
},
css2: {
name: '/css/CSS2',
predicate: prefix_predicate('/css/CSS2/'),
order: 2
},
csstable: {
name: '/css/CSS2/tables & /css/css-tables',
predicate: regex_predicate(CSS_TABLES_PREDICATE),
order: 90
},
cssom: {
name: '/css/cssom',
predicate: prefix_predicate('/css/cssom/'),
order: 90
order: 91
},
csspos: {
name: '/css/css-position',
predicate: prefix_predicate('/css/css-position/'),
order: 91
order: 92
},
cssflex: {
name: '/css/css-flexbox',
predicate: prefix_predicate('/css/css-flexbox/'),
order: 92
},
csstable: {
name: '/css/CSS2/tables & /css/css-tables',
predicate: regex_predicate(CSS_TABLES_PREDICATE),
order: 93
},
csstext: {
name: '/css/css-text',
predicate: prefix_predicate('/css/css-text/'),
order: 94
},
css: {
name: '/css',
predicate: prefix_predicate('/css/'),
order: 98
},
all: {
name: 'All WPT tests',
predicate: prefix_predicate(''),
order: 99
}
}

for (const [idx, folder] of CSS2_FOCUS_FOLDERS.entries()) {
const path = `/css/CSS2/${folder}/`
FOCUS_AREAS[folder] = {
name: `-- ${path}`,
name: `${path}`,
predicate: prefix_predicate(path),
order: idx + 1
order: idx + 3
}
}

Expand Down
2 changes: 1 addition & 1 deletion site/load-chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ function setupChart () {

area_dropdown.onchange = update
show_legacy.onchange = update
area_dropdown.value = scores.area_keys[0]
area_dropdown.value = scores.area_keys[1]
update()
})
}
12 changes: 6 additions & 6 deletions test/process-wpt-results.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,21 +254,21 @@ describe('focus areas', () => {
const map = focus_areas_map(run)
assert.deepEqual(map, {
'/css/CSS2/floats-clear/float-replaced-width-004.xht': [
'css2',
'css',
'all',
'css',
'css2',
'floats-clear'
],
'/css/CSS2/abspos/static-inside-table-cell.html': [
'css2',
'css',
'all',
'css',
'css2',
'abspos'
],
'/css/CSS2/margin-padding-clear/margin-right-078.xht': [
'css2',
'css',
'all',
'css',
'css2',
'margin-padding-clear'
],
'/workers/semantics/multiple-workers/001.html': [
Expand Down

0 comments on commit d3f2e48

Please sign in to comment.