Skip to content

Commit

Permalink
Fixing E2E test to handle new background button image structure
Browse files Browse the repository at this point in the history
  • Loading branch information
jst-cyr committed Sep 18, 2023
1 parent ac6ed42 commit 026bab0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions cypress/e2e/Themes/theme.cy.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const backgroundImageFileName = "182bc6d196aa465cbf9b614ff2883eb4"
const backgroundImageFileName = '182bc6d196aa465cbf9b614ff2883eb4';

describe('Theme switcher', () => {
it('Choosing Fantasy theme should change background and buttons', () => {
cy.visit('/');
cy.get('.css-uvp8xs > :nth-child(2) > .chakra-stack > .chakra-button').click();
cy.get('div#backgroundImage').should('have.css', 'background-image').and('include', backgroundImageFileName);
cy.get('[value="Bard"]').should('have.css', 'background-image').and('include', "/fantasy/button-default.svg");

})
})
cy.get('div#backgroundImage').should('have.css', 'background-image').and('include', backgroundImageFileName);
cy.get('[value="Bard"]').should('have.css', 'background-image').and('include', '/fantasy/button/');
});
});

1 comment on commit 026bab0

@vercel
Copy link

@vercel vercel bot commented on 026bab0 Sep 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.