mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
Follow @mattwr18 suggestions
This commit is contained in:
parent
edbb0c3d1f
commit
c20a656405
@ -5,9 +5,12 @@ import {
|
||||
} from "cypress-cucumber-preprocessor/steps";
|
||||
import helpers from "../../support/helpers";
|
||||
import { VERSION } from '../../constants/terms-and-conditions-version.js'
|
||||
import locales from '../../../webapp/locales'
|
||||
import orderBy from 'lodash/orderBy'
|
||||
|
||||
/* global cy */
|
||||
|
||||
const languages = orderBy(locales, 'name')
|
||||
let lastPost = {};
|
||||
|
||||
let loginCredentials = {
|
||||
@ -245,9 +248,10 @@ Then("I select a category", () => {
|
||||
.click();
|
||||
});
|
||||
|
||||
When("I choose a language for the post", () => {
|
||||
When("I choose {string} as the language for the post", (languageCode) => {
|
||||
cy.get('.ds-flex-item > .ds-form-item .ds-select ')
|
||||
.click().get('.ds-select-option').first().click()
|
||||
.click().get('.ds-select-option')
|
||||
.eq(languages.findIndex(l => l.code === languageCode)).click()
|
||||
})
|
||||
|
||||
Then("the post shows up on the landing page at position {int}", index => {
|
||||
|
||||
@ -20,7 +20,7 @@ Feature: Notification for a mention
|
||||
"""
|
||||
And mention "@matt-rider" in the text
|
||||
And I select a category
|
||||
And I choose a language for the post
|
||||
And I choose "en" as the language for the post
|
||||
And I click on "Save"
|
||||
When I log out
|
||||
And I log in with the following credentials:
|
||||
|
||||
@ -18,7 +18,7 @@ Feature: Create a post
|
||||
for active citizenship.
|
||||
"""
|
||||
And I select a category
|
||||
And I choose a language for the post
|
||||
And I choose "en" as the language for the post
|
||||
And I click on "Save"
|
||||
Then I get redirected to ".../my-first-post"
|
||||
And the post was saved successfully
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user