Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hasura/graphql-engine-mono#1837 GitOrigin-RevId: e638ca4
- Loading branch information
1 parent
fa152d8
commit c0ea2b0
Showing
24 changed files
with
104 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
export const ADMIN_SECRET_HEADER_KEY = 'x-hasura-admin-secret'; | ||
|
||
// TODO cypress default timeout is 4000, we can remove this `AWAIT_SHORT` after verifying that this is followed by a test command that works with timeout | ||
// https://docs.cypress.io/guides/references/configuration#Timeouts | ||
export const AWAIT_SHORT = 2000; | ||
export const AWAIT_MODERATE = 5000; | ||
export const AWAIT_LONG = 7000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { getElementFromAlias } from '../../helpers/dataHelpers'; | ||
|
||
export const viewOnboarding = () => { | ||
// Click on create | ||
cy.get(getElementFromAlias('onboarding-popup')) | ||
.should('be.visible') | ||
.should('contain.text', `Hi there, let's get started with Hasura!`); | ||
// cy.get(getElementFromAlias('btn-hide-for-now')).click(); | ||
}; | ||
export const hideNow = () => { | ||
// Click on create | ||
cy.get(getElementFromAlias('btn-hide-for-now')).click(); | ||
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist'); | ||
}; | ||
|
||
export const dontShowAgain = () => { | ||
// Click on create | ||
cy.reload(); | ||
cy.get(getElementFromAlias('onboarding-popup')).should('be.visible'); | ||
|
||
cy.get(getElementFromAlias('btn-ob-dont-show-again')).click(); | ||
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist'); | ||
cy.reload(); | ||
cy.get(getElementFromAlias('onboarding-popup')).should('not.exist'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { | ||
viewOnboarding, | ||
hideNow, | ||
dontShowAgain, | ||
} from './spec'; | ||
import { testMode } from '../../helpers/common'; | ||
import { setMetaData } from '../validators/validators'; | ||
import { getIndexRoute } from '../../helpers/dataHelpers'; | ||
|
||
const setup = () => { | ||
describe('Setup route', () => { | ||
it('Visit the index route', () => { | ||
cy.visit(getIndexRoute()); | ||
setMetaData(); | ||
}); | ||
}); | ||
}; | ||
|
||
export const runActionsTests = () => { | ||
describe('onboarding', () => { | ||
it('should show onboarding guide', viewOnboarding); | ||
it('should hide when user click on Hide Now', hideNow); | ||
it('should hide forever when user click on Dont Show again', dontShowAgain); | ||
}); | ||
}; | ||
|
||
if (testMode !== 'cli') { | ||
setup(); | ||
runActionsTests(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.