Test fix: Don't click the settings close button until we confirm a write
This commit is contained in:
@ -311,13 +311,13 @@ test.describe('Testing settings', () => {
|
|||||||
await expect(userSettingsTab).toBeChecked()
|
await expect(userSettingsTab).toBeChecked()
|
||||||
await themeColorSetting.fill(userThemeColor)
|
await themeColorSetting.fill(userThemeColor)
|
||||||
await expect(logoLink).toHaveCSS('--primary-hue', userThemeColor)
|
await expect(logoLink).toHaveCSS('--primary-hue', userThemeColor)
|
||||||
await settingsCloseButton.click()
|
|
||||||
await expect
|
await expect
|
||||||
.poll(async () => fsp.readFile(tempUserSettingsFilePath, 'utf-8'), {
|
.poll(async () => fsp.readFile(tempUserSettingsFilePath, 'utf-8'), {
|
||||||
message: 'Setting should now be written to the file',
|
message: 'Setting should now be written to the file',
|
||||||
timeout: 5_000,
|
timeout: 5_000,
|
||||||
})
|
})
|
||||||
.toContain(`themeColor = "${userThemeColor}"`)
|
.toContain(`themeColor = "${userThemeColor}"`)
|
||||||
|
await settingsCloseButton.click()
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step('Set project theme color', async () => {
|
await test.step('Set project theme color', async () => {
|
||||||
@ -328,7 +328,6 @@ test.describe('Testing settings', () => {
|
|||||||
await expect(projectSettingsTab).toBeChecked()
|
await expect(projectSettingsTab).toBeChecked()
|
||||||
await themeColorSetting.fill(projectThemeColor)
|
await themeColorSetting.fill(projectThemeColor)
|
||||||
await expect(logoLink).toHaveCSS('--primary-hue', projectThemeColor)
|
await expect(logoLink).toHaveCSS('--primary-hue', projectThemeColor)
|
||||||
await settingsCloseButton.click()
|
|
||||||
// Make sure that the project settings file has been written to before continuing
|
// Make sure that the project settings file has been written to before continuing
|
||||||
await expect
|
await expect
|
||||||
.poll(
|
.poll(
|
||||||
@ -339,6 +338,7 @@ test.describe('Testing settings', () => {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
.toContain(`themeColor = "${projectThemeColor}"`)
|
.toContain(`themeColor = "${projectThemeColor}"`)
|
||||||
|
await settingsCloseButton.click()
|
||||||
})
|
})
|
||||||
|
|
||||||
await test.step('Refresh the application and see project setting applied', async () => {
|
await test.step('Refresh the application and see project setting applied', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user