Tests: Adapt acceptance tests to changes

This commit is contained in:
theresa 2021-11-04 08:39:14 +01:00
parent 2ae440d1d1
commit 9a7c070604
4 changed files with 14 additions and 13 deletions

View file

@ -65,9 +65,9 @@ acceptance-stop:
acceptance-private-restart:
cp -f storage/acceptance/backup.db storage/acceptance/index.db
cp -f storage/acceptance/config/settingsBackup.yml storage/acceptance/config/settings.yml
go run cmd/photoprism/photoprism.go --public=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-backups start -d
go run cmd/photoprism/photoprism.go --oidc-issuer-url="" --public=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-backups start -d
acceptance-private-stop:
go run cmd/photoprism/photoprism.go --public=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-backups stop
go run cmd/photoprism/photoprism.go --oidc-issuer-url="" --public=false --upload-nsfw=false --database-driver sqlite --database-dsn ./storage/acceptance/index.db --import-path ./storage/acceptance/import --http-port=2343 --config-path ./storage/acceptance/config --originals-path ./storage/acceptance/originals --storage-path ./storage/acceptance --test --backup-path ./storage/acceptance/backup --disable-backups stop
start:
go run cmd/photoprism/photoprism.go start -d
stop:

View file

@ -95,7 +95,7 @@ test.meta("testID", "admin-role-005")("Access to library", async (t) => {
.expect(Selector("div.p-page-photos").visible)
.notOk()
.navigateTo("/library/logs")
.expect(Selector("p.p-log-debug").visible)
.expect(Selector("p.p-log-message").visible)
.ok()
.expect(Selector("div.p-page-photos").visible)
.notOk()

View file

@ -89,7 +89,7 @@ test.meta("testID", "member-role-005")("No access to library", async (t) => {
.expect(Selector("div.p-page-photos").visible)
.ok()
.navigateTo("/library/logs")
.expect(Selector("p.p-log-debug").visible)
.expect(Selector("p.p-log-message").visible)
.notOk()
.expect(Selector("div.p-page-photos").visible)
.ok()
@ -240,8 +240,9 @@ test.meta("testID", "member-role-008")("Member cannot like photos", async (t) =>
.ok()
.expect(Selector('button[title="Like"]').exists)
.notOk()
.click(Selector('button[title="Close"]'))
.click(Selector(".p-expand-search"));
.click(Selector("button.action-close"))
.wait(5000)
.click(Selector(".p-expand-search", { timeout: 8000 }));
await page.setFilter("view", "Cards");
await t.expect(Selector(`div.uid-${FirstPhoto}`).hasClass("is-favorite")).notOk();
await page.toggleLike(FirstPhoto);
@ -502,12 +503,12 @@ test.meta("testID", "member-role-018")("No unstack, change primary actions", asy
.ok()
.expect(Selector("button.action-download").hasAttribute("disabled"))
.notOk()
.expect(Selector("button.action-unstack").hasAttribute("disabled"))
.ok()
.expect(Selector("button.action-primary").hasAttribute("disabled"))
.ok()
.expect(Selector("button.action-delete").hasAttribute("disabled"))
.ok();
.expect(Selector("button.action-unstack").visible)
.notOk()
.expect(Selector("button.action-primary").visible)
.notOk()
.expect(Selector("button.action-delete").visible)
.notOk();
});
test.meta("testID", "member-role-019")("No edit people functionality", async (t) => {

View file

@ -676,7 +676,7 @@ export default class Page {
.expect(Selector("button.action-download").visible)
.ok();
if (type == "album" || type == "moment" || type == "state") {
await t.expect(Selector("button.action-delete").visible).motOk();
await t.expect(Selector("button.action-delete").visible).notOk();
}
await this.clearSelection();
await t