mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-11-30 15:58:19 +09:00
fix test
This commit is contained in:
parent
030597e572
commit
fec18294e0
@ -64,7 +64,6 @@ describe('After setup instance', () => {
|
|||||||
cy.get('[data-cy-signup-submit]').should('be.disabled');
|
cy.get('[data-cy-signup-submit]').should('be.disabled');
|
||||||
cy.get('[data-cy-signup-password-retype] input').type('alice1234');
|
cy.get('[data-cy-signup-password-retype] input').type('alice1234');
|
||||||
cy.get('[data-cy-signup-submit]').should('not.be.disabled');
|
cy.get('[data-cy-signup-submit]').should('not.be.disabled');
|
||||||
cy.get('[data-cy-signup-back]').click();
|
|
||||||
cy.get('[data-cy-signup-submit]').click();
|
cy.get('[data-cy-signup-submit]').click();
|
||||||
|
|
||||||
cy.wait('@signup');
|
cy.wait('@signup');
|
||||||
|
@ -22,24 +22,17 @@ describe('After user signed in', () => {
|
|||||||
cy.wait(1000);
|
cy.wait(1000);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('widget edit toggle is visible', () => {
|
|
||||||
cy.get('[data-cy-widget-edit]').should('be.visible');
|
|
||||||
});
|
|
||||||
|
|
||||||
it('widget select should be visible in edit mode', () => {
|
it('widget select should be visible in edit mode', () => {
|
||||||
cy.get('[data-cy-widget-edit]').click();
|
|
||||||
cy.get('[data-cy-widget-select]').should('be.visible');
|
cy.get('[data-cy-widget-select]').should('be.visible');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('first widget should be removed', () => {
|
it('first widget should be removed', () => {
|
||||||
cy.get('[data-cy-widget-edit]').click();
|
|
||||||
cy.get('[data-cy-customize-container]:first-child [data-cy-customize-container-remove]._button').click();
|
cy.get('[data-cy-customize-container]:first-child [data-cy-customize-container-remove]._button').click();
|
||||||
cy.get('[data-cy-customize-container]').should('have.length', 2);
|
cy.get('[data-cy-customize-container]').should('have.length', 2);
|
||||||
});
|
});
|
||||||
|
|
||||||
function buildWidgetTest(widgetName) {
|
function buildWidgetTest(widgetName) {
|
||||||
it(`${widgetName} widget should get added`, () => {
|
it(`${widgetName} widget should get added`, () => {
|
||||||
cy.get('[data-cy-widget-edit]').click();
|
|
||||||
cy.get('[data-cy-widget-select] select').select(widgetName, { force: true });
|
cy.get('[data-cy-widget-select] select').select(widgetName, { force: true });
|
||||||
cy.get('[data-cy-bg]._modalBg[data-cy-transparent]').click({ multiple: true, force: true });
|
cy.get('[data-cy-bg]._modalBg[data-cy-transparent]').click({ multiple: true, force: true });
|
||||||
cy.get('[data-cy-widget-add]').click({ force: true });
|
cy.get('[data-cy-widget-add]').click({ force: true });
|
||||||
|
@ -41,6 +41,7 @@ export const paramDef = {
|
|||||||
default: false,
|
default: false,
|
||||||
description: 'Only show notes that have attached files.',
|
description: 'Only show notes that have attached files.',
|
||||||
},
|
},
|
||||||
|
withReplies: { type: 'boolean', default: false },
|
||||||
fileType: { type: 'array', items: {
|
fileType: { type: 'array', items: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
} },
|
} },
|
||||||
@ -87,7 +88,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> {
|
|||||||
.leftJoinAndSelect('renote.user', 'renoteUser');
|
.leftJoinAndSelect('renote.user', 'renoteUser');
|
||||||
|
|
||||||
this.queryService.generateChannelQuery(query, me);
|
this.queryService.generateChannelQuery(query, me);
|
||||||
this.queryService.generateRepliesQuery(query, me);
|
this.queryService.generateRepliesQuery(query, ps.withReplies, me);
|
||||||
this.queryService.generateVisibilityQuery(query, me);
|
this.queryService.generateVisibilityQuery(query, me);
|
||||||
if (me) this.queryService.generateMutedUserQuery(query, me);
|
if (me) this.queryService.generateMutedUserQuery(query, me);
|
||||||
if (me) this.queryService.generateMutedNoteQuery(query, me);
|
if (me) this.queryService.generateMutedNoteQuery(query, me);
|
||||||
|
@ -964,7 +964,7 @@ describe('Endpoints', () => {
|
|||||||
test('文字数オーバーで怒られる', async () => {
|
test('文字数オーバーで怒られる', async () => {
|
||||||
const res = await api('/messaging/messages/create', {
|
const res = await api('/messaging/messages/create', {
|
||||||
userId: bob.id,
|
userId: bob.id,
|
||||||
text: '!'.repeat(1001),
|
text: '!'.repeat(3001),
|
||||||
}, alice);
|
}, alice);
|
||||||
|
|
||||||
assert.strictEqual(res.status, 400);
|
assert.strictEqual(res.status, 400);
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
<MkCaptcha v-if="instance.enableRecaptcha" ref="recaptcha" v-model="reCaptchaResponse" :class="$style.captcha" provider="recaptcha" :sitekey="instance.recaptchaSiteKey"/>
|
||||||
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
<MkCaptcha v-if="instance.enableTurnstile" ref="turnstile" v-model="turnstileResponse" :class="$style.captcha" provider="turnstile" :sitekey="instance.turnstileSiteKey"/>
|
||||||
<div class="_buttonsCenter">
|
<div class="_buttonsCenter">
|
||||||
<MkButton inline rounded data-cy-signup-back @click="goBack"><i class="ti ti-arrow-left"></i> {{ i18n.ts.goBack }}</MkButton>
|
<MkButton inline rounded @click="goBack"><i class="ti ti-arrow-left"></i> {{ i18n.ts.goBack }}</MkButton>
|
||||||
<MkButton type="submit" :disabled="shouldDisableSubmitting" inline gradate rounded data-cy-signup-submit>
|
<MkButton type="submit" :disabled="shouldDisableSubmitting" inline gradate rounded data-cy-signup-submit>
|
||||||
<template v-if="submitting">
|
<template v-if="submitting">
|
||||||
<MkLoading :em="true" :colored="false"/>
|
<MkLoading :em="true" :colored="false"/>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<!-- <button v-if="editMode" class="_textButton" style="font-size: 0.9em;" @click="editMode = false"><i class="ti ti-check"></i> {{ i18n.ts.editWidgetsExit }}</button>
|
<!-- <button v-if="editMode" class="_textButton" style="font-size: 0.9em;" @click="editMode = false"><i class="ti ti-check"></i> {{ i18n.ts.editWidgetsExit }}</button>
|
||||||
<button v-else class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button> -->
|
<button v-else class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button> -->
|
||||||
<button v-if="!editMode" class="_textButton" data-cy-widget-edit :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button>
|
<button v-if="!editMode" class="_textButton" :class="$style.edit" style="font-size: 0.9em;" @click="editMode = true"><i class="ti ti-pencil"></i> {{ i18n.ts.editWidgets }}</button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user