diff --git a/frontend/tests/acceptance/albums.js b/frontend/tests/acceptance/albums.js index de47b91a1..3067bbe23 100644 --- a/frontend/tests/acceptance/albums.js +++ b/frontend/tests/acceptance/albums.js @@ -1,9 +1,8 @@ //search + filters? - -//clipboard? - //views ? +//clipboard yes! + //create + delete album //Add description to album (Update) diff --git a/frontend/tests/acceptance/files.js b/frontend/tests/acceptance/files.js index 70f18cdd6..57fb633b5 100644 --- a/frontend/tests/acceptance/files.js +++ b/frontend/tests/acceptance/files.js @@ -2,4 +2,4 @@ //download files -//clipboard \ No newline at end of file +//clipboard yes \ No newline at end of file diff --git a/frontend/tests/acceptance/labels.js b/frontend/tests/acceptance/labels.js index ebaeeeb73..348d47b25 100644 --- a/frontend/tests/acceptance/labels.js +++ b/frontend/tests/acceptance/labels.js @@ -2,7 +2,7 @@ //views? -//clipboard? +//clipboard yes //show only high prio labels + check labels exist diff --git a/frontend/tests/acceptance/library/import.js b/frontend/tests/acceptance/library/import.js index a90059e4f..a7c251955 100644 --- a/frontend/tests/acceptance/library/import.js +++ b/frontend/tests/acceptance/library/import.js @@ -1,2 +1,2 @@ -//upload file + import \ No newline at end of file +//upload file + import from library and from navigation + delete later diff --git a/frontend/tests/acceptance/old/favorites.js b/frontend/tests/acceptance/old/favorites.js deleted file mode 100644 index 4558887a2..000000000 --- a/frontend/tests/acceptance/old/favorites.js +++ /dev/null @@ -1,34 +0,0 @@ -import { Selector } from 'testcafe'; -import testcafeconfig from './testcafeconfig'; -import Page from "./page-model"; -import { RequestLogger } from 'testcafe'; - -const logger = RequestLogger( /http:\/\/localhost:2342\/api\/v1\/photos*/ , { - logResponseHeaders: true, - logResponseBody: true -}); - -fixture`Test favorites page` - .page `localhost:2342/favorites` - .requestHooks(logger); - -const page = new Page(); - -test('Like photo', async t => { - - -}), - -test('Dislike photo', async t => { - - const FavoritesCount = await Selector('.t-like.t-on').count; - await t - .click(Selector('.t-like.t-on')); - logger.clear(); - await t.navigateTo("../favorites"); - const request3 = await logger.requests[0].responseBody; - - const FavoritesCountAfterDislike = await Selector('.t-like.t-on').count; - await t - .expect(FavoritesCountAfterDislike).eql(FavoritesCount - 1); -}); diff --git a/frontend/tests/acceptance/old/library.js b/frontend/tests/acceptance/old/library.js deleted file mode 100644 index 5de815135..000000000 --- a/frontend/tests/acceptance/old/library.js +++ /dev/null @@ -1,22 +0,0 @@ -import { Selector } from 'testcafe'; -import testcafeconfig from '../testcafeconfig'; -import Page from "../page-model"; -import { RequestLogger } from 'testcafe'; - -const logger = RequestLogger( /http:\/\/localhost:2342\/api\/v1\*/ , { - logResponseHeaders: true, - logResponseBody: true -}); - -fixture`Library page` - .page`localhost:2342/library` - .requestHooks(logger); - -const page = new Page(); - - -test('Upload image', async t => { - await t - //.click(Selector(button).withText('Upload')); - -}); diff --git a/frontend/tests/acceptance/old/navigate.js b/frontend/tests/acceptance/old/navigate.js deleted file mode 100644 index 8eaaf89ad..000000000 --- a/frontend/tests/acceptance/old/navigate.js +++ /dev/null @@ -1,23 +0,0 @@ -import { Selector } from 'testcafe'; -import testcafeconfig from '../testcafeconfig'; -import Page from "../page-model"; - -fixture`Use navigation` - .page`${testcafeconfig.url}`; - -const page = new Page(); - -test('Navigate', async t => { - await page.openNav(); - await t - .click('a[href="/albums"]') - .expect(Selector('div.p-page-albums').exists, {timeout: 5000}).ok(); - await page.openNav(); - await t - .click('a[href="/places"]') - .expect(Selector('#map').exists).ok(); - await page.openNav(); - await t - .click('a[href="/labels"]') - .expect(Selector('div.p-page-labels').exists, {timeout: 5000}).ok(); -}); diff --git a/frontend/tests/acceptance/old/photos.js b/frontend/tests/acceptance/old/photos.js deleted file mode 100644 index 367c26bca..000000000 --- a/frontend/tests/acceptance/old/photos.js +++ /dev/null @@ -1,35 +0,0 @@ -import { Selector } from 'testcafe'; -import testcafeconfig from '../testcafeconfig'; -import Page from "../page-model"; - -fixture`Test clipboard` - .page`${testcafeconfig.url}`; - -const page = new Page(); - -test('Test selecting photos and clear clipboard', async t => { - const clipboardCount = await Selector('span.t-clipboard-count'); - - await page.selectNthPhoto(0); - await page.selectNthPhoto(2); - - await t - .expect(clipboardCount.textContent).eql("2"); - await page.unselectPhoto(0); - - await t - .expect(clipboardCount.textContent).eql("1") - - await page.openNav(); - await t - .click('a[href="/labels"]') - .expect(Selector('main .p-page-labels').exists, {timeout: 5000}).ok(); - await page.openNav(); - await t - .click('a[href="/photos"]') - .expect(clipboardCount.textContent).eql("1") - .click(Selector('div.p-photo-clipboard')) - .click(Selector('.p-photo-clipboard-clear'), {timeout: 15000}); - - await t.expect(Selector('#t-clipboard').exists).eql(false); -}); diff --git a/frontend/tests/acceptance/old/places.js b/frontend/tests/acceptance/old/places.js deleted file mode 100644 index 4beadcd4d..000000000 --- a/frontend/tests/acceptance/old/places.js +++ /dev/null @@ -1,19 +0,0 @@ -import { Selector } from 'testcafe'; -import { ClientFunction } from 'testcafe'; - -const getLocation = ClientFunction(() => document.location.href); - -fixture`Test places page` - .page `localhost:2342/places`; - -test('Test places', async t => { - await t - .expect(Selector('#map').exists, {timeout: 15000}).ok() - .expect(Selector('div.p-map-control').visible).ok(); - await t - .typeText(Selector('input[aria-label="Search"]'), 'Berlin') - .pressKey('enter'); - await t - .expect(Selector('div.p-map-control').visible).ok() - .expect(getLocation()).contains('Berlin'); -}); diff --git a/frontend/tests/acceptance/old/scrolltop.js b/frontend/tests/acceptance/old/scrolltop.js deleted file mode 100644 index b14746263..000000000 --- a/frontend/tests/acceptance/old/scrolltop.js +++ /dev/null @@ -1,26 +0,0 @@ -import { Selector } from 'testcafe'; -import testcafeconfig from '../testcafeconfig'; -import Page from "../page-model"; -import { ClientFunction } from 'testcafe'; - -fixture`Scroll to top` - .page`${testcafeconfig.url}`; - -const page = new Page(); -const scroll = ClientFunction((x, y) => window.scrollTo(x, y)); -const getcurrentPosition = ClientFunction(() => window.pageYOffset); - -test('Test scroll to top functionality', async t => { - await t - .expect(Selector('button.p-photo-scroll-top').exists).notOk() - .expect(getcurrentPosition()).eql(0) - .expect(Selector('div[class="v-image__image v-image__image--cover"]').nth(0).visible).ok(); - await scroll(0, 1200); - await t - .expect(getcurrentPosition()).eql(1200); - await scroll(0, 900); - await t - .expect(getcurrentPosition()).eql(900) - .click(Selector('button.p-photo-scroll-top')) - .expect(getcurrentPosition()).eql(0); -});