[E2E][LanguageCenter] Skip flaky test + try to make data deterministic

This commit is contained in:
Aaro Koivukangas
2026-09-21 12:55:16 +03:00
parent 909763e113
commit c4126e8fd6
2 changed files with 13 additions and 3 deletions
+3 -1
View File
@@ -37,7 +37,9 @@ test.describe('When language center is opened', () => {
await expect(page.getByText('AYKK-RUKIRJ')).toBeVisible()
})
test('Faculties tab shows numbers', async ({ page }) => {
// FIXME: This changes per updater run
// Example case: 550789 - KK-JAOK15
test.skip('Faculties tab shows numbers', async ({ page }) => {
await checkNumbers(page, [2074, 36, 9, 33, 758, 15, 40, 6, 51, 1, 24, 1059, 42, 0], 15, 'faculties')
})
@@ -131,7 +131,11 @@ export const computeLanguageCenterData = async () => {
semestercode: { [Op.gte]: autumnSemester2017 },
credittypecode: 4,
},
order: [['attainment_date', 'DESC']],
order: [
['attainment_date', 'DESC NULLS LAST'],
['student_studentnumber', 'ASC'],
['course_id', 'ASC'],
], // Add a fallbacks sorting so that runs would be more deterministic
})
const enrollments = await EnrollmentModel.findAll({
@@ -142,7 +146,11 @@ export const computeLanguageCenterData = async () => {
state: { [Op.in]: ['ENROLLED', 'REJECTED'] },
// EnrollmentDateTimeThreshold need not be used here as we are not counting failed courses
},
order: [['enrollment_date_time', 'DESC']],
order: [
['enrollment_date_time', 'DESC NULLS LAST'],
['studentnumber', 'ASC'],
['course_id', 'ASC'], // Last fallback
],
})
const studyRights = await SISStudyRightModel.findAll({