提交 92ac835a 编写于 作者: K Kamil Trzciński

Merge branch '43496-error-message-for-gke-clusters-persists-in-the-next-page' into 'master'

Resolve "Error message for GKE clusters persists in the next page"

Closes #43496

See merge request gitlab-org/gitlab-ce!17299
......@@ -40,9 +40,9 @@ class Projects::Clusters::GcpController < Projects::ApplicationController
def verify_billing
case google_project_billing_status
when nil
flash[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
flash.now[:alert] = _('We could not verify that one of your projects on GCP has billing enabled. Please try again.')
when false
flash[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" }
flash.now[:alert] = _('Please <a href=%{link_to_billing} target="_blank" rel="noopener noreferrer">enable billing for one of your projects to be able to create a Kubernetes cluster</a>, then try again.').html_safe % { link_to_billing: "https://console.cloud.google.com/freetrial?utm_campaign=2018_cpanel&utm_source=gitlab&utm_medium=referral" }
when true
return
end
......
---
title: Do not persist Google Project verification flash errors after a page reload
merge_request: 17299
author:
type: fixed
......@@ -161,7 +161,7 @@ describe Projects::Clusters::GcpController do
it 'renders the cluster form with an error' do
go
expect(response).to set_flash[:alert]
expect(response).to set_flash.now[:alert]
expect(response).to render_template('new')
end
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册