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
pull_request:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"
jobs:
build:

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

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

Datei anzeigen

@ -15,7 +15,7 @@ import {
acceptance("Wizard | Not logged in", function (needs) {
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) {
@ -24,25 +24,24 @@ acceptance("Wizard | Not logged in", function (needs) {
});
});
acceptance(
"Wizard | Not permitted",
function (needs) {
acceptance("Wizard | Not permitted", function (needs) {
needs.user();
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) {
await visit("/w/wizard");
assert.ok(exists(".wizard-no-access.not-permitted"));
});
}
);
});
acceptance("Wizard | Completed", function (needs) {
needs.user();
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) {

Datei anzeigen

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