mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-21 18:04:39 -05:00
Fix E2E tests
This commit is contained in:
parent
fe1c9a336d
commit
8871b54783
|
|
@ -557,8 +557,11 @@ export const action: ActionFunction = async ({ params, request }) => {
|
|||
"Not an organizer or streamer",
|
||||
);
|
||||
|
||||
// can't lock if match status is not Locked (team(s) busy with previous match), let's update their view to reflect that
|
||||
if (match.status !== TournamentMatchStatus.Locked) {
|
||||
// can't lock if match status is not Locked or Waiting (team(s) busy with previous match), let's update their view to reflect that
|
||||
if (
|
||||
match.status !== TournamentMatchStatus.Locked &&
|
||||
match.status !== TournamentMatchStatus.Waiting
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,8 +37,12 @@ export function CastInfo({
|
|||
|
||||
if (castTwitchAccounts.length === 0 || !hasPerms || matchIsOver) return null;
|
||||
|
||||
// match can only be locked when status is Locked (team(s) busy with previous match)
|
||||
if (matchStatus === TournamentMatchStatus.Locked && !isLocked) {
|
||||
// match can only be locked when status is Locked or Waiting (team(s) busy with previous match)
|
||||
if (
|
||||
(matchStatus === TournamentMatchStatus.Locked ||
|
||||
matchStatus === TournamentMatchStatus.Waiting) &&
|
||||
!isLocked
|
||||
) {
|
||||
return (
|
||||
<CastInfoWrapper
|
||||
submitButtonText="Lock to be casted"
|
||||
|
|
|
|||
|
|
@ -66,7 +66,8 @@ test.describe("LFG", () => {
|
|||
|
||||
await submit(page);
|
||||
|
||||
// wait for redirect to LFG page
|
||||
// wait for redirect to LFG page & verify the language is displayed
|
||||
await expect(page.getByText("DA / EN", { exact: true })).toBeVisible();
|
||||
await expect(page.getByTestId("add-filter-button")).toBeVisible();
|
||||
await expect(
|
||||
page.getByText("test post for language editing"),
|
||||
|
|
@ -86,8 +87,7 @@ test.describe("LFG", () => {
|
|||
).toBeVisible();
|
||||
|
||||
// verify updated language is displayed
|
||||
await expect(page.getByText(/ES/)).toBeVisible();
|
||||
await expect(page.getByText(/DA/)).not.toBeVisible();
|
||||
await expect(page.getByText("EN / ES", { exact: true })).toBeVisible();
|
||||
});
|
||||
|
||||
test("filters posts by language", async ({ page }) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user