Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spaenleh committed Nov 26, 2024
1 parent 9cf2d07 commit c6932ae
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 43 deletions.
4 changes: 2 additions & 2 deletions cypress/e2e/account/settings/preferences.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
PREFERENCES_LANGUAGE_SWITCH_ID,
PREFERENCES_SAVE_BUTTON_ID,
} from '../../../../src/config/selectors';
import { BOB, CURRENT_MEMBER } from '../../../fixtures/members';
import { CURRENT_MEMBER, MEMBERS } from '../../../fixtures/members';

describe('Display preferences', () => {
describe('Language', () => {
Expand Down Expand Up @@ -203,7 +203,7 @@ describe('Edit preferences', () => {
describe('Cancel should not update preferences', () => {
beforeEach(() => {
cy.setUpApi({
currentMember: BOB,
currentMember: MEMBERS.BOB,
});
cy.visit(ACCOUNT_SETTINGS_PATH);
cy.wait('@getCurrentMember');
Expand Down
8 changes: 4 additions & 4 deletions cypress/e2e/account/settings/publicProfile.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
PUBLIC_PROFILE_TWITTER_ID,
} from '../../../../src/config/selectors';
import {
BOB,
MEMBERS,
MEMBER_EMPTY_PUBLIC_PROFILE,
MEMBER_PUBLIC_PROFILE,
} from '../../../fixtures/members';
Expand All @@ -23,7 +23,7 @@ describe('Display public profile', () => {
describe('Completed public profile', () => {
beforeEach(() => {
cy.setUpApi({
currentMember: BOB,
currentMember: MEMBERS.BOB,
currentProfile: MEMBER_PUBLIC_PROFILE,
});
cy.visit(ACCOUNT_SETTINGS_PATH);
Expand Down Expand Up @@ -78,7 +78,7 @@ describe('Display public profile', () => {
describe('Empty public profile', () => {
beforeEach(() => {
cy.setUpApi({
currentMember: BOB,
currentMember: MEMBERS.BOB,
currentProfile: MEMBER_EMPTY_PUBLIC_PROFILE,
});
cy.visit(ACCOUNT_SETTINGS_PATH);
Expand Down Expand Up @@ -116,7 +116,7 @@ describe('Display public profile', () => {
describe('Edit public profile', () => {
beforeEach(() => {
cy.setUpApi({
currentMember: BOB,
currentMember: MEMBERS.BOB,
currentProfile: MEMBER_PUBLIC_PROFILE,
});
cy.visit(ACCOUNT_SETTINGS_PATH);
Expand Down
41 changes: 5 additions & 36 deletions cypress/fixtures/useCases/staticElectricity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,7 @@ export const STATIC_ELECTRICITY: {
description: '',
creator: CURRENT_MEMBER,
extra: {
[ItemType.FOLDER]: {
childrenOrder: [
'gcafbd2a-5688-11eb-ae92-0242ac130015',
'gcafbd2a-4218-31eb-fe32-0542bc120002',
'gcbffd2a-4218-31eb-fe32-0542bc120002',
'gfbfed2a-4218-31eb-fe32-0542bc120002',
],
},
[ItemType.FOLDER]: {},
},
}),
FolderItemFactory({
Expand All @@ -43,15 +36,7 @@ export const STATIC_ELECTRICITY: {
name: 'Causes and experiences',
creator: CURRENT_MEMBER,
extra: {
[ItemType.FOLDER]: {
childrenOrder: [
'gcefbd2a-5688-11eb-ae92-0542bc120002',
'gcefbd2a-5688-11eb-fe32-0542bc120002',
'gcefbd2a-5648-31eb-fe32-0542bc120002',
'gcefbd4e-5688-11eb-fe32-0542bc120002',
'gceffe4e-5688-11eb-fe32-0542bc120002',
],
},
[ItemType.FOLDER]: {},
},
}),
DocumentItemFactory({
Expand Down Expand Up @@ -119,12 +104,7 @@ export const STATIC_ELECTRICITY: {
description: '',
creator: CURRENT_MEMBER,
extra: {
[ItemType.FOLDER]: {
childrenOrder: [
'gcafbd2a-4118-31eb-fe32-0542bc120002',
'gcafbd2a-4118-31eb-fe32-1542bc120002',
],
},
[ItemType.FOLDER]: {},
},
}),
AppItemFactory({
Expand Down Expand Up @@ -158,12 +138,7 @@ export const STATIC_ELECTRICITY: {
description: '',
creator: CURRENT_MEMBER,
extra: {
[ItemType.FOLDER]: {
childrenOrder: [
'gcbffd2a_4218_31eb_fe32_0542bc121102',
'gcbffd2a_4218_31eb_fe32_0542bc121145',
],
},
[ItemType.FOLDER]: {},
},
}),
DocumentItemFactory({
Expand Down Expand Up @@ -195,13 +170,7 @@ export const STATIC_ELECTRICITY: {
name: 'Static Discharge: Lightning',
creator: CURRENT_MEMBER,
extra: {
[ItemType.FOLDER]: {
childrenOrder: [
'gfbfed2a_4218_31eb_fe32_0522bc120002',
'gfbfed2a_4218_31eb_fe32_0522bc120065',
'gfbfed2a_4218_31eb_fe32_0522bc120265',
],
},
[ItemType.FOLDER]: {},
},
}),
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"start:test": "vite --mode test",
"build": "tsc -b && vite build",
"build:dev": "tsc -b && vite build --mode development",
"build:test": "tsc -b vite build --mode test",
"build:test": "tsc -b && vite build --mode test",
"preview": "vite preview",
"preview:dev": "vite preview --mode development",
"preview:test": "vite preview --mode test",
Expand Down

0 comments on commit c6932ae

Please sign in to comment.