Skip to content

Commit

Permalink
adding tests for enablin/disabling appstore
Browse files Browse the repository at this point in the history
  • Loading branch information
aozien committed May 15, 2023
1 parent 29678db commit 6be26a5
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
17 changes: 17 additions & 0 deletions cypress/e2e/appStore/appStore.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
describe('appStore side drawer', () => {
context('enable/disable feature using url parameter', () => {
beforeEach(() => {
cy.setCookie('isFirstTime', 'false')
cy.visit('/')
})

it('should not show app-store icon when url parameter is not present', () => {
cy.findByRole('button', {name: /Open App Store/}).should('not.exist')
})

it('should show app-store icon when url parameter is present', () => {
cy.routerNavigate('/share/v/p?feature=apps', {replace: true})
cy.findByRole('button', {name: /Open App Store/}).should('exist')
})
})
})
16 changes: 6 additions & 10 deletions src/assets/icons/AppStore.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6be26a5

Please sign in to comment.