Commit 0360ba1e authored by Mark Lapierre's avatar Mark Lapierre

Merge branch 'qa-fix-flaky-group-iteration-spec' into 'master'

Fix flaky group iteration e2e spec

See merge request gitlab-org/gitlab!73787
parents c1c859e2 58eac855
......@@ -6,11 +6,9 @@ module QA
class GroupCadence < QA::Resource::Base
include Support::Dates
attr_accessor :title, :group
attribute :group do
QA::Resource::Group.fabricate_via_api! do |group|
group.path = "group-to-test-iterations-#{SecureRandom.hex(8)}"
group.path = "group-to-test-iteration-cadences-#{SecureRandom.hex(8)}"
end
end
......
......@@ -11,22 +11,22 @@ module QA
let(:due_date) { next_month_yyyy_mm_dd }
let(:description) { "This is a group test iteration." }
let(:group) do
let!(:iteration_group) do
QA::Resource::Group.fabricate_via_api! do |group|
group.path = "group-to-test-iterations-cadences-#{SecureRandom.hex(8)}"
group.path = "group-to-test-creating-iteration-cadences-#{SecureRandom.hex(8)}"
end
end
before do
Runtime::Feature.enable(:iteration_cadences, group: group)
Runtime::Feature.enable(:iteration_cadences, group: iteration_group)
Flow::Login.sign_in
end
it 'creates a group iteration', testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/1623' do
# TODO: Remove this retry when the `Runtime::Feature.enable` method call is removed
Support::Retrier.retry_on_exception(max_attempts: 5) do
group.visit!
Support::Retrier.retry_until(max_duration: 60, retry_on_exception: true, sleep_interval: 5) do
iteration_group.visit!
QA::Page::Group::Menu.perform(&:go_to_group_iterations)
QA::EE::Page::Group::Iteration::Cadence::Index.perform do |cadence|
cadence.find_element(:create_new_cadence_button)
......@@ -38,7 +38,7 @@ module QA
iteration.description = description
iteration.due_date = due_date
iteration.start_date = start_date
iteration.group = group
iteration.group = iteration_group
end
EE::Page::Group::Iteration::Show.perform do |iteration|
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment