Skip to content

Commit

Permalink
Fix user management tests
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jul 17, 2018
1 parent 2233328 commit 3e73735
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions tests/ui-regression/test/installSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('install', function () {
config.resolutions.forEach(function (resolution) {
it('show-page.' + resolution.title, async function () {
// (test, route, prepare, action, options
return helper.takeAndCompare(this, '/index.php', async (page) => {
return helper.takeAndCompare(this, 'index.php', async (page) => {
await helper.delay(100);
await page.$eval('body', function (e) {
$('#adminlogin').blur();
Expand Down Expand Up @@ -61,7 +61,7 @@ describe('install', function () {
helper.pageBase.setDefaultNavigationTimeout(5*60*1000);
helper.pageCompare.setDefaultNavigationTimeout(5*60*1000);
// just run for one resolution since we can only install once
return helper.takeAndCompare(this, '/index.php', async function (page) {
return helper.takeAndCompare(this, 'index.php', async function (page) {
const login = await page.type('#adminlogin', 'admin');
const password = await page.type('#adminpass', 'admin');
const inputElement = await page.$('input[type=submit]');
Expand Down
8 changes: 4 additions & 4 deletions tests/ui-regression/test/publicSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('public', function () {
*/
config.resolutions.forEach(function (resolution) {
it('file-share-invalid.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/s/invalid', async function () {
return helper.takeAndCompare(this, 'index.php/s/invalid', async function () {
}, {waitUntil: 'networkidle2', viewport: resolution});
});
});
Expand All @@ -48,7 +48,7 @@ describe('public', function () {

var shareLink = {};
it('file-share-link', async function () {
return helper.takeAndCompare(this, '/index.php/apps/files', async function (page) {
return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
const element = await page.$('[data-file="welcome.txt"] .action-share');
await element.click('[data-file="welcome.txt"] .action-share');
await page.waitForSelector('input.linkCheckbox');
Expand All @@ -71,7 +71,7 @@ describe('public', function () {

config.resolutions.forEach(function (resolution) {
it('file-share-valid.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/apps/files', async function (page) {
return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
await page.goto(shareLink[page.url()]);
await helper.delay(500);
}, {waitUntil: 'networkidle2', viewport: resolution});
Expand All @@ -89,7 +89,7 @@ describe('public', function () {
});

it('file-unshare', async function () {
return helper.takeAndCompare(this, '/index.php/apps/files', async function (page) {
return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
const element = await page.$('[data-file="welcome.txt"] .action-share');
await element.click('[data-file="welcome.txt"] .action-share');
await page.waitForSelector('input.linkCheckbox');
Expand Down
8 changes: 4 additions & 4 deletions tests/ui-regression/test/settingsSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ describe('settings', function () {

config.resolutions.forEach(function (resolution) {
it('personal.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/settings/user', async function (page) {
return helper.takeAndCompare(this, 'index.php/settings/user', async function (page) {
}, {viewport: resolution});
});

it('admin.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/settings/admin', async function (page) {
return helper.takeAndCompare(this, 'index.php/settings/admin', async function (page) {
}, {viewport: resolution});
});

['sharing', 'security', 'theming', 'encryption', 'additional', 'tips-tricks'].forEach(function(endpoint) {
it('admin.' + endpoint + '.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/settings/admin/' + endpoint, async function (page) {
return helper.takeAndCompare(this, 'index.php/settings/admin/' + endpoint, async function (page) {
}, {viewport: resolution, waitUntil: 'networkidle2'});
});
});

it('usermanagement.' + resolution.title, async function () {
return helper.takeAndCompare(this, '/index.php/settings/users', async function (page) {
return helper.takeAndCompare(this, 'index.php/settings/users', async function (page) {
}, {viewport: resolution});
});

Expand Down

0 comments on commit 3e73735

Please sign in to comment.