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

Bug 1872469: Port login tests from protractor to Cypress #6521

Merged

Conversation

dtaylor113
Copy link
Contributor

@dtaylor113 dtaylor113 commented Sep 3, 2020

This PR removes most login tests from protractor and adds them to Cypress.

@openshift-ci-robot openshift-ci-robot added the bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. label Sep 3, 2020
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: This pull request references Bugzilla bug 1872469, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

[WIP] Bug 1872469: Port login tests from protractor to Cypress

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. component/core Related to console core functionality labels Sep 3, 2020
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spadgett
Copy link
Member

spadgett commented Sep 3, 2020

Hey, Dave. I'm glad we're porting these to Cypress, but we also want to make sure there isn't a real bug in logout that is causing the Protractor tests to fail.

@spadgett
Copy link
Member

spadgett commented Sep 3, 2020

Maybe we'll be able to reproduce with the Cypress tests and get a video to help debug.

@dtaylor113
Copy link
Contributor Author

Maybe we'll be able to reproduce with the Cypress tests and get a video to help debug.

yes, this PR is just another option and debugging tool, which is why it's a WIP :-)
Wanted to do something to progress https://bugzilla.redhat.com/show_bug.cgi?id=1872469

@dtaylor113 dtaylor113 force-pushed the move-login-tests-to-cypress branch 2 times, most recently from f3a96d4 to 2c45f76 Compare September 8, 2020 20:32
@dtaylor113
Copy link
Contributor Author

Just verified protractor's login tests as well as these new Cypress login tests worked multiple times when run locally.

@openshift-ci-robot
Copy link
Contributor

@dtaylor113: This pull request references Bugzilla bug 1872469, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

[WIP] Bug 1872469: Port login tests from protractor to Cypress

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@dtaylor113
Copy link
Contributor Author

dtaylor113 commented Sep 9, 2020

We need to update test-prow.sh to run the Cypress login spec when login is passed as a parameter.

@spadgett Added to bottom of test-prow-e2e.sh:

if [ $# -eq 1 ] && ["$1" == "login" ]; then
  ./test-cypress.sh 'tests/app/auth-multiuser-login.spec.ts'
fi

..and updated test-cypress.sh to run --spec for any passed in arg.

@openshift openshift deleted a comment from openshift-ci-robot Sep 9, 2020
@dtaylor113 dtaylor113 force-pushed the move-login-tests-to-cypress branch 2 times, most recently from 54835de to 141e118 Compare September 10, 2020 14:05
@openshift openshift deleted a comment from openshift-ci-robot Sep 10, 2020
test-prow-e2e.sh Outdated Show resolved Hide resolved
@dtaylor113 dtaylor113 changed the title [WIP] Bug 1872469: Port login tests from protractor to Cypress Bug 1872469: Port login tests from protractor to Cypress Sep 10, 2020
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Sep 10, 2020
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: This pull request references Bugzilla bug 1872469, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1872469: Port login tests from protractor to Cypress

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @dtaylor113. Let's pull the unrelated changes into a separate PR. I don't want to block an important test fix from code comments on the other changes.

frontend/packages/integration-tests-cypress/cypress.json Outdated Show resolved Hide resolved
config.env.BRIDGE_KUBEADMIN_PASSWORD = process.env.BRIDGE_KUBEADMIN_PASSWORD;
config.env.appHost = `${process.env.BRIDGE_BASE_ADDRESS || 'http://localhost:9000'}${(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like it's the same as baseUrl. Can we have one config value tracking?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wow, talk about cut & paste blinders :-) sorry, removed appHost.

@openshift-ci-robot
Copy link
Contributor

@dtaylor113: This pull request references Bugzilla bug 1872469, which is valid.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.6.0) matches configured target release for branch (4.6.0)
  • bug is in the state POST, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

Bug 1872469: Port login tests from protractor to Cypress

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

test-prow-e2e.sh Outdated
elif [ "$SCENARIO" == "login" ]; then
./test-cypress.sh 'tests/app/auth-multiuser-login.spec.ts'
else
./test-cypress.sh $SCENARIO
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong... We should not run any cypress tests for other scenarios. You can remove this last else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm..I can change, but protractor will run with an unknown scenario.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, updated

test-prow-e2e.sh Outdated
elif [ "$SCENARIO" == "login" ]; then
./test-cypress.sh 'tests/app/auth-multiuser-login.spec.ts'
else
echo "Cypress: unknown parameter: $1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't echo here. This is expected if you're running a protractor suite. Just remove the else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, removed

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks @dtaylor113 !

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Sep 11, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: dtaylor113, spadgett

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Sep 11, 2020
@dtaylor113
Copy link
Contributor Author

/retest

@openshift-merge-robot openshift-merge-robot merged commit 8e96822 into openshift:master Sep 12, 2020
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: All pull requests linked via external trackers have merged:

Bugzilla bug 1872469 has been moved to the MODIFIED state.

In response to this:

Bug 1872469: Port login tests from protractor to Cypress

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@spadgett spadgett added this to the v4.6 milestone Sep 15, 2020
@dtaylor113 dtaylor113 deleted the move-login-tests-to-cypress branch September 23, 2020 19:02
@dtaylor113 dtaylor113 restored the move-login-tests-to-cypress branch September 23, 2020 19:02
@dtaylor113 dtaylor113 deleted the move-login-tests-to-cypress branch November 25, 2020 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants