diff --git a/e2e-tests/cypress/tests/integration/boards/card_badges_spec.ts b/e2e-tests/cypress/tests/integration/boards/card_badges_spec.ts deleted file mode 100644 index 4f2a2c1354..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/card_badges_spec.ts +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @boards - -describe('Card badges', () => { - before(() => { - // # Login as new user - cy.apiInitSetup({loginAfter: true}); - cy.clearLocalStorage(); - }); - - it('MM-T5395 Shows and hides card badges', () => { - cy.visit('/boards'); - - // Create new board - cy.uiCreateNewBoard('Testing'); - - // Add a new card - cy.uiAddNewCard('Card'); - - // Add some comments - cy.log('**Add some comments**'); - addComment('Some comment'); - addComment('Another comment'); - addComment('Additional comment'); - - // Add card description - cy.log('**Add card description**'); - cy.findByText('Add a description...').click(); - cy.findByRole('combobox').type('## Header\n- [ ] one\n- [x] two{esc}'); - - // Add checkboxes - cy.log('**Add checkboxes**'); - cy.findByRole('button', {name: 'Add content'}).click(); - cy.findByRole('button', {name: 'checkbox'}).click(); - cy.focused().type('three{enter}'); - cy.focused().type('four{enter}'); - cy.focused().type('{esc}'); - cy.findByDisplayValue('three').prev().click(); - - // Close card dialog - cy.log('**Close card dialog**'); - cy.findByRole('button', {name: 'Close dialog'}).click(); - cy.findByRole('dialog').should('not.exist'); - - // Show card badges - cy.log('**Show card badges**'); - cy.findByRole('button', {name: 'Properties menu'}).click(); - cy.findByRole('button', {name: 'Comments and description'}).click(); - cy.findByTitle('This card has a description').should('exist'); - cy.findByTitle('Comments').contains('3').should('exist'); - cy.findByTitle('Checkboxes').contains('2/4').should('exist'); - - // Hide card badges - cy.log('**Hide card badges**'); - cy.findByRole('button', {name: 'Comments and description'}).click(); - cy.findByRole('button', {name: 'Properties menu'}).click(); - cy.findByTitle('This card has a description').should('not.exist'); - cy.findByTitle('Comments').should('not.exist'); - cy.findByTitle('Checkboxes').should('not.exist'); - }); - - const addComment = (text: string) => { - cy.findByText('Add a comment...').click(); - cy.findByRole('combobox').type(text).blur(); - cy.findByRole('button', {name: 'Send'}).click(); - }; -}); diff --git a/e2e-tests/cypress/tests/integration/boards/card_urlproperty_spec.ts b/e2e-tests/cypress/tests/integration/boards/card_urlproperty_spec.ts deleted file mode 100644 index 2c54957848..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/card_urlproperty_spec.ts +++ /dev/null @@ -1,118 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @boards - -describe('Card URL Property', () => { - before(() => { - // # Login as new user - cy.apiInitSetup({loginAfter: true}); - cy.clearLocalStorage(); - }); - - const url = 'https://mattermost.com'; - const changedURL = 'https://mattermost.com/blog'; - - it('MM-T5396 Allows to create and edit URL property', () => { - cy.visit('/boards'); - - // Create new board - cy.uiCreateNewBoard('Testing'); - - // Add a new card - cy.uiAddNewCard('Card'); - - // Add URL property - cy.log('**Add URL property**'); - cy.findByRole('button', {name: '+ Add a property'}).click(); - cy.findByRole('button', {name: 'URL'}).click(); - cy.findByRole('textbox', {name: 'URL'}).type('{enter}'); - - // Enter URL - cy.log('**Enter URL**'); - cy.findByPlaceholderText('Empty').type(`${url}{enter}`); - - // Check buttons - cy.log('**Check link**'); - cy.get('.URLProperty').trigger('mouseover'); - - cy.log('**Check buttons**'); - - // Change URL - cy.log('**Change URL**'); - - cy.get('.URLProperty Button[title=\'Edit\']').click({force: true}); - cy.findByRole('textbox', {name: url}).clear().type(`${changedURL}{enter}`); - cy.findByRole('link', {name: changedURL}).should('exist'); - - // Close card dialog - cy.log('**Close card dialog**'); - cy.findByRole('button', {name: 'Close dialog'}).click(); - cy.findByRole('dialog').should('not.exist'); - - // Show URL property - showURLProperty(); - - // Copy URL to clipboard - cy.log('**Copy URL to clipboard**'); - cy.document().then((doc) => cy.spy(doc, 'execCommand')).as('exec'); - cy.get('.URLProperty Button[title=\'Edit\']').should('not.exist'); - cy.get('.URLProperty Button[title=\'Copy\']').click({force: true}); - cy.findByText('Copied!').should('exist'); - cy.findByText('Copied!').should('not.exist'); - cy.get('@exec').should('have.been.calledOnceWith', 'copy'); - - // Add table view - addView('Table'); - - // Check buttons - cy.log('**Check buttons**'); - cy.get('.URLProperty Button[title=\'Edit\']').should('exist'); - cy.get('.URLProperty Button[title=\'Copy\']').should('exist'); - cy.findByRole('button', {name: 'Copy'}).should('not.exist'); - - // Add gallery view - addView('Gallery'); - showURLProperty(); - - // Check buttons - cy.log('**Check buttons**'); - cy.get('.URLProperty Button[title=\'Edit\']').should('not.exist'); - cy.get('.URLProperty Button[title=\'Copy\']').should('exist'); - - // Add calendar view - addView('Calendar'); - showURLProperty(); - - // Check buttons - cy.log('**Check buttons**'); - cy.get('.URLProperty Button[title=\'Edit\']').should('not.exist'); - cy.get('.URLProperty Button[title=\'Copy\']').should('exist'); - }); - - type ViewType = 'Board' | 'Table' | 'Gallery' | 'Calendar' - - const addView = (type: ViewType) => { - cy.log(`**Add ${type} view**`); - - cy.findByRole('button', {name: 'View menu'}).click(); - cy.findByText('Add view').trigger('mouseover'); - cy.findByRole('button', {name: type}).click(); - cy.findByRole('textbox', {name: `${type} view`}).should('exist'); - }; - - const showURLProperty = () => { - cy.log('**Show URL property**'); - cy.findByRole('button', {name: 'Properties'}).click(); - cy.findByRole('button', {name: 'URL'}).click(); - cy.findByRole('button', {name: 'Properties'}).click(); - cy.findByRole('link', {name: changedURL}).should('exist'); - }; -}); diff --git a/e2e-tests/cypress/tests/integration/boards/channel_header_spec.ts b/e2e-tests/cypress/tests/integration/boards/channel_header_spec.ts deleted file mode 100644 index 68d71d5529..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/channel_header_spec.ts +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// *************************************************************** - -// Stage: @prod -// Group: @boards - -describe('channels > channel header', {testIsolation: true}, () => { - let testTeam: {name: string}; - let testUser: {username: string}; - - before(() => { - cy.apiInitSetup().then(({team, user}) => { - testTeam = team; - testUser = user; - - // # Login as testUser - cy.apiLogin(testUser); - }); - }); - - describe('App Bar enabled', () => { - it('webapp should hide the Boards channel header button', () => { - cy.apiAdminLogin(); - cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: true}}); - - // # Login as testUser - cy.apiLogin(testUser); - - // # Navigate directly to a channel - cy.visit(`/${testTeam.name}/channels/town-square`); - - // * Verify channel header button is not showing - cy.get('#channel-header').within(() => { - cy.get('[data-testid="boardsIcon"]').should('not.exist'); - }); - }); - }); - - describe('App Bar disabled', () => { - beforeEach(() => { - cy.apiAdminLogin(); - cy.apiUpdateConfig({ExperimentalSettings: {EnableAppBar: false}}); - - // # Login as testUser - cy.apiLogin(testUser); - }); - - it('webapp should show the Boards channel header button', () => { - // # Navigate directly to a channel - cy.visit(`/${testTeam.name}/channels/town-square`); - - // * Verify channel header button is showing - cy.get('#channel-header').within(() => { - cy.get('#incidentIcon').should('exist'); - }); - }); - - it('tooltip text should show "Boards" for Boards channel header button', () => { - // # Navigate directly to a channel - cy.visit(`/${testTeam.name}/channels/town-square`); - - // # Hover over the channel header icon - cy.get('#channel-header').within(() => { - cy.get('[data-testid="boardsIcon"]').trigger('mouseover'); - }); - - // * Verify tooltip text - cy.get('#pluginTooltip').contains('Boards'); - }); - - it('webapp should make the Boards channel header button active when opened', () => { - // # Navigate directly to a channel - cy.visit(`/${testTeam.name}/channels/town-square`); - - cy.get('#channel-header').within(() => { - // # Click the channel header button - cy.get('[data-testid="boardsIcon"]').as('icon').click(); - - // * Verify channel header button is showing active className - cy.get('@icon').parent(). - should('have.class', 'channel-header__icon--active-inverted'); - }); - }); - }); -}); diff --git a/e2e-tests/cypress/tests/integration/boards/create_board_spec.ts b/e2e-tests/cypress/tests/integration/boards/create_board_spec.ts deleted file mode 100644 index 0d0e0b2ad8..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/create_board_spec.ts +++ /dev/null @@ -1,339 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @boards - -import timeouts from '../../fixtures/timeouts'; - -describe('Create and delete board / card', () => { - const timestamp = new Date().toLocaleString(); - const boardTitle = `Test Board (${timestamp})`; - const cardTitle = `Test Card (${timestamp})`; - - beforeEach(() => { - // # Login as new user - cy.apiAdminLogin().apiInitSetup({loginAfter: true}); - cy.clearLocalStorage(); - }); - - it('MM-T4274 Create an Empty Board', () => { - cy.visit('/boards'); - - // Tests for template selector - cy.findByText('Use this template').should('exist').click(); - - // Some options are present - cy.contains('Meeting Agenda').should('exist'); - cy.contains('Personal Goals').should('exist'); - cy.contains('Project Tasks').should('exist'); - - // Create empty board - cy.findByText('Create an empty board').should('exist').click({force: true}); - cy.get('.BoardComponent').should('exist'); - - // Change Title - cy.findByPlaceholderText('Untitled board').should('be.visible').wait(timeouts.HALF_SEC).as('editableTitle'); - cy.get('@editableTitle').should('be.visible'). - clear(). - type('Testing'). - type('{enter}'). - should('have.value', 'Testing'); - }); - - it('MM-T4275 Set up Board description', () => { - cy.visit('/boards'); - - // # Create an empty board and change tile to Testing - cy.findByText('Create an empty board').should('exist').click({force: true}); - cy.get('.BoardComponent').should('exist'); - - // # Change Title - cy.findByPlaceholderText('Untitled board').should('be.visible').wait(timeouts.HALF_SEC); - - // * Assert that the title is changed to "testing" - cy.findByPlaceholderText('Untitled board'). - clear(). - type('Testing'). - type('{enter}'). - should('have.value', 'Testing'); - - // # "Add icon" and "Show description" options appear - cy.findByText('Add icon').should('exist').click({force: true}); - cy.findByText('show description').should('exist').click({force: true}); - - // # Click on "Add a description" below the board title and type "for testing purposes only" - cy.findByText('Add a description...').should('be.visible').wait(timeouts.HALF_SEC); - - // * Assert that the editable description should be visible - cy.findByText('Add a description...').should('be.visible'); - cy.findByText('Add a description...').click({force: true}); - cy.get('.description'). - click(). - get('.description .MarkdownEditorInput'). - type('for testing purposes only'); - - // # Click to other element to give some time for the description to be saved. - cy.findByPlaceholderText('Untitled board').click(); - - // * Assert that the description is changed to "for testing purposes only" - cy.findByText('for testing purposes only').should('be.visible'); - - // # Hide Description options should appear and click on it to hide description - cy.findByText('hide description').should('exist').click({force: true}); - - // * Assert that description should not appear" - cy.get('.description').should('not.exist'); - - // # Show Description options should appear and click on it to show description - cy.findByText('show description').should('exist').click({force: true}); - - // * Assert that the description "for testing purposes should be visible" - cy.findByText('for testing purposes only').should('be.visible'); - }); - - it('MM-T4276 Set up Board emoji', () => { - cy.visit('/boards'); - - // # Create an empty board and change tile to Testing - cy.findByText('Create an empty board').should('exist').click({force: true}); - cy.get('.BoardComponent').should('exist'); - - // # Change Title - cy.findByPlaceholderText('Untitled board').should('be.visible').wait(timeouts.HALF_SEC); - - // * Assert that the title is changed to "testing" - cy.findByPlaceholderText('Untitled board'). - clear(). - type('Testing'). - type('{enter}'). - should('have.value', 'Testing'); - - // # "Add icon" and "Show description" options appear - cy.findByText('Add icon').should('exist'); - cy.findByText('show description').should('exist'); - - // # Click on "Add icon" - cy.findByText('Add icon').should('exist').click({force: true}); - - // * Assert that a random emoji is selected and added at the beginning of the board title - cy.get('.IconSelector').should('exist'); - - // # Click on the emoji next to the board title - cy.get('.IconSelector .MenuWrapper').should('exist').click({force: true}); - - // * Assert that Dropdown menu with 3 options appears - cy.findByText('Random').should('exist'); - cy.findByText('Pick icon').should('exist'); - cy.findByText('Remove icon').should('exist'); - - // # Hover your mouse over the "Pick Icon" option - cy.findByText('Pick icon').trigger('mouseover'); - - // * Assert that emoji picker menu appears - cy.get('.IconSelector .menu-contents').should('exist'); - - // # Click on the emoji from the picker - cy.get('.EmojiPicker').should('exist').and('be.visible').within(() => { - // # Click on the emoji - cy.get("[aria-label='😀, grinning']").should('exist'); - cy.get("[aria-label='😀, grinning']").eq(0).click({force: true}); - }); - - // * Assert that Selected emoji is now displayed next to the board title - cy.get('.IconSelector span').contains('😀'); - - // # Click on the emoji next to the board title - cy.get('.IconSelector .MenuWrapper').should('exist').click({force: true}); - - // * Assert that Dropdown menu with 3 options appears - cy.findByText('Random').should('exist'); - cy.findByText('Pick icon').should('exist'); - cy.findByText('Remove icon').should('exist'); - - // # Click "Remove icon" - cy.findByText('Remove icon').click({force: true}); - - // * Assert that Icon next to the board title is removed - cy.get('.IconSelector').should('not.exist'); - }); - - it('MM-T5397 Can create and delete a board and a card', () => { - // Visit a page and create new empty board - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - // Change board title - cy.log('**Change board title**'); - cy.get('.Editable.title'). - type(boardTitle). - type('{enter}'). - should('have.value', boardTitle); - - // Rename board view - cy.log('**Rename board view**'); - const boardViewTitle = `Test board (${timestamp})`; - cy.get(".ViewHeader>.viewSelector>.Editable[title='Board view']").should('exist'); - cy.get('.ViewHeader>.viewSelector>.Editable'). - clear(). - type(boardViewTitle). - type('{esc}'); - cy.get(`.ViewHeader .Editable[title='${boardViewTitle}']`).should('exist'); - - // Create card - cy.log('**Create card**'); - cy.get('.ViewHeader').contains('New').click(); - cy.get('.CardDetail').should('exist'); - - //Check title has focus when card is created - cy.log('**Check title has focus when card is created**'); - cy.get('.CardDetail .EditableArea.title'). - should('have.focus'); - - // Change card title - cy.log('**Change card title**'); - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.get('.CardDetail .EditableArea.title'). - click(). - should('have.focus'). - type(cardTitle). - should('have.value', cardTitle); - - // Close card dialog - cy.log('**Close card dialog**'); - cy.get('.Dialog Button[title=\'Close dialog\']'). - should('be.visible'). - click(); - - // Create a card by clicking on the + button - cy.log('**Create a card by clicking on the + button**'); - cy.get('.KanbanColumnHeader button .AddIcon').click(); - cy.get('.CardDetail').should('exist'); - cy.get('.Dialog.dialog-back .wrapper').click({force: true}); - - // Create table view - cy.log('**Create table view**'); - cy.get('.ViewHeader').get('.DropdownIcon').first().parent().click(); - cy.get('.ViewHeader').contains('Add view').trigger('mouseover'); - cy.get('.ViewHeader'). - contains('Add view'). - parent(). - contains('Table'). - click(); - cy.get(".ViewHeader .Editable[title='Table view']").should('exist'); - cy.get(`.TableRow [value='${cardTitle}']`).should('exist'); - - // Rename table view - cy.log('**Rename table view**'); - const tableViewTitle = `Test table (${timestamp})`; - cy.get(".ViewHeader .Editable[title='Table view']"). - clear(). - type(tableViewTitle). - type('{esc}'); - cy.get(`.ViewHeader .Editable[title='${tableViewTitle}']`).should('exist'); - - // Sort the table - cy.log('**Sort the table**'); - cy.get('.ViewHeader').contains('Sort').click(); - cy.get('.ViewHeader'). - contains('Sort'). - parent(). - contains('Name'). - click(); - - // Delete board - cy.log('**Delete board**'); - cy.get('.Sidebar .octo-sidebar-list').then((el) => { - cy.log(el.text()); - }); - cy.get('.Sidebar .octo-sidebar-list'). - contains(boardTitle). - parent(). - find('.MenuWrapper'). - find('button.IconButton'). - click({force: true}); - cy.contains('Delete board').click({force: true}); - cy.get('.DeleteBoardDialog button.danger').click({force: true}); - cy.contains(boardTitle).should('not.exist'); - }); - - it('MM-T4433 Scrolls the kanban board when dragging card to edge', () => { - // Visit a page and create new empty board - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - // Create 10 empty groups - cy.log('**Create new empty groups**'); - for (let i = 0; i < 10; i++) { - cy.contains('+ Add a group').scrollIntoView().should('be.visible').click(); - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('have.length', i + 1); - } - - // Create empty card in last group - cy.log('**Create new empty card in first group**'); - cy.get('.octo-board-column').last().contains('+ New').scrollIntoView().click(); - cy.get('.Dialog').should('exist'); - cy.get('.Dialog Button[title=\'Close dialog\']').should('be.visible').click(); - cy.get('.KanbanCard').scrollIntoView().should('exist'); - - // Drag card to right corner and expect scroll to occur - cy.get('.Kanban').invoke('scrollLeft').should('not.equal', 0); - - cy.get('.KanbanCard'). - trigger('dragstart'); - - // wait necessary to trigger scroll animation for some time - // eslint-disable-next-line cypress/no-unnecessary-waiting - cy.get('.Kanban'). - trigger('dragover', {clientX: 400, clientY: Cypress.config().viewportHeight / 2}). - wait(timeouts.TEN_SEC). - trigger('dragend'); - - cy.get('.Kanban').invoke('scrollLeft').should('equal', 0); - }); - - it('MM-T5398 cut/undo/redo work in comments', () => { - const isMAC = navigator.userAgent.indexOf('Mac') !== -1; - const ctrlKey = isMAC ? 'meta' : 'ctrl'; - - // Visit a page and create new empty board - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - // Create card - cy.log('**Create card**'); - cy.get('.ViewHeader').contains('New').click(); - cy.get('.CardDetail').should('exist'); - - cy.log('**Add comment**'); - cy.get('.CommentsList'). - should('exist'). - findAllByTestId('preview-element'). - click(); - - cy.get('.CommentsList .MarkdownEditor'). - type('Test Text'); - - cy.log('**Cut comment**'); - cy.get('.CommentsList .MarkdownEditor'). - type('{selectAll}'). - trigger('cut'). - should('have.text', ''); - - cy.log('**Undo comment**'); - cy.get('.CommentsList .MarkdownEditor'). - type(`{${ctrlKey}+z}`). - should('have.text', 'Test Text'); - - cy.log('**Redo comment**'); - cy.get('.CommentsList .MarkdownEditor'). - type(`{shift+${ctrlKey}+z}`). - should('have.text', ''); - }); -}); diff --git a/e2e-tests/cypress/tests/integration/boards/group_by_property_spec.ts b/e2e-tests/cypress/tests/integration/boards/group_by_property_spec.ts deleted file mode 100644 index a63f43a3eb..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/group_by_property_spec.ts +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @boards - -describe('Group board by different properties', () => { - before(() => { - // # Login as new user - cy.apiInitSetup({loginAfter: true}); - cy.clearLocalStorage(); - }); - - it('MM-T4291 Group by different property', () => { - cy.visit('/boards'); - - // Create new board - cy.uiCreateNewBoard('Testing'); - - // Add a new group - cy.uiAddNewGroup('Group 1'); - - // Add a new card to the group - cy.log('**Add a new card to the group**'); - cy.findAllByRole('button', {name: '+ New'}).eq(1).click(); - cy.findByRole('dialog').should('exist'); - cy.findByTestId('select-non-editable').findByText('Group 1').should('exist'); - cy.get('#mainBoardBody').findByText('Untitled').should('exist'); - - // Add new select property - cy.log('**Add new select property**'); - cy.findAllByRole('button', {name: '+ Add a property'}).click(); - cy.findAllByRole('button', {name: 'Select'}).click(); - cy.findByRole('textbox', {name: 'Select'}).type('{enter}'); - cy.findByRole('dialog').findByRole('button', {name: 'Select'}).should('exist'); - - // Close card dialog - cy.log('**Close card dialog**'); - cy.findByRole('button', {name: 'Close dialog'}).should('exist').click(); - - cy.findByRole('dialog').should('not.exist'); - - // Group by new select property - cy.log('**Group by new select property**'); - cy.findByRole('button', {name: /Group by:/}).click(); - cy.findByRole('button', {name: 'Status'}).get('.CheckIcon').should('exist'); - cy.findByRole('button', {name: 'Select'}).click(); - cy.findByTitle(/empty Select property/).contains('No Select'); - cy.get('#mainBoardBody').findByText('Untitled').should('exist'); - - // Add another new group - cy.log('**Add another new group**'); - cy.findByRole('button', {name: '+ Add a group'}).click(); - cy.findByRole('textbox', {name: 'New group'}).should('exist'); - - // Add a new card to another group - cy.log('**Add a new card to another group**'); - cy.findAllByRole('button', {name: '+ New'}).eq(1).click(); - cy.findByRole('dialog').should('exist'); - cy.findAllByTestId('select-non-editable').last().findByText('New group').should('exist'); - }); -}); diff --git a/e2e-tests/cypress/tests/integration/boards/manage_groups_spec.ts b/e2e-tests/cypress/tests/integration/boards/manage_groups_spec.ts deleted file mode 100644 index 12b575ae57..0000000000 --- a/e2e-tests/cypress/tests/integration/boards/manage_groups_spec.ts +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @boards - -describe('Manage groups', () => { - beforeEach(() => { - // # Login as new user - cy.apiAdminLogin().apiInitSetup({loginAfter: true}); - cy.clearLocalStorage(); - }); - - it('MM-T4284 Adding a group', () => { - // Visit a page and create new empty board - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - cy.contains('+ Add a group').click({force: true}); - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist'); - - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']'). - clear(). - type('Group 1'). - blur(); - cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('exist'); - }); - - it('MM-T4285 Adding group color', () => { - // Visit a page and create new empty board - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - cy.contains('+ Add a group').click({force: true}); - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist'); - - cy.get('.KanbanColumnHeader').last().within(() => { - cy.get('.icon-dots-horizontal').click({force: true}); - cy.get('.menu-options').should('exist').first().within(() => { - cy.contains('Hide').should('exist'); - cy.contains('Delete').should('exist'); - - // Some colours - cy.contains('Brown').should('exist'); - cy.contains('Gray').should('exist'); - cy.contains('Orange').should('exist'); - - // Click on green - cy.contains('Green').should('be.visible').click(); - }); - }); - - cy.get('.KanbanColumnHeader').last().within(() => { - cy.get('.Label.propColorGreen').should('exist'); - }); - }); - - it('MM-T4287 Hiding/unhiding a group', () => { - // Step 1: Create an empty board and add a group - cy.visit('/boards'); - cy.uiCreateEmptyBoard(); - - cy.contains('+ Add a group').click({force: true}); - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']').should('exist'); - - cy.get('.KanbanColumnHeader .Editable[value=\'New group\']'). - clear(). - type('Group 1'). - blur(); - - cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('exist'); - - // Step 2: Click on the three dots next to "Group 1" - cy.get('.KanbanColumnHeader').last().within(() => { - cy.get('.icon-dots-horizontal').click({force: true}); - cy.get('.menu-options').should('exist').first().within(() => { - cy.contains('Hide').should('exist'); - cy.contains('Delete').should('exist'); - - // Some colours - cy.contains('Brown').should('exist'); - cy.contains('Gray').should('exist'); - cy.contains('Orange').should('exist'); - }); - }); - - // Step 3: Click on "Hide" - cy.contains('Hide').click({force: true}); - cy.get('.octo-board-hidden-item').contains('Group 1').should('exist'); - cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('not.exist'); - - // Step 4: Click "Group 1", then click "Show" in the dropdown - cy.contains('Group 1').click({force: true}); - cy.contains('Show').click({force: true}); - cy.get('.octo-board-hidden-item').should('not.exist'); - cy.get('.KanbanColumnHeader .Editable[value=\'Group 1\']').should('exist'); - }); -}); diff --git a/e2e-tests/cypress/tests/integration/channels/channel/leave_channel_spec.js b/e2e-tests/cypress/tests/integration/channels/channel/leave_channel_spec.js index 154d3308fc..c5a9cefcee 100644 --- a/e2e-tests/cypress/tests/integration/channels/channel/leave_channel_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/channel/leave_channel_spec.js @@ -30,6 +30,13 @@ describe('Leave channel', () => { testUser = user; testTeam = team; + cy.apiSaveUserPreference([{ + user_id: user.id, + category: 'crt_thread_pane_step', + name: user.id, + value: '0', + }], user.id); + cy.apiLogin(testUser); cy.apiCreateChannel(testTeam.id, 'channel', 'channel').then(({channel}) => { testChannel = channel; diff --git a/e2e-tests/cypress/tests/integration/channels/channel/new_channel_with_board_spec.js b/e2e-tests/cypress/tests/integration/channels/channel/new_channel_with_board_spec.js deleted file mode 100644 index 76deb4ed44..0000000000 --- a/e2e-tests/cypress/tests/integration/channels/channel/new_channel_with_board_spec.js +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -// *************************************************************** -// - [#] indicates a test step (e.g. # Go to a page) -// - [*] indicates an assertion (e.g. * Check the title) -// - Use element ID when selecting an element. Create one if none. -// *************************************************************** - -// Stage: @prod -// Group: @channels @channel - -describe('New Channel modal with Boards enabled', () => { - let testTeam; - - before(() => { - cy.apiInitSetup().then(({team}) => { - testTeam = team; - }); - - cy.apiCreateCustomAdmin().then(({sysadmin}) => { - cy.apiLogin(sysadmin); - cy.visit(`/${testTeam.name}/channels/town-square`); - }); - }); - - it('MM-T5141 New Channel is created with an associated Board', () => { - // # Create new channel with board - const channelName = 'Test Channel With Board'; - cy.uiCreateChannel({ - prefix: 'channel-', - isPrivate: false, - purpose: '', - name: channelName, - createBoard: 'Roadmap', - }).then(() => { - // * Verify that new channel is in the sidebar and is active - cy.url().should('include', `/${testTeam.name}/channels/test-channel`); - cy.get('#channelHeaderTitle').should('contain', channelName); - cy.get(`.SidebarChannel.active:contains(${channelName})`).should('be.visible'); - - // * Verify the board is created - check the message sent - cy.waitUntil(() => cy.getLastPost().then((el) => { - const postedMessageEl = el.find('.post-message__text > p')[0]; - return Boolean(postedMessageEl && postedMessageEl.textContent.includes('linked the board')); - })); - }); - }); -}); diff --git a/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/crt_tour_spec.js b/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/crt_tour_spec.js index ea99a56466..cbcd3181b9 100644 --- a/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/crt_tour_spec.js +++ b/e2e-tests/cypress/tests/integration/channels/collapsed_reply_threads/crt_tour_spec.js @@ -25,10 +25,22 @@ describe('Collapsed Reply Threads', () => { }); // # Log in as user that hasn't had CRT enabled before - cy.apiInitSetup({loginAfter: true, promoteNewUserAsAdmin: true, userPrefix: 'tipbutton'}).then(({team, channel}) => { + cy.apiInitSetup({loginAfter: true, promoteNewUserAsAdmin: true, userPrefix: 'tipbutton'}).then(({team, channel, user}) => { testTeam = team; testChannel = channel; + cy.apiSaveUserPreference([{ + user_id: user.id, + category: 'crt_thread_pane_step', + name: user.id, + value: '0', + }, { + user_id: user.id, + category: 'crt_tutorial_triggered', + name: user.id, + value: '0', + }], user.id); + cy.apiCreateUser({prefix: 'other'}).then(({user: user1}) => { otherUser = user1;