-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,145 additions
and
134 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
{ | ||
"baseUrl": ".", | ||
"include": ["src/**/*"], | ||
"compilerOptions": { | ||
"baseUrl": ".", | ||
"target": "esnext", | ||
"module": "es2015", | ||
"paths": { | ||
"@components/legacy/TheFooter/*": [ | ||
"./src/themes/default/components/legacy/TheFooter.vue/*" | ||
], | ||
"@components/legacy/TheFooter": [ | ||
"./src/themes/default/components/legacy/TheFooter.vue/index.js", | ||
"./src/themes/default/components/legacy/TheFooter.vue/index.json", | ||
"./src/themes/default/components/legacy/TheFooter.vue/index.vue", | ||
"./src/themes/default/components/legacy/TheFooter.vue/index.scss", | ||
"./src/themes/default/components/legacy/TheFooter.vue/index.css" | ||
], | ||
"@/*": ["src/*"], | ||
"@": [ | ||
"src/index.js", | ||
"src/index.json", | ||
"src/index.vue", | ||
"src/index.scss", | ||
"src/index.css" | ||
], | ||
"@@/*": ["./*"], | ||
"@@": [ | ||
"./index.js", | ||
"./index.json", | ||
"./index.vue", | ||
"./index.scss", | ||
"./index.css" | ||
], | ||
"@locale/*": ["locale/*"], | ||
"@locale": [ | ||
"locale/index.js", | ||
"locale/index.json", | ||
"locale/index.vue", | ||
"locale/index.scss", | ||
"locale/index.css" | ||
], | ||
"@assets/*": ["src/assets/*"], | ||
"@assets": [ | ||
"src/assets/index.js", | ||
"src/assets/index.json", | ||
"src/assets/index.vue", | ||
"src/assets/index.scss", | ||
"src/assets/index.css" | ||
], | ||
"@components/*": ["src/components/*"], | ||
"@components": [ | ||
"src/components/index.js", | ||
"src/components/index.json", | ||
"src/components/index.vue", | ||
"src/components/index.scss", | ||
"src/components/index.css" | ||
], | ||
"@basecomponents/*": ["src/components/base/*"], | ||
"@basecomponents": [ | ||
"src/components/base/index.js", | ||
"src/components/base/index.json", | ||
"src/components/base/index.vue", | ||
"src/components/base/index.scss", | ||
"src/components/base/index.css" | ||
], | ||
"@docs/*": ["docs/*"], | ||
"@docs": [ | ||
"docs/index.js", | ||
"docs/index.json", | ||
"docs/index.vue", | ||
"docs/index.scss", | ||
"docs/index.css" | ||
], | ||
"@layouts/*": ["src/layouts/*"], | ||
"@layouts": [ | ||
"src/layouts/index.js", | ||
"src/layouts/index.json", | ||
"src/layouts/index.vue", | ||
"src/layouts/index.scss", | ||
"src/layouts/index.css" | ||
], | ||
"@middleware/*": ["src/middleware/*"], | ||
"@middleware": [ | ||
"src/middleware/index.js", | ||
"src/middleware/index.json", | ||
"src/middleware/index.vue", | ||
"src/middleware/index.scss", | ||
"src/middleware/index.css" | ||
], | ||
"@mixins/*": ["src/mixins/*"], | ||
"@mixins": [ | ||
"src/mixins/index.js", | ||
"src/mixins/index.json", | ||
"src/mixins/index.vue", | ||
"src/mixins/index.scss", | ||
"src/mixins/index.css" | ||
], | ||
"@pages/*": ["src/pages/*"], | ||
"@pages": [ | ||
"src/pages/index.js", | ||
"src/pages/index.json", | ||
"src/pages/index.vue", | ||
"src/pages/index.scss", | ||
"src/pages/index.css" | ||
], | ||
"@utils/*": ["src/utils/*"], | ||
"@utils": [ | ||
"src/utils/index.js", | ||
"src/utils/index.json", | ||
"src/utils/index.vue", | ||
"src/utils/index.scss", | ||
"src/utils/index.css" | ||
], | ||
"@plugins/*": ["src/plugins/*"], | ||
"@plugins": [ | ||
"src/plugins/index.js", | ||
"src/plugins/index.json", | ||
"src/plugins/index.vue", | ||
"src/plugins/index.scss", | ||
"src/plugins/index.css" | ||
], | ||
"@serverMiddleware/*": ["src/serverMiddleware/*"], | ||
"@serverMiddleware": [ | ||
"src/serverMiddleware/index.js", | ||
"src/serverMiddleware/index.json", | ||
"src/serverMiddleware/index.vue", | ||
"src/serverMiddleware/index.scss", | ||
"src/serverMiddleware/index.css" | ||
], | ||
"@store/*": ["src/store/*"], | ||
"@store": [ | ||
"src/store/index.js", | ||
"src/store/index.json", | ||
"src/store/index.vue", | ||
"src/store/index.scss", | ||
"src/store/index.css" | ||
], | ||
"@static/*": ["src/themes/default/static/*"], | ||
"@static": [ | ||
"src/themes/default/static/index.js", | ||
"src/themes/default/static/index.json", | ||
"src/themes/default/static/index.vue", | ||
"src/themes/default/static/index.scss", | ||
"src/themes/default/static/index.css" | ||
], | ||
"@theme/*": ["src/themes/default/*"], | ||
"@theme": [ | ||
"src/themes/default/index.js", | ||
"src/themes/default/index.json", | ||
"src/themes/default/index.vue", | ||
"src/themes/default/index.scss", | ||
"src/themes/default/index.css" | ||
], | ||
"@styles/*": ["src/themes/default/styles/index.scss/*"], | ||
"@styles": ["src/themes/default/styles/index.scss"], | ||
"@styles-base/*": ["src/themes/base/styles/*"], | ||
"@styles-base": [ | ||
"src/themes/base/styles/index.js", | ||
"src/themes/base/styles/index.json", | ||
"src/themes/base/styles/index.vue", | ||
"src/themes/base/styles/index.scss", | ||
"src/themes/base/styles/index.css" | ||
], | ||
"@variables/*": ["src/themes/default/styles/variables.scss/*"], | ||
"@variables": [ | ||
"src/themes/default/styles/variables.scss/index.js", | ||
"src/themes/default/styles/variables.scss/index.json", | ||
"src/themes/default/styles/variables.scss/index.vue", | ||
"src/themes/default/styles/variables.scss/index.scss", | ||
"src/themes/default/styles/variables.scss/index.css" | ||
] | ||
} | ||
}, | ||
"exclude": ["node_modules", ".nuxt", "dist"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
import AdminMigrationSection from "@/components/administration/AdminMigrationSection.vue"; | ||
import EnvConfigModule from "@/store/env-config"; | ||
import SchoolsModule from "@/store/schools"; | ||
import { Envs } from "@/store/types/env-config"; | ||
import UserLoginMigrationModule from "@/store/user-login-migrations"; | ||
import { | ||
ENV_CONFIG_MODULE_KEY, | ||
|
@@ -44,6 +45,7 @@ describe("AdminMigrationSection", () => { | |
|
||
envConfigModule = createModuleMocks(EnvConfigModule, { | ||
getAccessibilityReportEmail: "[email protected]", | ||
getEnv: {} as Envs, | ||
...envConfigGetters, | ||
}); | ||
|
||
|
@@ -987,4 +989,141 @@ describe("AdminMigrationSection", () => { | |
}); | ||
}); | ||
}); | ||
|
||
describe("Migration wizard button", () => { | ||
describe("when the migration wizard feature is enabled", () => { | ||
describe("when the migration is running and the school is migrated", () => { | ||
it("should be enabled", () => { | ||
const { wrapper } = setup( | ||
{ | ||
getSchool: { | ||
...mockSchool, | ||
systemIds: ["targetSystemId"], | ||
}, | ||
}, | ||
{ | ||
getUserLoginMigration: { | ||
sourceSystemId: "sourceSystemId", | ||
targetSystemId: "targetSystemId", | ||
startedAt: new Date(2023, 1, 1), | ||
closedAt: undefined, | ||
finishedAt: undefined, | ||
mandatorySince: undefined, | ||
}, | ||
}, | ||
{ | ||
getEnv: { FEATURE_SHOW_MIGRATION_WIZARD: true } as Envs, | ||
} | ||
); | ||
|
||
const button = wrapper.find( | ||
'[data-testid="migration-wizard-button"]' | ||
); | ||
|
||
expect(button.props("disabled")).toBeFalsy(); | ||
}); | ||
|
||
it("should redirect to the wizard", async () => { | ||
const { wrapper } = setup( | ||
{}, | ||
{ | ||
getUserLoginMigration: { | ||
sourceSystemId: "sourceSystemId", | ||
targetSystemId: "targetSystemId", | ||
startedAt: new Date(2023, 1, 1), | ||
closedAt: undefined, | ||
finishedAt: undefined, | ||
mandatorySince: undefined, | ||
}, | ||
}, | ||
{ | ||
getEnv: { FEATURE_SHOW_MIGRATION_WIZARD: true } as Envs, | ||
} | ||
); | ||
|
||
const button = wrapper.find( | ||
'[data-testid="migration-wizard-button"]' | ||
); | ||
|
||
expect(button.props("to")).toEqual({ | ||
name: "administration-migration", | ||
}); | ||
}); | ||
}); | ||
|
||
describe("when the migration has not been started", () => { | ||
it("should be disabled", () => { | ||
const { wrapper } = setup( | ||
{}, | ||
{ | ||
getUserLoginMigration: undefined, | ||
}, | ||
{ | ||
getEnv: { FEATURE_SHOW_MIGRATION_WIZARD: true } as Envs, | ||
} | ||
); | ||
|
||
const button = wrapper.find( | ||
'[data-testid="migration-wizard-button"]' | ||
); | ||
|
||
expect(button.props("disabled")).toBeTruthy(); | ||
}); | ||
}); | ||
|
||
describe("when the school has not been migrated", () => { | ||
it("should be disabled", () => { | ||
const { wrapper } = setup( | ||
{ | ||
getSchool: { | ||
...mockSchool, | ||
systemIds: [], | ||
}, | ||
}, | ||
{ | ||
getUserLoginMigration: { | ||
sourceSystemId: "sourceSystemId", | ||
targetSystemId: "targetSystemId", | ||
startedAt: new Date(2023, 1, 1), | ||
closedAt: undefined, | ||
finishedAt: undefined, | ||
mandatorySince: undefined, | ||
}, | ||
}, | ||
{ | ||
getEnv: { FEATURE_SHOW_MIGRATION_WIZARD: true } as Envs, | ||
} | ||
); | ||
|
||
const button = wrapper.find( | ||
'[data-testid="migration-wizard-button"]' | ||
); | ||
|
||
expect(button.props("disabled")).toBeTruthy(); | ||
}); | ||
}); | ||
}); | ||
|
||
describe("when the migration wizard feature is disabled", () => { | ||
it("should not exist", () => { | ||
const { wrapper } = setup( | ||
{}, | ||
{ | ||
getUserLoginMigration: { | ||
sourceSystemId: "sourceSystemId", | ||
targetSystemId: "targetSystemId", | ||
startedAt: new Date(2023, 1, 1), | ||
closedAt: undefined, | ||
finishedAt: undefined, | ||
mandatorySince: undefined, | ||
}, | ||
} | ||
); | ||
|
||
const button = wrapper.find('[data-testid="migration-wizard-button"]'); | ||
|
||
expect(button.exists()).toBeFalsy(); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.