* Set up tsconfigs - Required if we're going to have several different Cypress suites (one for each plugin/product essentially) in order for global cy.() commands and it()/describe() to register as expected @see https://docs.cypress.io/guides/tooling/typescript-support#Clashing-types-with-Jest * Set up shared commands and routes NOTE: Unlike ent-search, shared/ will *not* have its own set of tests - rather, shared/cypress is a resource/set of helpers for other test suites to extend/import/etc. * Create basic Enterprise Search Overview E2E tests - For happy path testing, we _likely_ shouldn't need more than these tests going forward - If we ever want to add an error connecting test however, this is likely where it should go (or alternatively, use Kibana's FTR with Enterprise Search host set but not spun up) * Set up App Search Cypress test scaffolding - placeholder/hello world test only * Set up Workplace Search Cypress test scaffolding - placeholder/hello world test only * Add helper script and update README * Add config setup & documentation for potentially running Cypress against Kibana functional server * PR feedback: Fix typescript project names Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
18 lines
732 B
Bash
18 lines
732 B
Bash
#! /bin/bash
|
|
|
|
# Use either `cypress run` or `cypress open` - defaults to run
|
|
MODE="${1:-run}"
|
|
|
|
# Choose which product folder to use, e.g. `yarn cypress open as`
|
|
PRODUCT="${2}"
|
|
# Provide helpful shorthands
|
|
if [ "$PRODUCT" == "as" ]; then PRODUCT='app_search'; fi
|
|
if [ "$PRODUCT" == "ws" ]; then PRODUCT='workplace_search'; fi
|
|
if [ "$PRODUCT" == "overview" ]; then PRODUCT='enterprise_search'; fi
|
|
|
|
# Pass all remaining arguments (e.g., ...rest) from the 3rd arg onwards
|
|
# as an open-ended string. Appends onto to the end the Cypress command
|
|
# @see https://docs.cypress.io/guides/guides/command-line.html#Options
|
|
ARGS="${*:3}"
|
|
|
|
../../../node_modules/.bin/cypress "$MODE" --project "public/applications/$PRODUCT" --browser chrome $ARGS
|