Skip to content
This repository has been archived by the owner on Mar 23, 2022. It is now read-only.

Commit

Permalink
Merge pull request #372 from RaenonX-DL/dev
Browse files Browse the repository at this point in the history
v2.17.1 Release
  • Loading branch information
RaenonX authored Jan 25, 2022
2 parents 7e199c7 + e0e204e commit 0b872d2
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 9 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@use "sass:color";
@import "../../../../../../styles/colors";

button {
Expand All @@ -12,11 +13,12 @@ button {
width: 2rem;

&:disabled {
background-color: $color-dark-red;
background-color: color.change($color-dark-red, $alpha: 0.75);
}

&.subscribe-button-as-icon-enabled {
color: white;
background-color: color.change($color-bw-80, $alpha: 0.75);
}

&.subscribe-button-as-icon-disabled {
Expand Down
3 changes: 2 additions & 1 deletion src/components/elements/markdown/main.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import userEvent from '@testing-library/user-event';

import status from '../../../../test/data/resources/enums/status.json';
import {renderReact} from '../../../../test/render/main';
import {SupportedLanguages, UnitType} from '../../../api-def/api';
import {PartiallySupportedLanguages, SupportedLanguages, UnitType} from '../../../api-def/api';
import {DepotPaths, SimpleUnitInfo} from '../../../api-def/resources';
import {Markdown} from './main';
import {makeAfflictionIconMarkdown} from './transformers/text/icon/utils';
Expand Down Expand Up @@ -311,6 +311,7 @@ describe('Markdown', () => {
[SupportedLanguages.CHT]: 'CHT',
[SupportedLanguages.EN]: 'EN',
[SupportedLanguages.JP]: 'JP',
[PartiallySupportedLanguages.CHS]: 'CHS',
},
type: UnitType.CHARACTER,
icon: '100013_04_r05',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import React from 'react';
import {screen} from '@testing-library/react';

import {renderReact} from '../../../../../../test/render/main';
import {SupportedLanguages, UnitType} from '../../../../../api-def/api';
import {PartiallySupportedLanguages, SupportedLanguages, UnitType} from '../../../../../api-def/api';
import {DepotPaths, SimpleUnitInfo} from '../../../../../api-def/resources';
import {MarkdownUnitName} from './unit';

Expand All @@ -15,6 +15,7 @@ describe('Unit link', () => {
[SupportedLanguages.CHT]: 'CHT',
[SupportedLanguages.EN]: 'EN',
[SupportedLanguages.JP]: 'JP',
[PartiallySupportedLanguages.CHS]: 'CHS',
},
type: UnitType.CHARACTER,
icon: '100013_04_r05',
Expand Down
7 changes: 7 additions & 0 deletions src/components/elements/posts/list/page.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: []}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
));

Expand All @@ -36,6 +37,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: []}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
));

Expand All @@ -52,6 +54,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: [{pathname: PostPath.QUEST_EDIT, title: newPostButtonTitle}]}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
),
{
Expand All @@ -74,6 +77,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: [{pathname: PostPath.QUEST_EDIT, title: newPostButtonTitle}]}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
),
{
Expand All @@ -93,6 +97,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: []}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
));

Expand All @@ -115,6 +120,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: []}}
fnFetchList={fnFetchList}
renderPostEntries={fnRenderEntries}
subKeyName="ALL_QUEST"
/>
));

Expand All @@ -133,6 +139,7 @@ describe('Post list page', () => {
postManageBarProps={{newButtons: []}}
fnFetchList={fnFetchList}
renderPostEntries={() => <></>}
subKeyName="ALL_QUEST"
/>
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,13 @@ describe('Analysis lookup entry', () => {
viewCount: 777,
modifiedEpoch: 9000000,
publishedEpoch: 8000000,
userSubscribed: true,
};

it('renders analysis with correct info and link to click', async () => {
renderReact(() => <UnitInfoEntry unitInfo={unitInfo} analysisMeta={analysisMeta} simplified={false}/>);
renderReact(() => (
<UnitInfoEntry unitInfo={unitInfo} analysisMeta={analysisMeta} simplified={false} disableSubscription/>
));

expect(screen.getByAltText('Gala Leonidas')).toBeInTheDocument();
const unitName = screen.getByText('Gala Leonidas');
Expand All @@ -52,7 +55,9 @@ describe('Analysis lookup entry', () => {
});

it('shows unavailable as expected', async () => {
renderReact(() => <UnitInfoEntry unitInfo={unitInfo} simplified={false}/>);
renderReact(() => (
<UnitInfoEntry unitInfo={unitInfo} simplified={false} disableSubscription/>
));

expect(screen.getByAltText('Gala Leonidas')).toBeInTheDocument();
const unitName = screen.getByText('Gala Leonidas');
Expand All @@ -68,7 +73,9 @@ describe('Analysis lookup entry', () => {
});

it('shows available but simplified entry', async () => {
renderReact(() => <UnitInfoEntry unitInfo={unitInfo} analysisMeta={analysisMeta} simplified/>);
renderReact(() => (
<UnitInfoEntry unitInfo={unitInfo} analysisMeta={analysisMeta} simplified disableSubscription/>
));

expect(screen.getByAltText('Gala Leonidas')).toBeInTheDocument();
const unitName = screen.getByText('Gala Leonidas');
Expand All @@ -80,7 +87,9 @@ describe('Analysis lookup entry', () => {
});

it('shows unavailable even if simplified', async () => {
renderReact(() => <UnitInfoEntry unitInfo={unitInfo} simplified/>);
renderReact(() => (
<UnitInfoEntry unitInfo={unitInfo} simplified disableSubscription/>
));

expect(screen.getByAltText('Gala Leonidas')).toBeInTheDocument();
const unitName = screen.getByText('Gala Leonidas');
Expand Down

0 comments on commit 0b872d2

Please sign in to comment.