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