summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-07 21:18:28 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-07 21:18:28 +0000
commit2001877ccc364c9e0387d821beb7acffd5413a3c (patch)
tree6a3ff9580d55f01e9b9b1b2a9e8c66f90e2d2b31 /spec
parent6a7fcb14aaff70d8438167b652b365406b37613c (diff)
downloadgitlab-ce-2001877ccc364c9e0387d821beb7acffd5413a3c.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r--spec/controllers/projects/refs_controller_spec.rb9
-rw-r--r--spec/frontend/clusters_list/components/install_agent_modal_spec.js9
2 files changed, 14 insertions, 4 deletions
diff --git a/spec/controllers/projects/refs_controller_spec.rb b/spec/controllers/projects/refs_controller_spec.rb
index c9e70f1a3e3..56415663109 100644
--- a/spec/controllers/projects/refs_controller_spec.rb
+++ b/spec/controllers/projects/refs_controller_spec.rb
@@ -55,6 +55,15 @@ RSpec.describe Projects::RefsController do
end
end
+ context 'when offset has an invalid format' do
+ it 'renders JSON' do
+ xhr_get(:json, offset: { wrong: :format })
+
+ expect(response).to be_successful
+ expect(json_response).to be_kind_of(Array)
+ end
+ end
+
context 'when json is requested' do
it 'renders JSON' do
expect(::Gitlab::GitalyClient).to receive(:allow_ref_name_caching).and_call_original
diff --git a/spec/frontend/clusters_list/components/install_agent_modal_spec.js b/spec/frontend/clusters_list/components/install_agent_modal_spec.js
index daf21579ea7..3530c978370 100644
--- a/spec/frontend/clusters_list/components/install_agent_modal_spec.js
+++ b/spec/frontend/clusters_list/components/install_agent_modal_spec.js
@@ -309,12 +309,13 @@ describe('InstallAgentModal', () => {
describe('when KAS is disabled', () => {
const i18n = I18N_AGENT_MODAL.empty_state;
- beforeEach(() => {
+ beforeEach(async () => {
apolloProvider = createMockApollo([
[getAgentConfigurations, jest.fn().mockResolvedValue(kasDisabledErrorResponse)],
]);
- return mockSelectedAgentResponse();
+ createWrapper();
+ await waitForPromises();
});
it('renders empty state image', () => {
@@ -328,8 +329,8 @@ describe('InstallAgentModal', () => {
});
it('renders a cancel button', () => {
- expect(findActionButton().isVisible()).toBe(true);
- expect(findActionButton().text()).toBe(i18n.done);
+ expect(findCancelButton().isVisible()).toBe(true);
+ expect(findCancelButton().text()).toBe(i18n.done);
});
it("doesn't render a secondary button", () => {