diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml
index febbf2306..83dae9be8 100644
--- a/.github/workflows/nodejs.yml
+++ b/.github/workflows/nodejs.yml
@@ -27,7 +27,6 @@ jobs:
build:
name: Build
- if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.5.3
@@ -42,9 +41,13 @@ jobs:
- name: Build
run: npm run build
+ env:
+ NUXT_PUBLIC_STUDIO_TOKENS: ${{ secrets.NUXT_PUBLIC_STUDIO_TOKENS }}
+ NODE_OPTIONS: --max-old-space-size=8192
- name: Upload Production Artifact
uses: actions/upload-pages-artifact@v1.0.9
+ if: github.event_name == 'push'
with:
path: dist
diff --git a/__tests__/components/content/Charts.test.ts b/__tests__/components/content/Charts.test.ts
index 75766d60b..a042cd4b1 100644
--- a/__tests__/components/content/Charts.test.ts
+++ b/__tests__/components/content/Charts.test.ts
@@ -4,16 +4,17 @@ import { describe, expect, test } from 'vitest'
import Charts from '~~/components/content/Charts.vue'
describe('components/content/Charts.vue', () => {
- const difficulties = {
- 0: { name: 'NORMAL', class: 'is-basic' },
- 1: { name: 'BASIC', class: 'is-basic' },
- 2: { name: 'ANOTHER', class: 'is-difficult' },
- 3: { name: 'MANIAC', class: 'is-expert' },
- }
+ const difficulties = [
+ { name: 'BEGINNER', type: 'info' },
+ { name: 'BASIC', type: 'warning' },
+ { name: 'DIFFICULT', type: 'danger' },
+ { name: 'EXPERT', type: 'success' },
+ { name: 'CHALLENGE', type: 'primary' },
+ ]
test('renders badges', () => {
const wrapper = mount(Charts, {
global: { stubs: { Badge: true } },
- props: { difficulties, charts: '0,1,2,3', levels: '1,2,3,4' },
+ props: { difficulties, charts: '0,1,2,3,4', levels: '1,2,3,4,5' },
})
expect(wrapper.element).toMatchSnapshot()
})
diff --git a/__tests__/components/content/__snapshots__/Charts.test.ts.snap b/__tests__/components/content/__snapshots__/Charts.test.ts.snap
index b75ed95a6..81f33636a 100644
--- a/__tests__/components/content/__snapshots__/Charts.test.ts.snap
+++ b/__tests__/components/content/__snapshots__/Charts.test.ts.snap
@@ -6,16 +6,24 @@ exports[`components/content/Charts.vue > renders badges 1`] = `
>
+
diff --git a/__tests__/test-utils.ts b/__tests__/test-utils.ts
deleted file mode 100644
index 771b98bb5..000000000
--- a/__tests__/test-utils.ts
+++ /dev/null
@@ -1,80 +0,0 @@
-import Oruga from '@oruga-ui/oruga-next'
-import { bulmaConfig } from '@oruga-ui/theme-bulma'
-import { flushPromises, mount } from '@vue/test-utils'
-import type { DefineComponent, Plugin } from 'vue'
-import { defineComponent, h, Suspense } from 'vue'
-
-export const plugins: (Plugin | [Plugin, ...unknown[]])[] = [
- [Oruga, bulmaConfig],
-]
-
-export const mountAsync = async >(
- component: T,
- options: Parameters>[1]
-) => {
- const mountOptions = { ...options }
- delete mountOptions.props
- const wrapper = mount(
- defineComponent({
- render() {
- return h(Suspense, null, {
- default: h(component, options?.props),
- fallback: h('div', 'fallback'),
- })
- },
- }),
- mountOptions
- )
-
- await flushPromises()
- return wrapper
-}
-
-export const mockSoftware: Awaited<
- ReturnType
->['software']['value'] = {
- slug: '1st-jp',
- title: 'Dance Dance Revolution',
- platform: 'Play Station',
- region: 'JP',
- launched: '1999-04-10',
- difficulties: {
- 0: { name: 'NORMAL', class: 'is-basic' },
- 1: { name: 'BASIC', class: 'is-basic' },
- 2: { name: 'ANOTHER', class: 'is-difficult' },
- 3: { name: 'MANIAC', class: 'is-expert' },
- },
- body: '',
- _id: 'content:series:1st-jp.md',
-}
-
-export const mockSoftwareList: Awaited<
- ReturnType
->['softwareList']['value'] = [
- {
- slug: '1st-jp',
- title: 'Dance Dance Revolution',
- platform: 'Play Station',
- region: 'JP',
- launched: '1999-04-10',
- },
- {
- slug: '2nd',
- title: 'Dance Dance Revolution 2nd ReMIX',
- platform: 'Play Station',
- region: 'JP',
- launched: '1999-08-26',
- },
-]
-
-export const mockSong: Awaited<
- ReturnType
->['song']['value'] = {
- slug: 'butterfly',
- name: 'butterfly',
- artist: 'smile. dk',
- bpm: 135,
- series: ['1st-jp'],
- body: '',
- _id: 'content:series:1st-jp.md',
-}
diff --git a/assets/css/_colors.scss b/assets/css/_colors.scss
deleted file mode 100644
index c4f267c2d..000000000
--- a/assets/css/_colors.scss
+++ /dev/null
@@ -1,23 +0,0 @@
-// Import Bulma's core
-@import 'bulma/sass/utilities/initial-variables';
-@import 'bulma/sass/utilities/functions';
-@import 'bulma/sass/utilities/derived-variables';
-
-// Set your colors
-$custom-colors: (
- 'primary': #333,
- 'beginner': #06f,
- 'basic': #fc0,
- 'difficult': #f36,
- 'expert': #6c0,
- 'challenge': #93c,
- 'unknown': #999,
-) !default;
-
-// Setup $colors to use as bulma classes (e.g. 'is-twitter')
-$colors: mergeColorMaps($colors, $custom-colors);
-
-// Links
-$link: $info;
-$link-invert: $info-invert;
-$link-focus-border: $info;
diff --git a/assets/css/main.scss b/assets/css/main.scss
deleted file mode 100644
index 49ccf1152..000000000
--- a/assets/css/main.scss
+++ /dev/null
@@ -1,8 +0,0 @@
-@import 'colors';
-@import 'bulma/sass/utilities/mixins';
-@import 'bulma/sass/utilities/controls';
-@import 'bulma/sass/utilities/extends';
-
-// Import Bulma and Oruga styles
-@import 'bulma/bulma';
-@import '@oruga-ui/theme-bulma/dist/scss/bulma';
diff --git a/components/content/Charts.vue b/components/content/Charts.vue
index 86ab7e0f1..4c7ad3995 100644
--- a/components/content/Charts.vue
+++ b/components/content/Charts.vue
@@ -11,12 +11,20 @@