mirror of
https://github.com/hanzoai/team.git
synced 2026-10-30 14:49:35 +00:00
* Switch Cypress to use shared ESLint config * Run --fix in Cypress * Manually fix remaining lint issues in Cypress * Switch Playwright to use shared ESLint config * Run --fix in Playwright * Manually fix remaining lint issues in Playwright * Install and cache web app deps during Cypress CI builds This also caches the types and client package. That isn't needed currently since it uses prepackaged versions of those, but I imagine we might change that at some point. * Run e2e-tests-check when ESLint plugin is updated * Change E2E test GHA caching to cache all of web app node_modules * Fix mismatch between cache save and restore * Try bumping cache keys * Copy step to install dependencies to server.run_cypress.sh I don't know how this must've worked before, but if this fixes the issue, it seems like neither Cypress nor Playwright actually use the cached depenendencies. * Try disabling caching entirely for Cypress tests * Try bypassing makefile? * Try also manually building dependencies in run_specs.sh I don't know why this appears to duplicate run_cypress.sh and run_playwright.sh, both of which are called run_test.sh which might not be used any more as best I can tell. * Try installing the web app dependencies in yet another place * Disable the extra steps in server.prepare.sh specifically for Cypress * Revert changes to update cache key and disable web app depenedency cache on Cypress builds
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import type {ChainableT} from '@/types';
|
|
|
|
Cypress.Commands.add('uiGetEmojiPicker', (): ChainableT<JQuery> => {
|
|
return cy.get('#emojiPicker').should('be.visible');
|
|
});
|
|
|
|
Cypress.Commands.add('uiOpenEmojiPicker', (): ChainableT<JQuery> => {
|
|
cy.findByRole('button', {name: 'select an emoji'}).click();
|
|
return cy.get('#emojiPicker').should('be.visible');
|
|
});
|
|
|
|
Cypress.Commands.add('uiOpenCustomEmoji', () => {
|
|
cy.uiOpenEmojiPicker();
|
|
cy.findByText('Custom Emoji').should('be.visible').click();
|
|
|
|
cy.url().should('include', '/emoji');
|
|
cy.get('.backstage-header').should('be.visible').and('contain', 'Custom Emoji');
|
|
});
|
|
|
|
declare global {
|
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
namespace Cypress {
|
|
interface Chainable {
|
|
|
|
/**
|
|
* Open custom emoji
|
|
*
|
|
* @example
|
|
* cy.uiOpenCustomEmoji();
|
|
*/
|
|
uiGetEmojiPicker(): Chainable;
|
|
|
|
/**
|
|
* Open custom emoji
|
|
*
|
|
* @example
|
|
* cy.uiOpenCustomEmoji();
|
|
*/
|
|
uiOpenCustomEmoji(): Chainable;
|
|
|
|
/**
|
|
* Open emoji picker
|
|
*
|
|
* @example
|
|
* cy.uiOpenEmojiPicker();
|
|
*/
|
|
uiOpenEmojiPicker(): Chainable;
|
|
}
|
|
}
|
|
}
|