Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
MetaGer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open-source
MetaGer
Commits
e8a824d9
Commit
e8a824d9
authored
2 years ago
by
Dominik Hebeler
Browse files
Options
Downloads
Patches
Plain Diff
fixed legal information test
parent
278e6c65
No related branches found
Branches containing commit
No related tags found
2 merge requests
!2010
Development
,
!2001
Resolve "Improve Localization"
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
metager/tests/Browser/Pages/Impress.php
+11
-12
11 additions, 12 deletions
metager/tests/Browser/Pages/Impress.php
metager/tests/Browser/StaticPagesTest.php
+2
-2
2 additions, 2 deletions
metager/tests/Browser/StaticPagesTest.php
with
13 additions
and
14 deletions
metager/tests/Browser/Pages/Impress.php
+
11
−
12
View file @
e8a824d9
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
namespace
Tests\Browser\Pages
;
namespace
Tests\Browser\Pages
;
use
Laravel\Dusk\Browser
;
use
Laravel\Dusk\Browser
;
use
Laravel\Dusk\Page
;
use
LaravelLocalization
;
class
Impress
extends
Page
class
Impress
extends
Page
{
{
...
@@ -11,9 +13,9 @@ class Impress extends Page
...
@@ -11,9 +13,9 @@ class Impress extends Page
*
*
* @return string
* @return string
*/
*/
public
function
url
()
public
function
url
(
$locale
=
null
)
{
{
return
'
/impressum
'
;
return
LaravelLocalization
::
getLocalizedUrl
(
$locale
,
"
/impressum
"
)
;
}
}
/**
/**
...
@@ -24,17 +26,14 @@ class Impress extends Page
...
@@ -24,17 +26,14 @@ class Impress extends Page
*/
*/
public
function
assert
(
Browser
$browser
)
public
function
assert
(
Browser
$browser
)
{
{
$browser
->
assertPathIs
(
$this
->
url
())
foreach
(
LaravelLocalization
::
getSupportedLocales
()
as
$locale
=>
$locale_data
)
{
->
waitForText
(
"Haftungshinweis:"
)
$url
=
$this
->
url
(
$locale
);
->
assertTitle
(
"Impressum - MetaGer"
)
$lang
=
\preg_replace
(
"/^([a-zA-Z]+)-.*/"
,
"$1"
,
$locale
);
->
switchLanguage
(
"English"
)
->
waitForText
(
"Liability Note:"
)
->
assertTitle
(
"Site Notice - MetaGer"
)
->
switchLanguage
(
"Español"
)
->
waitForText
(
"Exención de responsabilidad"
)
->
assertTitle
(
"Aviso legal - MetaGer"
)
->
switchLanguage
(
"Deutsch"
);
$browser
->
visit
(
$url
)
->
waitForText
(
trans
(
"impressum.info.9"
,
[],
$lang
))
->
assertTitle
(
trans
(
"titles.impressum"
,
[],
$lang
));
}
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
metager/tests/Browser/StaticPagesTest.php
+
2
−
2
View file @
e8a824d9
...
@@ -78,7 +78,7 @@ class StaticPagesTest extends DuskTestCase
...
@@ -78,7 +78,7 @@ class StaticPagesTest extends DuskTestCase
->
on
(
new
Hilfe
);
->
on
(
new
Hilfe
);
});
});
}
}
/*
public
function
testImpressum
()
public
function
testImpressum
()
{
{
// Impressum
// Impressum
...
@@ -92,7 +92,7 @@ class StaticPagesTest extends DuskTestCase
...
@@ -92,7 +92,7 @@ class StaticPagesTest extends DuskTestCase
->
on
(
new
Impress
);
->
on
(
new
Impress
);
});
});
}
}
/*
public function testKontakt()
public function testKontakt()
{
{
// Kontakt
// Kontakt
...
...
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