Commit aab8e1fb authored by Tomislav Nikic's avatar Tomislav Nikic

Fixing the test

For some reason the page object was not checking corretly for the text.
It checked for literal text instead of the multi selector text.
parent cb95c2f7
......@@ -100,6 +100,7 @@ export default {
variant="default"
icon="file-tree"
class="gl-mr-3 js-toggle-tree-list btn-icon"
data-qa-selector="file_tree_button"
:title="toggleFileBrowserTitle"
:aria-label="toggleFileBrowserTitle"
:selected="showTreeList"
......
......@@ -62,7 +62,7 @@ export default {
</script>
<template>
<div class="tree-list-holder d-flex flex-column">
<div class="tree-list-holder d-flex flex-column" data-qa-selector="file_tree_container">
<div class="gl-mb-3 position-relative tree-list-search d-flex">
<div class="flex-fill d-flex">
<gl-icon name="search" class="position-absolute tree-list-icon" />
......
......@@ -25,6 +25,11 @@ module QA
view 'app/assets/javascripts/diffs/components/compare_versions.vue' do
element :target_version_dropdown
element :file_tree_button
end
view 'app/assets/javascripts/diffs/components/tree_list.vue' do
element :file_tree_container
end
view 'app/assets/javascripts/diffs/components/diff_file_header.vue' do
......@@ -186,11 +191,17 @@ module QA
end
def has_file?(file_name)
has_element?(:file_name_content, text: file_name)
open_file_tree
has_element?(:file_name_content, file_name: file_name)
end
def has_no_file?(file_name)
has_no_element?(:file_name_content, text: file_name)
open_file_tree
has_no_element?(:file_name_content, file_name: file_name)
end
def open_file_tree
click_element(:file_tree_button) unless has_element?(:file_tree_container)
end
def has_merge_button?
......
# frozen_string_literal: true
module QA
RSpec.describe 'Create', quarantine: {
only: { job: 'large-setup' },
issue: 'https://gitlab.com/gitlab-org/gitlab/-/issues/338324',
type: :stale
} do
RSpec.describe 'Create' do
describe 'Merged merge request' do
let(:project) do
Resource::Project.fabricate_via_api! do |project|
......
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