first commit

This commit is contained in:
Akhil Gupta
2021-05-29 15:20:50 +05:30
commit d25c30a7b2
194 changed files with 49873 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
// Create custom Cypress commands and overwrite existing ones.
// https://on.cypress.io/custom-commands
import { getStore } from './utils'
Cypress.Commands.add(
'logIn',
({ username = 'admin', password = 'password' } = {}) => {
// Manually log the user in
cy.location('pathname').then((pathname) => {
if (pathname === 'blank') {
cy.visit('/')
}
})
getStore().then((store) =>
store.dispatch('auth/logIn', { username, password })
)
}
)

View File

@@ -0,0 +1,17 @@
// ***********************************************************
// This example support/index.js is processed and
// loaded automatically before your test files.
//
// This is a great place to put global configuration and
// behavior that modifies Cypress.
//
// You can change the location of this file or turn off
// automatically serving support files with the
// 'supportFile' configuration option.
//
// You can read more here:
// https://on.cypress.io/configuration
// ***********************************************************
// Import commands.js using ES2015 syntax:
import './commands'

View File

@@ -0,0 +1,2 @@
// Returns the Vuex store.
export const getStore = () => cy.window().its('__app__.$store')