Skip to content

E2E test: wait for pasted text to appear for snippet

Jay McCure requested to merge jmc-multi-snippet-slow into master

What does this MR do and why?

Resolves https://gitlab.com/gitlab-org/gitlab/-/issues/455965

The copy_snippet_file_contents_spec.rb:68 spec fails in the instance-image-slow-network job because clicking the copy contents button downloads and executes some js, which with a slow connection takes some time, which means the test presses Comment before the text is pasted.

In this MR we wait until the textarea has some text before proceeding.

How to set up and validate locally

Note: QA_SIMULATE_SLOW_CONNECTION is very slow. So alternatively you can set a breakpoint before !151642 (diffs) and then use Dev tools to set slow 3G connection, which has a similar effect.

QA_SIMULATE_SLOW_CONNECTION=true QA_LOG_LEVEL=DEBUG QA_GITLAB_URL=https://gdk.test:3443  GITLAB_QA_PASSWORD_1=x GITLAB_QA_PASSWORD_2=x bundle exec rspec qa/specs/features/browser_ui/3_create/snippet/copy_snippet_file_contents_spec.rb:68
Edited by Jay McCure

Merge request reports