@centreon/js-config 25.6.4 → 25.6.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cypress/e2e/commands.ts +7 -0
- package/cypress/e2e/tasks.ts +5 -0
- package/package.json +1 -1
package/cypress/e2e/commands.ts
CHANGED
|
@@ -166,6 +166,12 @@ Cypress.Commands.add('getContainersLogs', () => {
|
|
|
166
166
|
return cy.task('getContainersLogs');
|
|
167
167
|
});
|
|
168
168
|
|
|
169
|
+
Cypress.Commands.add('getContainerMappedPort', (containerName: string, containerPort: number) => {
|
|
170
|
+
cy.log(`Getting mapped port ${containerPort} of container ${containerName}`);
|
|
171
|
+
|
|
172
|
+
return cy.task('getContainerMappedPort', { containerName, containerPort });
|
|
173
|
+
});
|
|
174
|
+
|
|
169
175
|
interface CopyFromContainerProps {
|
|
170
176
|
destination: string;
|
|
171
177
|
name?: string;
|
|
@@ -916,6 +922,7 @@ declare global {
|
|
|
916
922
|
getContainerId: (containerName: string) => Cypress.Chainable;
|
|
917
923
|
getContainerIpAddress: (containerName: string) => Cypress.Chainable;
|
|
918
924
|
getContainersLogs: () => Cypress.Chainable;
|
|
925
|
+
getContainerMappedPort: (containerName: string, containerPort: number) => Cypress.Chainable;
|
|
919
926
|
getIframeBody: () => Cypress.Chainable;
|
|
920
927
|
getLogDirectory: () => Cypress.Chainable;
|
|
921
928
|
getTimeFromHeader: () => Cypress.Chainable;
|
package/cypress/e2e/tasks.ts
CHANGED
|
@@ -139,6 +139,11 @@ export default (on: Cypress.PluginEvents): void => {
|
|
|
139
139
|
return null;
|
|
140
140
|
}
|
|
141
141
|
},
|
|
142
|
+
getContainerMappedPort: async ({ containerName, containerPort }) => {
|
|
143
|
+
const container = getContainer(containerName);
|
|
144
|
+
|
|
145
|
+
return container.getMappedPort(containerPort);
|
|
146
|
+
},
|
|
142
147
|
requestOnDatabase: async ({ database, query }) => {
|
|
143
148
|
let container: StartedTestContainer | null = null;
|
|
144
149
|
|
package/package.json
CHANGED