Apply prettier
Dieser Commit ist enthalten in:
Ursprung
d416cbb20e
Commit
72fc36dd67
8 geänderte Dateien mit 39 neuen und 36 gelöschten Zeilen
4
.github/workflows/plugin-linting.yml
gevendort
4
.github/workflows/plugin-linting.yml
gevendort
|
@ -8,7 +8,7 @@ on:
|
||||||
- stable
|
- stable
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 0 * * *'
|
- cron: "0 0 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
|
|
||||||
# Until templates are converted
|
# Until templates are converted
|
||||||
#- name: Ember template lint
|
#- name: Ember template lint
|
||||||
#run: yarn ember-template-lint assets/javascripts
|
#run: yarn ember-template-lint assets/javascripts
|
||||||
|
|
||||||
- name: Rubocop
|
- name: Rubocop
|
||||||
run: bundle exec rubocop .
|
run: bundle exec rubocop .
|
||||||
|
|
10
.github/workflows/plugin-metadata.yml
gevendort
10
.github/workflows/plugin-metadata.yml
gevendort
|
@ -36,9 +36,9 @@ jobs:
|
||||||
uses: actions/github-script@v5
|
uses: actions/github-script@v5
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
const semver = require('semver');
|
const semver = require('semver');
|
||||||
const { head_version, base_version } = process.env;
|
const { head_version, base_version } = process.env;
|
||||||
|
|
||||||
if (semver.lte(head_version, base_version)) {
|
if (semver.lte(head_version, base_version)) {
|
||||||
core.setFailed("Head version is equal to or lower than base version.");
|
core.setFailed("Head version is equal to or lower than base version.");
|
||||||
}
|
}
|
||||||
|
|
2
.github/workflows/plugin-tests.yml
gevendort
2
.github/workflows/plugin-tests.yml
gevendort
|
@ -8,7 +8,7 @@ on:
|
||||||
- main
|
- main
|
||||||
pull_request:
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '0 */12 * * *'
|
- cron: "0 */12 * * *"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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",
|
needs.user();
|
||||||
function (needs) {
|
needs.pretender((server, helper) => {
|
||||||
needs.user();
|
server.get("/w/wizard.json", (request) =>
|
||||||
needs.pretender((server, helper) => {
|
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) {
|
||||||
|
|
|
@ -43,5 +43,5 @@ export {
|
||||||
stepNotPermitted,
|
stepNotPermitted,
|
||||||
allFieldsWizard,
|
allFieldsWizard,
|
||||||
wizard,
|
wizard,
|
||||||
update
|
update,
|
||||||
};
|
};
|
||||||
|
|
Laden …
In neuem Issue referenzieren