Welcome to mirror list, hosted at ThFree Co, Russian Federation.

delete_file_via_web_spec.rb « file « repository « 3_create « browser_ui « features « specs « qa « qa - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 76243066476f9de33f307497b05d0dcab3bed83c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# frozen_string_literal: true

module QA
  RSpec.describe 'Create' do
    describe 'File management', product_group: :source_code do
      let(:file) { Resource::File.fabricate_via_api! }

      commit_message_for_delete = 'QA Test - Delete file'

      before do
        Flow::Login.sign_in
        file.visit!
      end

      it 'user deletes a file via the Web', testcase: 'https://gitlab.com/gitlab-org/gitlab/-/quality/test_cases/347731' do
        Page::File::Show.perform do |file|
          file.click_delete
          file.add_commit_message(commit_message_for_delete)
          file.click_delete_file
        end

        Page::Project::Show.perform do |project|
          aggregate_failures 'file details' do
            expect(project).to have_notice('The file has been successfully deleted.')
            expect(project).to have_commit_message(commit_message_for_delete)
            expect(project).not_to have_file(file.name)
          end
        end
      end
    end
  end
end