Skip to content

Commit

Permalink
Add a bit more screenshot description
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec committed Jun 24, 2024
1 parent 2ed95ee commit 9cc9963
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions test/cloud-slack-dev-e2e/botkube_page_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,22 +157,23 @@ func (p *BotkubeCloudPage) VerifyDeploymentStatus(t *testing.T, status string) {

func (p *BotkubeCloudPage) SetupSlackWorkspace(t *testing.T, channel string) {
t.Logf("Selecting newly connected %q Slack Workspace", p.cfg.Slack.WorkspaceName)

time.Sleep(3 * time.Second)
p.page.Screenshot("before-selecting-workspace")
p.page.MustElement(`input[type="search"]`).
MustInput(p.cfg.Slack.WorkspaceName).
MustType(input.Enter)
p.page.Screenshot()
p.page.Screenshot("after-selecting-workspace")

// filter by channel, to make sure that it's visible on the first table page, in order to select it in the next step
t.Log("Filtering by channel name")
p.page.Mouse.MustScroll(10, 5000) // scroll bottom, as the footer collides with selecting filter
p.page.Screenshot()
p.page.Screenshot("before-filtering-channel")
p.page.MustElement("table th:nth-child(3) span.ant-dropdown-trigger.ant-table-filter-trigger").MustClick()

t.Log("Selecting channel checkbox")
p.page.MustElement("input#name-channel").MustInput(channel).MustType(input.Enter)
p.page.MustElement(fmt.Sprintf(`input[type="checkbox"][name="%s"]`, channel)).MustClick()
p.page.Screenshot()
p.page.Screenshot("after-selecting-channel")
}

func (p *BotkubeCloudPage) FinishWizard(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion test/cloud-slack-dev-e2e/slack_page_helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
const (
slackBaseURL = "slack.com"
waitTime = 10 * time.Second
contextTimeout = 30 * time.Second
shorterContextTimeout = 10 * time.Second
)

Expand Down Expand Up @@ -86,6 +85,7 @@ func (p *SlackPage) ConnectWorkspace(t *testing.T, browser *rod.Browser) {
time.Sleep(waitTime)
p.page.Screenshot("before-workspace-connect")
p.page.MustElement("button#slack-workspace-connect").MustClick()
time.Sleep(1 * time.Second)
p.page.Screenshot("after-workspace-connect")
}

Expand Down

0 comments on commit 9cc9963

Please sign in to comment.