fix: settings cypress test after style changes

This commit is contained in:
Jun Siang Cheah 2024-05-15 23:49:26 +08:00
parent b263e24e56
commit 8d4c9c77bf
2 changed files with 3 additions and 6 deletions

View File

@ -15,12 +15,8 @@ describe('Settings', () => {
cy.loginAdmin(); cy.loginAdmin();
// Visit the home page // Visit the home page
cy.visit('/'); cy.visit('/');
// Open the sidebar if it is not already open // Click on the user menu
cy.get('[aria-label="Open sidebar"]').then(() => { cy.get('button[aria-label="User Menu"]').click();
cy.get('button[id="sidebar-toggle-button"]').click();
});
// Click on the profile link
cy.get('button').contains(adminUser.name).click();
// Click on the settings link // Click on the settings link
cy.get('button').contains('Settings').click(); cy.get('button').contains('Settings').click();
}); });

View File

@ -141,6 +141,7 @@
> >
<button <button
class=" flex rounded-xl p-1.5 w-full hover:bg-gray-100 dark:hover:bg-gray-850 transition" class=" flex rounded-xl p-1.5 w-full hover:bg-gray-100 dark:hover:bg-gray-850 transition"
aria-label="User Menu"
> >
<div class=" self-center"> <div class=" self-center">
<img <img