Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): flaky smoke test fix #5569

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions smoke-test/tests/cypress/cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"viewportHeight": 960,
"viewportWidth": 1536,
"projectId": "hkrxk5",
"defaultCommandTimeout": 10000,
"retries": {
"runMode": 2,
"openMode": 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
describe('mutations', () => {
before(() => {
// warm up elastic by issuing a `*` search
cy.login();
cy.visit('http://localhost:9002/search?query=%2A');
cy.wait(5000);
});
Expand Down Expand Up @@ -118,7 +119,7 @@ describe('mutations', () => {
// verify dataset shows up in search now
cy.contains('of 1 result').click();
cy.contains('cypress_logging_events').click();
cy.contains('CypressTestAddTag2').within(() => cy.get('span[aria-label=close]').click());
cy.contains('CypressTestAddTag2').within(() => cy.get('span[aria-label=close]').trigger('mouseover', {force: true}).click());
cy.contains('Yes').click();

cy.contains('CypressTestAddTag2').should('not.exist');
Expand Down
6 changes: 4 additions & 2 deletions smoke-test/tests/cypress/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,12 @@ def test_run_cypress(frontend_session, wait_for_healthchecks):
record_key = os.getenv("CYPRESS_RECORD_KEY")
if record_key:
print('Running Cypress tests with recording')
command = f"NO_COLOR=1 npx cypress run --record"
command = "NO_COLOR=1 npx cypress run --record"
else:
print('Running Cypress tests without recording')
command = f"NO_COLOR=1 npx cypress run"
command = "NO_COLOR=1 npx cypress run"
# Add --headed --spec '**/mutations/mutations.js' (change spec name)
# in case you want to see the browser for debugging
proc = subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd="tests/cypress")
stdout = proc.stdout.read()
stderr = proc.stderr.read()
Expand Down