1
0
Fork 0
Dieser Commit ist enthalten in:
Angus McLeod 2022-07-27 14:50:49 +01:00
Ursprung d416cbb20e
Commit 72fc36dd67
8 geänderte Dateien mit 39 neuen und 36 gelöschten Zeilen

Datei anzeigen

@ -8,7 +8,7 @@ on:
- stable - stable
pull_request: pull_request:
schedule: schedule:
- cron: '0 0 * * *' - cron: "0 0 * * *"
jobs: jobs:
build: build:

Datei anzeigen

@ -8,7 +8,7 @@ on:
- main - main
pull_request: pull_request:
schedule: schedule:
- cron: '0 */12 * * *' - cron: "0 */12 * * *"
jobs: jobs:
build: build:

Datei anzeigen

@ -1,4 +1,4 @@
pull_request_title: 'I18n: Update translations' pull_request_title: "I18n: Update translations"
files: files:
- source: /config/locales/client.en.yml - source: /config/locales/client.en.yml
translation: /config/locales/client.%two_letters_code%.yml translation: /config/locales/client.%two_letters_code%.yml

Datei anzeigen

@ -5,7 +5,7 @@ import {
count, count,
query, query,
exists, exists,
visible visible,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
import { allFieldsWizard } from "../helpers/wizard"; import { allFieldsWizard } from "../helpers/wizard";
import tagsJson from "../fixtures/tags"; import tagsJson from "../fixtures/tags";
@ -13,9 +13,11 @@ import usersJson from "../fixtures/users";
acceptance("Field | Fields", function (needs) { acceptance("Field | Fields", function (needs) {
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(allFieldsWizard))); server.get("/w/wizard.json", (request) => helper.response(allFieldsWizard));
server.get("/tags/filter/search", (request) => (helper.response({ results: tagsJson["tags"] }))); server.get("/tags/filter/search", (request) =>
server.get("/u/search/users", (request) => (helper.response(usersJson))); helper.response({ results: tagsJson["tags"] })
);
server.get("/u/search/users", (request) => helper.response(usersJson));
}); });
test("Text", async function (assert) { test("Text", async function (assert) {
@ -138,9 +140,7 @@ acceptance("Field | Fields", function (needs) {
await visit("/w/wizard"); await visit("/w/wizard");
assert.ok(visible(".wizard-field.category-field .multi-select-header")); assert.ok(visible(".wizard-field.category-field .multi-select-header"));
await click(".wizard-field.category-field .select-kit-header"); await click(".wizard-field.category-field .select-kit-header");
assert.ok( assert.ok(exists(".wizard-field.category-field .select-kit-collection li"));
exists(".wizard-field.category-field .select-kit-collection li")
);
}); });
test("Group", async function (assert) { test("Group", async function (assert) {

Datei anzeigen

@ -5,13 +5,15 @@ import {
count, count,
query, query,
exists, exists,
visible visible,
} from "discourse/tests/helpers/qunit-helpers"; } from "discourse/tests/helpers/qunit-helpers";
import { stepNotPermitted, wizard, update } from "../helpers/wizard"; import { stepNotPermitted, wizard, update } from "../helpers/wizard";
acceptance("Step | Not permitted", function (needs) { acceptance("Step | Not permitted", function (needs) {
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(stepNotPermitted))); server.get("/w/wizard.json", (request) =>
helper.response(stepNotPermitted)
);
}); });
test("Shows not permitted message", async function (assert) { test("Shows not permitted message", async function (assert) {
@ -22,8 +24,10 @@ acceptance("Step | Not permitted", function (needs) {
acceptance("Step | Step", function (needs) { acceptance("Step | Step", function (needs) {
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(wizard))); server.get("/w/wizard.json", (request) => helper.response(wizard));
server.put("/w/wizard/steps/:step_id", (request) => (helper.response(update))); server.put("/w/wizard/steps/:step_id", (request) =>
helper.response(update)
);
}); });
test("Renders the step", async function (assert) { test("Renders the step", async function (assert) {

Datei anzeigen

@ -15,7 +15,7 @@ import {
acceptance("Wizard | Not logged in", function (needs) { acceptance("Wizard | Not logged in", function (needs) {
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(wizardNoUser))); server.get("/w/wizard.json", (request) => helper.response(wizardNoUser));
}); });
test("Wizard no access requires login", async function (assert) { test("Wizard no access requires login", async function (assert) {
@ -24,25 +24,24 @@ acceptance("Wizard | Not logged in", function (needs) {
}); });
}); });
acceptance( acceptance("Wizard | Not permitted", function (needs) {
"Wizard | Not permitted",
function (needs) {
needs.user(); needs.user();
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(wizardNotPermitted))); server.get("/w/wizard.json", (request) =>
helper.response(wizardNotPermitted)
);
}); });
test("Wizard no access not permitted", async function (assert) { test("Wizard no access not permitted", async function (assert) {
await visit("/w/wizard"); await visit("/w/wizard");
assert.ok(exists(".wizard-no-access.not-permitted")); assert.ok(exists(".wizard-no-access.not-permitted"));
}); });
} });
);
acceptance("Wizard | Completed", function (needs) { acceptance("Wizard | Completed", function (needs) {
needs.user(); needs.user();
needs.pretender((server, helper) => { needs.pretender((server, helper) => {
server.get("/w/wizard.json", (request) => (helper.response(wizardCompleted))); server.get("/w/wizard.json", (request) => helper.response(wizardCompleted));
}); });
test("Wizard no access completed", async function (assert) { test("Wizard no access completed", async function (assert) {

Datei anzeigen

@ -43,5 +43,5 @@ export {
stepNotPermitted, stepNotPermitted,
allFieldsWizard, allFieldsWizard,
wizard, wizard,
update update,
}; };