Skip to content

Commit

Permalink
Harden tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SebastianStehle committed Sep 3, 2024
1 parent 4bec57d commit e8306c2
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 4 deletions.
3 changes: 3 additions & 0 deletions backend/i18n/frontend_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "More",
"common.name": "Name",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "No",
"common.nothingChanged": "Nothing has been changed.",
"common.notSupported": "Not Supported",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} of {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} of total?",
"common.pagerReload": "Click to reload view and get total number of items",
"common.pageSize": "Page Size",
"common.password": "Password",
"common.passwordConfirm": "Confirm Password",
"common.pattern": "Pattern",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Permissions",
"common.prev": "Back",
"common.preview": "Preview",
"common.prevPage": "Previous Page",
"common.product": "Squidex Headless CMS",
"common.project": "Project",
"common.queryOperators.contains": "contains",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/frontend_fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "Plus",
"common.name": "Nom",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "Non",
"common.nothingChanged": "Rien n'a été changé.",
"common.notSupported": "Non supporté",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} de {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} Du total?",
"common.pagerReload": "Cliquez pour recharger la vue et obtenir le nombre total d'articles",
"common.pageSize": "Page Size",
"common.password": "Mot de passe",
"common.passwordConfirm": "Confirmez le mot de passe",
"common.pattern": "Modèle",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Autorisations",
"common.prev": "Back",
"common.preview": "Aperçu",
"common.prevPage": "Previous Page",
"common.product": "CMS sans tête Squidex",
"common.project": "Projet",
"common.queryOperators.contains": "contient",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/frontend_it.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "More",
"common.name": "Nome",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "No",
"common.nothingChanged": "Non è stato cambiato niente.",
"common.notSupported": "Not Supported",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} of {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} of total?",
"common.pagerReload": "Click to reload view and get total number of items",
"common.pageSize": "Page Size",
"common.password": "Password",
"common.passwordConfirm": "Conferma Password",
"common.pattern": "Pattern",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Permessi",
"common.prev": "Back",
"common.preview": "Anteprima",
"common.prevPage": "Previous Page",
"common.product": "Squidex Headless CMS",
"common.project": "Progetto",
"common.queryOperators.contains": "contiene",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/frontend_nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "Meer",
"common.name": "Naam",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "Nee",
"common.nothingChanged": "Er is niets veranderd.",
"common.notSupported": "Not Supported",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst} - {itemLast} van {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} of total?",
"common.pagerReload": "Click to reload view and get total number of items",
"common.pageSize": "Page Size",
"common.password": "Wachtwoord",
"common.passwordConfirm": "Bevestig wachtwoord",
"common.pattern": "Patroon",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Rechten",
"common.prev": "Back",
"common.preview": "Preview",
"common.prevPage": "Previous Page",
"common.product": "Squidex Headless CMS",
"common.project": "Project",
"common.queryOperators.contains": "bevat",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/frontend_pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "Mais",
"common.name": "Nome",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "Não",
"common.nothingChanged": "Nada foi mudado.",
"common.notSupported": "Não suportado",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} de {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} do total?",
"common.pagerReload": "Clique para recarregar a vista e obter o número total de itens",
"common.pageSize": "Page Size",
"common.password": "Password",
"common.passwordConfirm": "Confirmar Password",
"common.pattern": "Padrão",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Permissões",
"common.prev": "Back",
"common.preview": "Previsualizar",
"common.prevPage": "Previous Page",
"common.product": "CMS Headless Squidex",
"common.project": "Projeto",
"common.queryOperators.contains": "contém",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/frontend_zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "More",
"common.name": "名称",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "",
"common.nothingChanged": "什么都没有改变。",
"common.notSupported": "Not Supported",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} 的 {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} of total?",
"common.pagerReload": "Click to reload view and get total number of items",
"common.pageSize": "Page Size",
"common.password": "密码",
"common.passwordConfirm": "确认密码",
"common.pattern": "模式",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "权限",
"common.prev": "Back",
"common.preview": "预览",
"common.prevPage": "Previous Page",
"common.product": "Squidex Headless CMS",
"common.project": "项目",
"common.queryOperators.contains": "包含",
Expand Down
3 changes: 3 additions & 0 deletions backend/i18n/source/frontend_en.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"common.more": "More",
"common.name": "Name",
"common.next": "Continue",
"common.nextPage": "Next Page",
"common.no": "No",
"common.nothingChanged": "Nothing has been changed.",
"common.notSupported": "Not Supported",
Expand All @@ -320,6 +321,7 @@
"common.pagerInfo": "{itemFirst}-{itemLast} of {numberOfItems}",
"common.pagerInfoNoTotal": "{itemFirst}-{itemLast} of total?",
"common.pagerReload": "Click to reload view and get total number of items",
"common.pageSize": "Page Size",
"common.password": "Password",
"common.passwordConfirm": "Confirm Password",
"common.pattern": "Pattern",
Expand All @@ -328,6 +330,7 @@
"common.permissions": "Permissions",
"common.prev": "Back",
"common.preview": "Preview",
"common.prevPage": "Previous Page",
"common.product": "Squidex Headless CMS",
"common.project": "Project",
"common.queryOperators.contains": "contains",
Expand Down
20 changes: 17 additions & 3 deletions frontend/src/app/framework/angular/pager.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
<div class="d-flex align-items-center justify-content-end">
@if (paging) {
<div class="float-end pagination">
<select class="form-select form-select-sm" [ngModel]="paging.pageSize" (ngModelChange)="setPageSize($event)">
<select
class="form-select form-select-sm"
attr.aria-label="{{ 'common.pageSize' | sqxTranslate }}"
[ngModel]="paging.pageSize"
(ngModelChange)="setPageSize($event)">
@for (pageSize of pageSizes; track pageSize) {
<option [ngValue]="pageSize">{{ pageSize }}</option>
}
Expand All @@ -20,10 +24,20 @@
{{ "common.pagerInfoNoTotal" | sqxTranslate: translationInfo }}
</button>
}
<button class="btn btn-sm btn-text-secondary ms-2" (click)="goPrev()" [disabled]="!canGoPrev" type="button">
<button
class="btn btn-sm btn-text-secondary ms-2"
attr.aria-label="{{ 'common.prevPage' | sqxTranslate }}"
(click)="goPrev()"
[disabled]="!canGoPrev"
type="button">
<i class="icon-angle-left"></i>
</button>
<button class="btn btn-sm btn-text-secondary ms-2" (click)="goNext()" [disabled]="!canGoNext" type="button">
<button
class="btn btn-sm btn-text-secondary ms-2"
attr.aria-label="{{ 'common.nextPage' | sqxTranslate }}"
(click)="goNext()"
[disabled]="!canGoNext"
type="button">
<i class="icon-angle-right"></i>
</button>
</span>
Expand Down
3 changes: 3 additions & 0 deletions tools/e2e/tests/given-app/rules.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import { expect, Page } from '@playwright/test';
import { escapeRegex, getRandomId } from '../utils';
import { test } from './_fixture';

// We have no easy way to identity rules. Therefore run them sequentially.
test.describe.configure({ mode: 'serial' });

test.beforeEach(async ({ page, appName }) => {
await page.goto(`/app/${appName}/rules`);
});
Expand Down
2 changes: 1 addition & 1 deletion tools/e2e/tests/given-app/schemas.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ async function createRandomField(page: Page) {
await page.getByPlaceholder('Enter field name').fill(fieldName);

// Save field.
await page.getByRole('button', { name: 'Create and close' }).click();
await page.getByTestId('dialog').getByRole('button', { name: 'Create' }).click();

return fieldName;
}
Expand Down
1 change: 1 addition & 0 deletions tools/e2e/tests/given-schema/contents.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { expect, test } from './_fixture';

test.beforeEach(async ({ page, appName, schemaName }) => {
await page.goto(`/app/${appName}/content/${schemaName}`);
await page.getByRole('combobox').selectOption('3: 50');
});

test('create content and close', async ({ page }) => {
Expand Down

0 comments on commit e8306c2

Please sign in to comment.