-
Notifications
You must be signed in to change notification settings - Fork 264
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
automation: assign cluster to fleet workspace
- Loading branch information
Yonas Berhe
authored and
Yonas Berhe
committed
Dec 11, 2024
1 parent
050baf0
commit 30fc76e
Showing
4 changed files
with
105 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import ComponentPo from '@/cypress/e2e/po/components/component.po'; | ||
import AsyncButtonPo from '@/cypress/e2e/po/components/async-button.po'; | ||
import LabeledSelectPo from '@/cypress/e2e/po/components/labeled-select.po'; | ||
|
||
export default class AssignToDialogPo extends ComponentPo { | ||
constructor(selector = '[data-testid="card"]') { | ||
super(selector); | ||
} | ||
|
||
workspaceSelect(): LabeledSelectPo { | ||
return new LabeledSelectPo('[data-testid="workspace_options"]'); | ||
} | ||
|
||
applyButton() { | ||
return new AsyncButtonPo('[data-testid="action-button-async-button"]', this.self()); | ||
} | ||
|
||
applyAndWait(endpoint: string) { | ||
cy.intercept('PUT', endpoint).as(endpoint); | ||
this.applyButton().click(); | ||
cy.wait(`@${ endpoint }`).its('response.statusCode').should('eq', 200); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters