Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
project_browser-3426094
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
project_browser-3426094
Commits
c2ca2d89
Commit
c2ca2d89
authored
10 months ago
by
Chris Wells
Browse files
Options
Downloads
Patches
Plain Diff
update tests to reflect new categories
parent
fbf6d47c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/FunctionalJavascript/ProjectBrowserUiTest.php
+22
-21
22 additions, 21 deletions
tests/src/FunctionalJavascript/ProjectBrowserUiTest.php
with
22 additions
and
21 deletions
tests/src/FunctionalJavascript/ProjectBrowserUiTest.php
+
22
−
21
View file @
c2ca2d89
...
...
@@ -147,8 +147,8 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
// Click 'Media' checkbox.
$this
->
clickWithWait
(
'#67'
);
// Click '
C
ommerce
/Advertising
' checkbox.
$this
->
clickWithWait
(
'#
55
'
);
// Click '
E-c
ommerce' checkbox.
$this
->
clickWithWait
(
'#
104
'
);
// Make sure the 'Media' module category filter is applied.
$this
->
assertEquals
(
'Media'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(2) .filter-applied__label'
));
...
...
@@ -167,7 +167,7 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
'Kangaroo'
,
'9 Starts With a Higher Number'
,
]);
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'2
3
Results'
));
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'2
0
Results'
));
}
/**
...
...
@@ -286,11 +286,11 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
// Click 'Media' checkbox.
$this
->
clickWithWait
(
'#67'
,
''
,
TRUE
);
// Click '
C
ommerce
/Advertising
' checkbox.
$this
->
clickWithWait
(
'#
55
'
,
''
,
TRUE
);
// Click '
E-c
ommerce' checkbox.
$this
->
clickWithWait
(
'#
104
'
,
''
,
TRUE
);
// Click 'E-commerce' checkbox.
$this
->
clickWithWait
(
'#104'
,
'
24 R
esults'
);
$this
->
clickWithWait
(
'#104'
,
'
18 r
esults'
);
$this
->
assertPagerItems
([
'1'
,
'2'
,
'Next'
,
'Last'
]);
$this
->
clickWithWait
(
'[aria-label="Next page"]'
);
...
...
@@ -611,31 +611,32 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
$assert_session
->
waitForElementVisible
(
'css'
,
'#developmentStatusactive'
);
$this
->
clickWithWait
(
'#developmentStatusactive'
);
// Select the Commerce/Advertising filter.
$this
->
clickWithWait
(
'#55'
,
''
,
TRUE
);
// Select the E-commerce filter.
$assert_session
->
waitForElementVisible
(
'css'
,
'#104'
);
$this
->
clickWithWait
(
'#104'
,
''
,
TRUE
);
// Select the Media filter.
$assert_session
->
waitForElementVisible
(
'css'
,
'#67'
);
$this
->
clickWithWait
(
'#67'
,
''
,
TRUE
);
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'1
6
Results'
));
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'1
5
Results'
));
$this
->
assertProjectsVisible
([
'Octopus'
,
'No Scrubs'
,
'Mad About You'
,
'Looper'
,
'Kangaroo'
,
'Jazz'
,
'Helvetica'
,
'Grapefruit'
,
'Fire'
,
'Eggman'
,
'Doomer'
,
'Dancing Queen'
,
'Cream cheese on a bagel'
,
'Become a Banana'
,
]);
$this
->
clickWithWait
(
'[aria-label="Next page"]'
);
$this
->
assertProjectsVisible
([
'Become a Banana'
,
'Astronaut Simulator'
,
'9 Starts With a Higher Number'
,
'1 Starts With a Number'
,
...
...
@@ -644,15 +645,14 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
// Should still be on second results page.
$this
->
svelteInitHelper
(
'css'
,
'#project-browser .pb-project'
);
$this
->
assertProjectsVisible
([
'Become a Banana'
,
'Astronaut Simulator'
,
'9 Starts With a Higher Number'
,
'1 Starts With a Number'
,
]);
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'1
6
Results'
));
$this
->
assertTrue
(
$assert_session
->
waitForText
(
'1
5
Results'
));
$this
->
assertEquals
(
'Active'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(1) .filter-applied__label'
));
$this
->
assertEquals
(
'
C
ommerce
/Advertising
'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(2) .filter-applied__label'
));
$this
->
assertEquals
(
'
E-c
ommerce'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(2) .filter-applied__label'
));
$this
->
assertEquals
(
'Media'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(3) .filter-applied__label'
));
$this
->
clickWithWait
(
'[aria-label="First page"]'
);
...
...
@@ -660,19 +660,19 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
'Octopus'
,
'No Scrubs'
,
'Mad About You'
,
'Looper'
,
'Kangaroo'
,
'Jazz'
,
'Helvetica'
,
'Grapefruit'
,
'Fire'
,
'Eggman'
,
'Doomer'
,
'Dancing Queen'
,
'Cream cheese on a bagel'
,
]);
'Become a Banana'
,
],
TRUE
);
$this
->
assertEquals
(
'Active'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(1) .filter-applied__label'
));
$this
->
assertEquals
(
'
C
ommerce
/Advertising
'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(2) .filter-applied__label'
));
$this
->
assertEquals
(
'
E-c
ommerce'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(2) .filter-applied__label'
));
$this
->
assertEquals
(
'Media'
,
$this
->
getElementText
(
'p.filter-applied:nth-child(3) .filter-applied__label'
));
}
...
...
@@ -889,8 +889,9 @@ class ProjectBrowserUiTest extends WebDriverTestBase {
$grid_text
=
$this
->
getElementText
(
'#project-browser .pb-layout__main ul li:nth-child(7) .pb-project-categories ul li:nth-child(1)'
);
$this
->
assertEquals
(
'E-commerce'
,
$grid_text
);
$assert_session
->
elementsCount
(
'css'
,
'#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li'
,
2
);
$grid_text
=
$this
->
getElementText
(
'#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li:nth-child(1)'
);
$this
->
assertEquals
(
'Commerce/Advertising'
,
$grid_text
);
$x
=
1
;
$grid_text
=
$this
->
getElementText
(
'#project-browser .pb-layout__main ul li:nth-child(7) .pb-project-categories ul li:nth-child(1)'
);
$this
->
assertEquals
(
'E-commerce'
,
$grid_text
);
$grid_text
=
$this
->
getElementText
(
'#project-browser .pb-layout__main ul li:nth-child(9) .pb-project-categories ul li:nth-child(2)'
);
$this
->
assertEquals
(
'E-commerce'
,
$grid_text
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment