Add MozFest homepage and primary page to Percy test (#3951)

This commit is contained in:
Mavis Ou 2019-11-26 19:16:30 -08:00 коммит произвёл GitHub
Родитель abab375c78
Коммит 23d118915e
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 29 добавлений и 2 удалений

Просмотреть файл

@ -10,10 +10,12 @@ python:
addons:
postgresql: "9.6"
hosts:
- mozfest.localhost
env:
global:
- ALLOWED_HOSTS=localhost
- ALLOWED_HOSTS=localhost,mozfest.localhost
- CONTENT_TYPE_NO_SNIFF=True
- CORS_WHITELIST="*"
- DATABASE_URL=postgres://postgres@localhost:5432/network

Просмотреть файл

@ -1,4 +1,7 @@
{
"baseUrl": "http://localhost:8000",
"video": false
"video": false,
"env": {
"mozfest-baseurl": "http://mozfest.localhost:8000"
}
}

Просмотреть файл

@ -1,4 +1,5 @@
const FIXED_DATE = new Date(2019, 1, 1).getTime();
const MOZFEST_BASE_URL = Cypress.env("mozfest-baseurl");
describe(`Visual regression testing for foundation.mozilla.org`, () => {
beforeEach(function() {
@ -156,4 +157,24 @@ describe(`Visual regression testing for foundation.mozilla.org`, () => {
cy.wait(1000);
cy.percySnapshot();
});
// Pages specific to MozFest
it(`MozFest homepage`, function() {
cy.visit(`${MOZFEST_BASE_URL}`);
cy.window()
.its(`main-js:react:finished`)
.should(`equal`, true);
cy.wait(500);
cy.percySnapshot();
});
it(`MozFest primary page`, function() {
cy.visit(`${MOZFEST_BASE_URL}/spaces`);
cy.window()
.its(`main-js:react:finished`)
.should(`equal`, true);
cy.wait(500);
cy.percySnapshot();
});
});

Просмотреть файл

@ -23,6 +23,7 @@
<li><a href="/opportunity/multi-page/">Multi page opportunity</a></li>
<li><a href="/blog/initial-test-blog-post-with-fixed-title/">Blog post</a></li>
<li><a href="/privacynotincluded/">Privacy Not Included</a></li>
<li><a href="/mozilla-festival/">Mozilla Festival</a></li>
</ul>
</div>
</div>