Skip to content

Commit

Permalink
test: add tag xfail to edge firewall tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aloisio-m-bastian committed Dec 13, 2024
1 parent a397d81 commit d7bad3e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const createFunctionCase = () => {
// Act
cy.get(selectors.functions.nameInput).clear()
cy.get(selectors.functions.nameInput).type(fixtures.functionName, { delay: 0 })
cy.intercept('GET', 'api/v3/edge_functions*').as('getEdgeFunctions')
cy.intercept('GET', 'api/v4/edge_functions/functions/*').as('getFunctions2')
cy.get(selectors.edgeApplication.functionsInstance.edgeFunctionActionbar)
.find(selectors.functions.saveButton)
.click()
cy.verifyToast('success', 'Your edge function has been created')
cy.wait('@getEdgeFunctions')
cy.wait('@getFunctions2')
}

describe('Edge Application', { tags: ['@dev3'] }, () => {
Expand Down Expand Up @@ -76,11 +76,13 @@ describe('Edge Application', { tags: ['@dev3'] }, () => {
cy.get(selectors.edgeApplication.rulesEngine.behaviorsDropdown(0)).click()
cy.get(selectors.edgeApplication.rulesEngine.behaviorsOption('Run Function')).click()
cy.get(selectors.edgeApplication.rulesEngine.setFunctionInstanceSelect(0)).click()
cy.intercept('GET', 'api/v4/edge_functions/functions*').as('getFunctions')
cy.get(selectors.edgeApplication.rulesEngine.createFunctionInstanceButton).click()
cy.get(selectors.edgeApplication.functionsInstance.nameInput).clear()
cy.get(selectors.edgeApplication.functionsInstance.nameInput).type(
fixtures.functionInstanceName
)
cy.wait('@getFunctions')
cy.get(selectors.edgeApplication.functionsInstance.edgeFunctionsDropdown).click()
cy.get(selectors.edgeApplication.functionsInstance.createFunctionButton).click()
createFunctionCase()
Expand All @@ -103,7 +105,7 @@ describe('Edge Application', { tags: ['@dev3'] }, () => {
.click()

cy.get(selectors.form.actionsSubmitButton).click()
cy.verifyToast('success', 'Your Rules Engine has been created.')
cy.verifyToast('success', 'Rule successfully created')

// Assert
cy.get(selectors.list.searchInput).type(`${fixtures.rulesEngineName}{enter}`)
Expand Down
4 changes: 2 additions & 2 deletions cypress/e2e/edge-firewall/create-edge-firewall-function.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ const createFunctionCase = () => {
cy.verifyToast('success', 'Your edge function has been created')
cy.wait('@getFunctionsSaved')
}

describe('Edge Firewall spec', { tags: ['@dev5'] }, () => {
//Flag xfail until the api contract is updated on prod
describe('Edge Firewall spec', { tags: ['@dev5, @xfail'] }, () => {
beforeEach(() => {
cy.login()
firewallName = generateUniqueName('EdgeFirewall')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import selectors from '../../support/selectors'

let firewallName, ruleName

describe('Edge Firewall spec', { tags: ['@dev5'] }, () => {
//Flag xfail until the api contract is updated on prod
describe('Edge Firewall spec', { tags: ['@dev5, @xfail'] }, () => {
beforeEach(() => {
cy.login()
firewallName = generateUniqueName('EdgeFirewall')
Expand Down
2 changes: 1 addition & 1 deletion cypress/e2mock/teams-permissions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ describe('Teams Permissions Spec', { tags: ['@dev2'] }, () => {

it('should block users without access of entering in the edit page', function () {
//act
cy.get(selectors.list.searchField).type('Default Team')
cy.get(selectors.list.searchField).type('Default Team {enter}')
cy.intercept('GET', '/api/v4/iam/teams/*', { statusCode: 403, body: fixtures.errorMessage }).as(
'teamsPermissions'
)
Expand Down

0 comments on commit d7bad3e

Please sign in to comment.