Fixed admin tests.

This commit is contained in:
SamTV12345 2024-06-05 21:31:29 +02:00
parent 1b09ee3719
commit c91116e18a
2 changed files with 4 additions and 5 deletions

View file

@ -11,7 +11,6 @@ permissions:
jobs:
withplugins:
if: ${{ github.actor != 'dependabot[bot]' }}
name: with plugins
runs-on: ubuntu-latest

View file

@ -17,10 +17,10 @@ test.describe('admin settings',()=> {
const settingsVal = await settings.inputValue()
const settingsLength = settingsVal.length
await settings.fill(`/* test */\n${settingsVal}`)
await settings.fill(`{"title": "Etherpad123"}`)
const newValue = await settings.inputValue()
expect(newValue).toContain('/* test */')
expect(newValue.length).toEqual(settingsLength+11)
expect(newValue).toContain('{"title": "Etherpad123"}')
expect(newValue.length).toEqual(24)
await saveSettings(page)
// Check if the changes were actually saved
@ -31,7 +31,7 @@ test.describe('admin settings',()=> {
const newSettings = page.locator('.settings');
const newSettingsVal = await newSettings.inputValue()
expect(newSettingsVal).toContain('/* test */')
expect(newSettingsVal).toContain('{"title": "Etherpad123"}')
// Change back to old settings