OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#46150] fix timing issues in feature specs
Eric Schubert145c24a8a25d
diff --git a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.html b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.htmlindex 4d6faf057e1..a1cc5b991c9 100644--- a/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.html+++ b/frontend/src/app/features/enterprise/enterprise-active-trial/ee-active-trial.component.html@@ -7,8 +7,11 @@<span [textContent]="subscriber"></span></div></div>- <div class="attributes-key-value--key" [textContent]="text.label_email"> </div>- <div class="attributes-key-value--value-container">+ <div class="attributes-key-value--key" [textContent]="text.label_email"></div>+ <div+ class="attributes-key-value--value-container"+ data-qa-selector="ee-active-trial-email"+ ><div class="attributes-key-value--value -text"><span [textContent]="email"></span></div>@@ -20,18 +23,22 @@</div></div><div *ngIf="domain" class="attributes-key-value--key" [textContent]="text.label_domain"></div>- <div *ngIf="domain" class="attributes-key-value--value-container">+ <div+ *ngIf="domain"+ class="attributes-key-value--value-container"+ data-qa-selector="ee-active-trial-domain"+ ><div class="attributes-key-value--value -text"><span [textContent]="domain"></span></div></div>- <div *ngIf="userCount" class="attributes-key-value--key" [textContent]="text.label_maximum_users"> </div>+ <div *ngIf="userCount" class="attributes-key-value--key" [textContent]="text.label_maximum_users"></div><div *ngIf="userCount" class="attributes-key-value--value-container"><div class="attributes-key-value--value -text"><span [textContent]="userCount"></span></div></div>- <div *ngIf="startsAt" class="attributes-key-value--key" [textContent]="text.label_starts_at"> </div>+ <div *ngIf="startsAt" class="attributes-key-value--key" [textContent]="text.label_starts_at"></div><div *ngIf="startsAt" class="attributes-key-value--value-container"><div class="attributes-key-value--value -text"><span [textContent]="startsAt"></span>@@ -47,4 +54,4 @@</div></div></div>-</div>\ No newline at end of file+</div>diff --git a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb b/modules/budgets/spec/features/budgets/attachment_upload_spec.rbindex a93ea3d9eae..7dd24e0c96f 100644--- a/modules/budgets/spec/features/budgets/attachment_upload_spec.rb+++ b/modules/budgets/spec/features/budgets/attachment_upload_spec.rb@@ -101,6 +101,8 @@ describe 'Upload attachment to budget', js: true doclick_on "Update"end+ # Wait for page load+ expect(page).to have_selector('[data-qa-selector="op-attachments"]')script = <<~JSconst event = new DragEvent('dragenter');document.body.dispatchEvent(event);diff --git a/spec/features/admin/enterprise/token_domain_spec.rb b/spec/features/admin/enterprise/token_domain_spec.rbindex 54c40f3edd0..5eb80de97c0 100644--- a/spec/features/admin/enterprise/token_domain_spec.rb+++ b/spec/features/admin/enterprise/token_domain_spec.rb@@ -30,13 +30,13 @@ require 'spec_helper'describe 'Enterprise Edition token domain', js: true dolet(:current_user) { create(:admin) }- let(:ee_token) { File.read(Rails.root.join("spec/fixtures/ee_tokens/v2_1_user_localhost_3001.token")) }+ let(:ee_token) { Rails.root.join("spec/fixtures/ee_tokens/v2_1_user_localhost_3001.token").read }before doallow(User).to receive(:current).and_return current_userend- shared_context 'uploading a token' do+ shared_context 'when uploading a token' dobefore dovisit '/admin/enterprise'@@ -48,19 +48,19 @@ describe 'Enterprise Edition token domain', js: true dodescribe 'initial upload' docontext 'with correct domain', with_settings: { host_name: 'localhost:3001' } do- it_behaves_like 'uploading a token' do+ it_behaves_like 'when uploading a token' doit 'saves the token' doexpect(body).to have_text 'Successful update.'endit 'shows the token info' do- expect(body).to have_text '[email protected]'+ expect(page).to have_selector('[data-qa-selector="ee-active-trial-email"]', text: '[email protected]')endendendcontext 'with incorrect domain', with_settings: { host_name: 'localhost:3000' } do- it_behaves_like 'uploading a token' do+ it_behaves_like 'when uploading a token' doit "shows an invalid domain error" doexpect(body).to have_text "Domain is invalid."end@@ -75,7 +75,7 @@ describe 'Enterprise Edition token domain', js: true dovisit '/admin/enterprise'end- shared_context 'replacing a token' do+ shared_context 'when replacing a token' dolet(:new_token) { raise 'define me!' }before do@@ -88,12 +88,12 @@ describe 'Enterprise Edition token domain', js: true doendit 'shows the current token info' do- expect(body).to have_text '[email protected]'+ expect(page).to have_selector('[data-qa-selector="ee-active-trial-email"]', text: '[email protected]')enddescribe 'replacing the token' docontext 'with correct domain' do- it_behaves_like 'replacing a token' do+ it_behaves_like 'when replacing a token' dolet(:new_token) { ee_token }it 'updates the token' do@@ -103,15 +103,15 @@ describe 'Enterprise Edition token domain', js: true doendcontext 'with incorrect domain' do- it_behaves_like 'replacing a token' do- let(:new_token) { File.read(Rails.root.join("spec/fixtures/ee_tokens/v2_1_user_localhost_3000.token")) }+ it_behaves_like 'when replacing a token' do+ let(:new_token) { Rails.root.join("spec/fixtures/ee_tokens/v2_1_user_localhost_3000.token").read }it 'shows an invalid domain error' doexpect(body).to have_text 'Domain is invalid.'endit "shows the new token's info" do- expect(body).to have_text 'localhost:3000'+ expect(page).to have_selector('[data-qa-selector="ee-active-trial-domain"]', text: 'localhost:3000')endit "but doesn't save the new token" do