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

Add setting up an Instance via the UI instead of GraphQL #1458

Merged
merged 6 commits into from
Jun 19, 2024

Conversation

mszostok
Copy link
Contributor

@mszostok mszostok commented Jun 17, 2024

Description

Changes proposed in this pull request:

  • Add setting up an Instance via the UI instead of GraphQL

Testing

It requires a local UI version from https://github.com/kubeshop/botkube-cloud/pull/1137

  1. In my case, recreated local control-plane with mine own Slack instance.
  2. Make sure you have a trial subscribed and a placeholder instance created.
  3. Next, I exported following properties:
    export BOTKUBE_CLOUD_API_BASE_URL='http://localhost:8080'
    export BOTKUBE_CLOUD_UI_BASE_URL='http://localhost:3000'
    export BOTKUBE_CLOUD_EMAIL='your_user'
    export BOTKUBE_CLOUD_PASSWORD='your_pass'
    export BOTKUBE_CLOUD_TEAM_ORGANIZATION_ID='your_org_id'
    export DEBUG_MODE='true'
    
    export SLACK_WORKSPACE_NAME='your_workspace'
    export SLACK_EMAIL='your workspace email'
    export SLACK_PASSWORD='pass ' # by default pass is not set, see: https://slack.com/help/articles/201909068-Reset-your-password#h_01F256P7NEHPDZ7FT513SAZVBR
    
    export SLACK_TESTER_BOT_NAME='your tester app'
    export SLACK_TESTER_TESTER_BOT_TOKEN='tester slack app token'
    export SLACK_TESTER_CLOUD_TESTER_NAME='your cloud app'
    export BOTKUBE_CLI_BINARY_PATH="botkube" 
  4. Finally, executed test with:
    cd tests
    go test -tags=cloud_slack_dev_e2e -v -timeout 30m  -count 1 ./cloud-slack-dev-e2e/...

Related issue(s)

Fix https://github.com/kubeshop/botkube-cloud/issues/886

@mszostok mszostok added enhancement New feature or request test-framework labels Jun 17, 2024
@mszostok mszostok force-pushed the extend-ui-tests branch 2 times, most recently from e8c1706 to 87f164d Compare June 17, 2024 21:08
@mszostok mszostok marked this pull request as ready for review June 17, 2024 21:19
@mszostok mszostok requested review from PrasadG193 and a team as code owners June 17, 2024 21:19
@mszostok mszostok requested review from vaijab and pkosiec and removed request for vaijab June 17, 2024 21:19
@mszostok mszostok force-pushed the extend-ui-tests branch 14 times, most recently from b8317fc to 8e1af56 Compare June 18, 2024 14:16
Copy link
Member

@pkosiec pkosiec left a comment

Choose a reason for hiding this comment

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

This looks great! LGTM once it passes on CI 🚀

.github/actions/cloud-slack-e2e/action.yaml Outdated Show resolved Hide resolved
test/cloud-slack-dev-e2e/page_helpers_test.go Show resolved Hide resolved
@mszostok mszostok force-pushed the extend-ui-tests branch 6 times, most recently from c905661 to 0fa00e0 Compare June 18, 2024 17:17
@mszostok mszostok force-pushed the extend-ui-tests branch 11 times, most recently from 3f5ee91 to 08017f5 Compare June 18, 2024 21:49
@mszostok
Copy link
Contributor Author

I executed the workflow 3 times in a row, all passed: https://github.com/kubeshop/botkube/actions/runs/9572807087?pr=1458

@mszostok
Copy link
Contributor Author

I had to skip the plugin update flow because it was too flaky.

  1. The screenshot shows that the button is there and enabled.

  2. However, the assertion can't pass, with logs like:

    === NAME  TestCloudSlackE2E/Creating_Botkube_Instance_with_newly_added_Slack_Workspace
        botkube_page_helpers_test.go:215: Submitting changes
    [rod] 2024/06/18 20:33:12 [wait] stable <page:AE0EEF2A>
    [rod] 2024/06/18 20:33:12 [query] rod.elementR("button","/Deploy changes/i")  <page:AE0EEF2A>
    [rod] 2024/06/18 20:33:12 [wait] interactable <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:12 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [wait] visible <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:13 [wait] stable RAF <button.ant-btn.css-153za3i.ant-btn-primary>
    [rod] 2024/06/18 20:33:14 [input] scroll into view <button.ant-btn.css-153za3i.ant-btn-primary>
    

Notes:

  • They are deterministic locally. During development, I got a 100% pass rate.
  • In headless mode, it becomes flaky in CI.
  • I think that the go-rod engine itself is not very reliable, and it doesn't work well with our UI.
  • Maybe the Playwright assertion engine is more stable. It’s something worth testing when we revisit it.

@mszostok mszostok merged commit 6b4e1b0 into main Jun 19, 2024
20 checks passed
@mszostok mszostok deleted the extend-ui-tests branch June 19, 2024 07:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request test-framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants