From fc1a16283eb736d6aa09ab80b8efa1e68a29eb23 Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Tue, 31 Jan 2023 14:18:26 +0100 Subject: [PATCH] Reset theming in cypress test The test in admin-settings does not reset the theming. So when it is run before user-background, the "Default cloud background is not rendered" test fails. This makes sure that the theming is reset before running "User default background settings" Signed-off-by: Louis Chemineau --- cypress/e2e/theming/user-background.cy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cypress/e2e/theming/user-background.cy.ts b/cypress/e2e/theming/user-background.cy.ts index 8f9e42d6ad4..86b66627ee6 100644 --- a/cypress/e2e/theming/user-background.cy.ts +++ b/cypress/e2e/theming/user-background.cy.ts @@ -19,15 +19,18 @@ * along with this program. If not, see . * */ -import type { User } from '@nextcloud/cypress' +import { User } from '@nextcloud/cypress' import { pickRandomColor, validateBodyThemingCss } from './themingUtils' const defaultPrimary = '#006aa3' const defaultBackground = 'kamil-porembinski-clouds.jpg' +const admin = new User('admin', 'admin') describe('User default background settings', function() { before(function() { + cy.resetAdminTheming() + cy.resetUserTheming(admin) cy.createRandomUser().then((user: User) => { cy.login(user) })