aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ui-regression/test
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-07-20 09:27:46 +0200
committerJulius Härtl <jus@bitgrid.net>2020-07-20 09:27:46 +0200
commit6f32b59b23489d27dbc433b85e2cb68bc69e25c8 (patch)
tree24dde0fe6c7b597608c4bd556ea946f74f70c141 /tests/ui-regression/test
parent5add0ff1e2a29b80c10772bbff6c5ad7c09e5abc (diff)
downloadnextcloud-server-6f32b59b23489d27dbc433b85e2cb68bc69e25c8.tar.gz
nextcloud-server-6f32b59b23489d27dbc433b85e2cb68bc69e25c8.zip
Remove outdated ui-regression tests
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests/ui-regression/test')
-rw-r--r--tests/ui-regression/test/appsSpec.js60
-rw-r--r--tests/ui-regression/test/filesSpec.js102
-rw-r--r--tests/ui-regression/test/installSpec.js76
-rw-r--r--tests/ui-regression/test/loginSpec.js81
-rw-r--r--tests/ui-regression/test/publicSpec.js102
-rw-r--r--tests/ui-regression/test/settingsSpec.js76
6 files changed, 0 insertions, 497 deletions
diff --git a/tests/ui-regression/test/appsSpec.js b/tests/ui-regression/test/appsSpec.js
deleted file mode 100644
index 3a23c1df773..00000000000
--- a/tests/ui-regression/test/appsSpec.js
+++ /dev/null
@@ -1,60 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('apps', function () {
-
- before(async () => {
- await helper.init(this)
- await helper.login(this)
- });
- after(async () => await helper.exit());
-
- config.resolutions.forEach(function (resolution) {
- it('apps.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/settings/apps', async function (page) {
- await page.waitForSelector('#apps-list .section', {timeout: 5000});
- await page.waitFor(500);
- }, {viewport: resolution, waitUntil: 'networkidle2'});
- });
-
- ['your-apps', 'enabled', 'disabled', 'app-bundles'].forEach(function(endpoint) {
- it('apps.' + endpoint + '.' + resolution.title, async function () {
- return helper.takeAndCompare(this, undefined, async function (page) {
- try {
- await page.waitForSelector('#app-navigation-toggle', {
- visible: true,
- timeout: 1000,
- }).then((element) => element.click())
- } catch (err) {}
- await helper.delay(500);
- await page.click('li#app-category-' + endpoint + ' a');
- await helper.delay(500);
- await page.waitForSelector('#app-content:not(.icon-loading)');
- }, {viewport: resolution});
- });
- });
- });
-
-});
diff --git a/tests/ui-regression/test/filesSpec.js b/tests/ui-regression/test/filesSpec.js
deleted file mode 100644
index 7a029b2f311..00000000000
--- a/tests/ui-regression/test/filesSpec.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const puppeteer = require('puppeteer');
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('files', function () {
-
- before(async () => {
- await helper.init(this)
- await helper.login(this)
- });
- after(async () => await helper.exit());
-
- config.resolutions.forEach(function (resolution) {
-
- it('file-sidebar-share.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
- let element = await page.$('[data-file="welcome.txt"] .action-share');
- await element.click('[data-file="welcome.txt"] .action-share');
- await page.waitForSelector('.shareWithField');
- await helper.delay(500);
- await page.$eval('body', e => { $('.shareWithField').blur() });
- }, {viewport: resolution});
- });
- it('file-popover.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
- await page.click('[data-file=\'welcome.txt\'] .action-menu');
- await page.waitForSelector('.fileActionsMenu');
- }, {viewport: resolution});
- });
- it('file-sidebar-details.' + resolution.title, async function() {
- return helper.takeAndCompare(this, undefined, async function (page) {
- await page.click('[data-file=\'welcome.txt\'] .fileActionsMenu [data-action=\'Details\']');
- await page.waitForSelector('[data-tabid=\'commentsTabView\']');
- await page.$eval('body', e => { $('.shareWithField').blur() });
- await helper.delay(500); // wait for animation
- }, {viewport: resolution});
- });
- it('file-sidebar-details-sharing.' + resolution.title, async function() {
- return helper.takeAndCompare(this, undefined, async function (page) {
- let tab = await helper.childOfClassByText(page, 'tabHeaders', 'Sharing');
- tab[0].click();
- await page.waitForSelector('input.shareWithField');
- await page.$eval('body', e => { $('.shareWithField').blur() });
- await helper.delay(500); // wait for animation
- }, {viewport: resolution});
- });
- it('file-sidebar-details-versions.' + resolution.title, async function() {
- return helper.takeAndCompare(this, undefined, async function (page) {
- let tab = await helper.childOfClassByText(page, 'tabHeaders', 'Versions');
- tab[0].click();
- await helper.delay(100); // wait for animation
- }, {viewport: resolution});
- });
- it('file-popover.favorite.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
- await page.click('[data-file=\'welcome.txt\'] .action-menu');
- await page.waitForSelector('.fileActionsMenu')
- await page.click('[data-file=\'welcome.txt\'] .fileActionsMenu [data-action=\'Favorite\']');;
- }, {viewport: resolution});
- });
-
- it('file-favorites.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/apps/files', async function (page) {
- try {
- await page.waitForSelector('#app-navigation-toggle', {
- visible: true,
- timeout: 1000,
- }).then((element) => element.click())
- } catch (err) {}
- await page.click('#app-navigation [data-id=\'favorites\'] a');
- await helper.delay(500); // wait for animation
- }, {viewport: resolution});
- });
-
-
- });
-
-
-
-});
diff --git a/tests/ui-regression/test/installSpec.js b/tests/ui-regression/test/installSpec.js
deleted file mode 100644
index ffb4854f1b6..00000000000
--- a/tests/ui-regression/test/installSpec.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('install', function () {
-
- before(async () => await helper.init(this));
- after(async () => await helper.exit());
-
- 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) => {
- await helper.delay(100);
- await page.$eval('body', function (e) {
- $('#adminlogin').blur();
- });
- await helper.delay(100);
- }, { waitUntil: 'networkidle0', viewport: resolution});
- });
-
- it('show-advanced.' + resolution.title, async function () {
- // (test, route, prepare, action, options
- return helper.takeAndCompare(this, undefined, async (page) => {
- await page.click('#showAdvanced');
- await helper.delay(300);
- }, { waitUntil: 'networkidle0', viewport: resolution});
- });
- it('show-advanced-mysql.' + resolution.title, async function () {
- // (test, route, prepare, action, options
- return helper.takeAndCompare(this, undefined, async (page) => {
- await page.click('label.mysql');
- await helper.delay(300);
- }, { waitUntil: 'networkidle0', viewport: resolution});
- });
- });
-
- it('runs', async function () {
- this.timeout(5*60*1000);
- 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) {
- const login = await page.type('#adminlogin', 'admin');
- const password = await page.type('#adminpass', 'admin');
- const inputElement = await page.$('input[type=submit]');
- await inputElement.click();
- await page.waitForNavigation({waitUntil: 'networkidle2'});
- await page.waitForSelector('#header');
- helper.pageBase.setDefaultNavigationTimeout(60000);
- helper.pageCompare.setDefaultNavigationTimeout(60000);
- }, { waitUntil: 'networkidle0', viewport: {w: 1920, h: 1080}});
- });
-
-});
diff --git a/tests/ui-regression/test/loginSpec.js b/tests/ui-regression/test/loginSpec.js
deleted file mode 100644
index 8607bbabc84..00000000000
--- a/tests/ui-regression/test/loginSpec.js
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('login', function () {
-
- before(async () => await helper.init(this));
- after(async () => await helper.exit());
-
- /**
- * Test login page rendering
- */
- config.resolutions.forEach(function (resolution) {
- it('login-page.' + resolution.title, async function () {
- return helper.takeAndCompare(this, '/', async (page) => {
- // make sure the cursor is not blinking in the login field
- await page.$eval('body', function (e) {
- $('#user').blur();
- });
- return await helper.delay(100);
- }, {viewport: resolution});
- });
-
- it('login-page.forgot.' + resolution.title, async function () {
- return helper.takeAndCompare(this, undefined, async (page) => {
- const lostPassword = await page.$('#lost-password');
- await lostPassword.click();
- await helper.delay(500);
- await page.$eval('body', function (e) {
- $('#user').blur();
- });
- }, {viewport: resolution});
- });
- });
-
- /**
- * Perform login
- */
- config.resolutions.forEach(function (resolution) {
- it('login-success.' + resolution.title, async function () {
- this.timeout(30000);
- await helper.resetBrowser();
- return helper.takeAndCompare(this, '/', async function (page) {
- await page.waitForSelector('input#user');
- await page.type('#user', 'admin');
- await page.type('#password', 'admin');
- const inputElement = await page.$('input[type=submit]');
- await inputElement.click();
- await page.waitForNavigation({waitUntil: 'networkidle2'});
- await page.waitForSelector('#header');
- await page.$eval('body', function (e) {
- // force relative timestamp to fixed value, since it breaks screenshot diffing
- $('.live-relative-timestamp').removeClass('live-relative-timestamp').text('5 minutes ago');
- });
- return await helper.delay(100);
- }, {viewport: resolution});
- })
- });
-
-});
diff --git a/tests/ui-regression/test/publicSpec.js b/tests/ui-regression/test/publicSpec.js
deleted file mode 100644
index 0893adf9a42..00000000000
--- a/tests/ui-regression/test/publicSpec.js
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const puppeteer = require('puppeteer');
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('public', function () {
-
- before(async () => {
- await helper.init(this)
- await helper.login(this)
- });
- after(async () => await helper.exit());
-
- /**
- * Test invalid file share rendering
- */
- config.resolutions.forEach(function (resolution) {
- it('file-share-invalid.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/s/invalid', async function () {
- }, {waitUntil: 'networkidle2', viewport: resolution});
- });
- });
-
- /**
- * Share a file via public link
- */
-
- var shareLink = {};
- it('file-share-link', async function () {
- 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');
- const linkCheckbox = await page.$('.linkShareView label');
- await Promise.all([
- linkCheckbox.click(),
- page.waitForSelector('.linkText')
- ]);
- await helper.delay(500);
- const text = await page.waitForSelector('.linkText');
- const link = await (await text.getProperty('value')).jsonValue();
- shareLink[page.url()] = link;
- return await helper.delay(500);
- }, {
- runOnly: true,
- waitUntil: 'networkidle2',
- viewport: {w: 1920, h: 1080}
- });
- });
-
- config.resolutions.forEach(function (resolution) {
- it('file-share-valid.' + resolution.title, async function () {
- 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});
- });
- it('file-share-valid-actions.' + resolution.title, async function () {
- return helper.takeAndCompare(this, undefined, async function (page) {
- const moreButton = await page.waitForSelector('#header-secondary-action');
- await moreButton.click();
- await page.evaluate((data) => {
- return document.querySelector('#directLink').value = 'http://nextcloud.example.com/';
- });
- await helper.delay(500);
- }, {waitUntil: 'networkidle2', viewport: resolution});
- });
- });
-
- it('file-unshare', async function () {
- 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');
- const linkCheckbox = await page.$('.linkShareView label');
- await linkCheckbox.click();
- await helper.delay(500);
- }, { waitUntil: 'networkidle2', viewport: {w: 1920, h:1080}});
- });
-
-});
diff --git a/tests/ui-regression/test/settingsSpec.js b/tests/ui-regression/test/settingsSpec.js
deleted file mode 100644
index 8b10b281fb6..00000000000
--- a/tests/ui-regression/test/settingsSpec.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @copyright 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @author 2018 Julius Härtl <jus@bitgrid.net>
- *
- * @license GNU AGPL version 3 or any later version
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as
- * published by the Free Software Foundation, either version 3 of the
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-const helper = require('../helper.js');
-const config = require('../config.js');
-
-describe('settings', function () {
-
- before(async () => {
- await helper.init(this)
- await helper.login(this)
- });
- after(async () => await helper.exit());
-
- config.resolutions.forEach(function (resolution) {
- it('personal.' + resolution.title, async function () {
- 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) {
- }, {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) {
- }, {viewport: resolution, waitUntil: 'networkidle2'});
- });
- });
-
- it('usermanagement.' + resolution.title, async function () {
- return helper.takeAndCompare(this, 'index.php/settings/users', async function (page) {
- }, {viewport: resolution});
- });
-
- it('usermanagement.add.' + resolution.title, async function () {
- return helper.takeAndCompare(this, undefined, async function (page) {
- try {
- await page.waitForSelector('#app-navigation-toggle', {
- visible: true,
- timeout: 1000,
- }).then((element) => element.click())
- } catch (err) {}
- let newUserButton = await page.waitForSelector('#new-user-button');
- await newUserButton.click();
- await helper.delay(200);
- await page.$eval('body', function (e) {
- $('#newusername').blur();
- })
- await helper.delay(100);
- }, {viewport: resolution});
- });
-
- });
-});