-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
983 additions
and
64 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
describe('On Boarding Flow Tests', () => { | ||
|
||
beforeEach(() => { | ||
cy.visit('/') | ||
}); | ||
|
||
it('Source page redirects correctly', () => { | ||
cy.url().should('eq', `${Cypress.config('baseUrl')}/choose-sources`); | ||
}) | ||
|
||
it('Run on the onboarding flow', () => { | ||
// Select All Apps | ||
cy.get('[data-cy="choose-source-coupon"]').should('exist').click() | ||
cy.get('[data-cy="choose-source-frontend"]').should('exist').click() | ||
cy.get('[data-cy="choose-source-inventory"]').should('exist').click() | ||
cy.get('[data-cy="choose-source-membership"]').should('exist').click() | ||
cy.get('[data-cy="choose-source-pricing"]').should('exist').click() | ||
|
||
// Click Next Page | ||
cy.get('[data-cy="choose-source-next-click"]').should('exist').click() | ||
|
||
// Select Tempo | ||
cy.url().should('eq', `${Cypress.config('baseUrl')}/choose-destination`); | ||
cy.get('[data-cy="choose-destination-Tempo"]').should('exist').click() | ||
|
||
// Fill Destination Form | ||
cy.url().should('eq', `${Cypress.config('baseUrl')}/connect-destination?type=tempo`); | ||
cy.get('[data-cy=create-destination-input-name]').type('e2e-tests'); | ||
cy.get('[data-cy=create-destination-input-TEMPO_URL]').type('e2e-tests-tempo.traces:4317'); | ||
cy.get('[data-cy="create-destination-create-click"]').should('exist').click() | ||
|
||
cy.url().should('contain', `${Cypress.config('baseUrl')}/overview`); | ||
|
||
}); | ||
} | ||
); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,17 @@ | ||
/// <reference types="cypress" /> | ||
// *********************************************** | ||
// This example commands.ts shows you how to | ||
// create various custom commands and overwrite | ||
// existing commands. | ||
// | ||
// For more comprehensive examples of custom | ||
// commands please read more here: | ||
// https://on.cypress.io/custom-commands | ||
// *********************************************** | ||
// | ||
// | ||
// -- This is a parent command -- | ||
// Cypress.Commands.add('login', (email, password) => { ... }) | ||
// | ||
// | ||
// -- This is a child command -- | ||
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This is a dual command -- | ||
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... }) | ||
// | ||
// | ||
// -- This will overwrite an existing command -- | ||
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... }) | ||
// | ||
// declare global { | ||
// namespace Cypress { | ||
// interface Chainable { | ||
// login(email: string, password: string): Chainable<void> | ||
// drag(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// dismiss(subject: string, options?: Partial<TypeOptions>): Chainable<Element> | ||
// visit(originalFn: CommandOriginalFn, url: string, options: Partial<VisitOptions>): Chainable<Element> | ||
// } | ||
// } | ||
// } | ||
export {}; | ||
|
||
declare global { | ||
namespace Cypress { | ||
interface Chainable<Subject = any> { | ||
assertDemoAppsExistOverviewPage(): Chainable<any>; | ||
} | ||
} | ||
} | ||
|
||
Cypress.Commands.add('assertDemoAppsExistOverviewPage', () => { | ||
cy.get('[data-id="namespace-0"]').should('have.text', 'defaultcoupon') | ||
cy.get('[data-id="namespace-1"]').should('have.text', 'defaultfrontend') | ||
cy.get('[data-id="namespace-2"]').should('have.text', 'defaultinventory') | ||
cy.get('[data-id="namespace-3"]').should('have.text', 'defaultmembership') | ||
cy.get('[data-id="namespace-4"]').should('have.text', 'defaultpricing') | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/bash | ||
|
||
files=( | ||
"assert-runtime-detected.yaml" | ||
"assert-instrumented-and-pipeline.yaml" | ||
) | ||
|
||
for file in "${files[@]}"; do | ||
echo "Asserting $file..." | ||
# Your logic to assert the YAML file | ||
# For example, use yamllint or a custom validation | ||
yamllint "$file" || exit 1 | ||
done | ||
|
||
echo "All YAML files passed assertions." |
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,19 +1,27 @@ | ||
#!/bin/bash | ||
|
||
run_cypress_test() { | ||
local spec=$1 | ||
npx cypress run --spec "$spec" | ||
local status=$? | ||
|
||
if [ $status -ne 0 ]; then | ||
echo "Cypress tests failed" | ||
# Stop the background process | ||
kill "$(cat odigos-ui.pid)" | ||
rm odigos-ui.pid | ||
rm ../../odigos-ui.log | ||
exit $status | ||
fi | ||
} | ||
|
||
echo "Running Cypress tests" | ||
cd ../../../frontend/webapp || exit | ||
npx cypress run --spec "cypress/e2e/test-overview.cy.ts" | ||
|
||
status_cypress=$? | ||
if [ $status_cypress -ne 0 ]; then | ||
echo "Cypress tests failed" | ||
if [ "$1" = "include-onboarding-flow" ]; then | ||
run_cypress_test "cypress/e2e/onboarding-flow.cy.ts" | ||
fi | ||
|
||
# Stop the background process | ||
kill "$(cat odigos-ui.pid)" | ||
rm odigos-ui.pid | ||
rm ../../odigos-ui.log | ||
run_cypress_test "cypress/e2e/test-overview.cy.ts" | ||
|
||
exit $status_cypress | ||
else | ||
echo "Cypress tests passed" | ||
fi | ||
echo "Cypress tests passed" |
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.