mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-14 08:34:07 -08:00
WIP: e2e fix
This commit is contained in:
parent
8f321a98b4
commit
14c3d7a76f
|
@ -6,8 +6,17 @@ const credentialsModal = new CredentialsModal();
|
|||
|
||||
export const getHomeButton = () => cy.getByTestId('project-home-menu-item');
|
||||
export const getMenuItems = () => cy.getByTestId('project-menu-item');
|
||||
export const getAddProjectButton = () =>
|
||||
cy.getByTestId('add-project-menu-item').should('contain', 'Add project').should('be.visible');
|
||||
export const getAddProjectButton = () => {
|
||||
cy.getByTestId('universal-add').should('be.visible').click();
|
||||
return cy
|
||||
.getByTestId('navigation-menu-item')
|
||||
.should('be.visible')
|
||||
.filter(':contains("Project")')
|
||||
.last();
|
||||
};
|
||||
|
||||
// export const getAddProjectButton = () =>
|
||||
// cy.getByTestId('universal-add').should('contain', 'Add project').should('be.visible');
|
||||
export const getProjectTabs = () => cy.getByTestId('project-tabs').find('a');
|
||||
export const getProjectTabWorkflows = () => getProjectTabs().filter('a[href$="/workflows"]');
|
||||
export const getProjectTabCredentials = () => getProjectTabs().filter('a[href$="/credentials"]');
|
||||
|
|
|
@ -275,7 +275,7 @@ describe('Projects', { disableAutoLogin: true }, () => {
|
|||
cy.changeQuota('maxTeamProjects', -1);
|
||||
});
|
||||
|
||||
it('should filter credentials by project ID when creating new workflow or hard reloading an opened workflow', () => {
|
||||
it.only('should filter credentials by project ID when creating new workflow or hard reloading an opened workflow', () => {
|
||||
cy.signinAsOwner();
|
||||
cy.visit(workflowsPage.url);
|
||||
|
||||
|
|
|
@ -5,7 +5,24 @@ export class CredentialsPage extends BasePage {
|
|||
|
||||
getters = {
|
||||
emptyListCreateCredentialButton: () => cy.getByTestId('empty-resources-list').find('button'),
|
||||
createCredentialButton: () => cy.getByTestId('resources-list-add'),
|
||||
createCredentialButton: () => {
|
||||
cy.getByTestId('resource-add').should('be.visible').click();
|
||||
|
||||
cy.getByTestId('navigation-submenu')
|
||||
.should('be.visible')
|
||||
.filter(':contains("Credential")')
|
||||
.last()
|
||||
|
||||
.click();
|
||||
|
||||
return cy
|
||||
.getByTestId('navigation-submenu-item')
|
||||
.should('be.visible')
|
||||
.filter(':contains("Personal")')
|
||||
.last();
|
||||
},
|
||||
|
||||
// cy.getByTestId('resources-list-add'),
|
||||
searchInput: () => cy.getByTestId('resources-list-search'),
|
||||
emptyList: () => cy.getByTestId('resources-list-empty'),
|
||||
credentialCards: () => cy.getByTestId('resources-list-item'),
|
||||
|
|
|
@ -7,7 +7,22 @@ export class WorkflowsPage extends BasePage {
|
|||
newWorkflowButtonCard: () => cy.getByTestId('new-workflow-card'),
|
||||
newWorkflowTemplateCard: () => cy.getByTestId('new-workflow-template-card'),
|
||||
searchBar: () => cy.getByTestId('resources-list-search'),
|
||||
createWorkflowButton: () => cy.getByTestId('resources-list-add'),
|
||||
createWorkflowButton: () => {
|
||||
cy.getByTestId('resource-add').should('be.visible').click();
|
||||
|
||||
cy.getByTestId('navigation-submenu')
|
||||
.should('be.visible')
|
||||
.filter(':contains("Workflow")')
|
||||
.last()
|
||||
|
||||
.click();
|
||||
|
||||
return cy
|
||||
.getByTestId('navigation-submenu-item')
|
||||
.should('be.visible')
|
||||
.filter(':contains("Personal")')
|
||||
.first();
|
||||
},
|
||||
workflowCards: () => cy.getByTestId('resources-list-item'),
|
||||
workflowCard: (workflowName: string) =>
|
||||
this.getters
|
||||
|
|
|
@ -314,7 +314,7 @@ const { menu, handleSelect: handleMenuSelect } = useGlobalEntityCreation();
|
|||
<template #header>
|
||||
<div :class="$style.logo">
|
||||
<img :src="logoPath" data-test-id="n8n-logo" :class="$style.icon" alt="n8n" />
|
||||
<N8nNavigationDropdown :menu @select="handleMenuSelect">
|
||||
<N8nNavigationDropdown data-test-id="universal-add" :menu @select="handleMenuSelect">
|
||||
<N8nIconButton icon="plus" type="secondary" outline />
|
||||
</N8nNavigationDropdown>
|
||||
</div>
|
||||
|
|
|
@ -73,7 +73,7 @@ const createLabel = computed(() => {
|
|||
</div>
|
||||
<div :class="$style.actions">
|
||||
<ProjectTabs :show-settings="showSettings" />
|
||||
<N8nNavigationDropdown :menu @select="handleSelect">
|
||||
<N8nNavigationDropdown data-test-id="resource-add" :menu @select="handleSelect">
|
||||
<N8nIconButton :label="createLabel" icon="plus" style="width: auto" />
|
||||
</N8nNavigationDropdown>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue