Skip to content

Commit

Permalink
Update runner groups and contract tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jguz-pubnub committed Nov 18, 2024
1 parent c9680df commit 1abc5f3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 31 deletions.
48 changes: 20 additions & 28 deletions Tests/PubNubContractTest/PubNubContractCucumberTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -49,34 +49,26 @@ void CucumberishInit(void) {

// TODO: REMOVE AFTER ALL TESTS FOR OBJECTS WILL BE MERGED.
NSArray *includedTags = @[
@"contract=getChannelMetadataOfChat",
@"contract=getChannelMetadataOfDMWithCustom",
@"contract=setChannelMetadataForChat",
@"contract=removeChannelMetadataOfChat",
@"contract=getAllChannelMetadata",
@"contract=getAllChannelMetadataWithCustom",

@"contract=getUUIDMetadataOfAlice",
@"contract=getUUIDMetadataOfBobWithCustom",
@"contract=setUUIDMetadataForAlice",
@"contract=removeUUIDMetadataOfAlice",
@"contract=getAllUUIDMetadata",
@"contract=getAllUUIDMetadataWithCustom",

@"contract=getMembersOfChatChannel",
@"contract=getMembersOfVipChatChannelWithCustomAndUuidWithCustom",
@"contract=setMembersForChatChannel",
@"contract=setMembersForChatChannelWithCustomAndUuidWithCustom",
@"contract=removeMembersForChatChannel",
@"contract=manageMembersForChatChannel",

@"contract=getAliceMemberships",
@"contract=getAliceMemberships",
@"contract=getBobMembershipWithCustomAndChannelCustom",
@"contract=setAliceMembership",
@"contract=removeAliceMembership",
@"contract=manageAliceMemberships"
];
@"contract=sendFileWithType",
@"contract=sendFileWithTooShortType",
@"contract=sendFileWithTooLongType",
@"contract=fetchHistoryWithPubNubMessageTypes",
@"contract=fetchHistoryWithUserAndPubNubTypes",
@"contract=fetchHistoryWithoutTypes",
@"contract=publishWithType",
@"contract=publishWithTooShortType",
@"contract=publishWithTooLongType",
@"contract=publishWithTypeStartingWithReservedStrings",
@"contract=publishWithTypeStartingWithNotAllowedCharacter",
@"contract=publishWithTypeContainingNotAllowedCharacter",
@"contract=signalWithType",
@"contract=signalWithTooShortType",
@"contract=signalWithTooLongType",
@"contract=signalWithTypeStartingWithReservedStrings",
@"contract=signalWithTypeStartingWithNotAllowedCharacter",
@"contract=signalWithTypeContainingNotAllowedCharacter",
@"contract=subscribeReceiveMessagesWithTypes"
];

NSBundle * bundle = [NSBundle bundleForClass:[PubNubContractTestCase class]];
[Cucumberish executeFeaturesInDirectory:@"Features"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public class PubNubFilesContractTestSteps: PubNubContractTestCase {
self.wait(for: [sendFileExpect], timeout: 60.0)
}

When("^I send a file with '(.+)' type$") { args, _ in
When("^I send a file with '(.+)' customMessageType$") { args, _ in
let type = args?.first ?? String()
let sendFileExpect = self.expectation(description: "Send file Response")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class PubNubPublishContractTestSteps: PubNubContractTestCase {
self.wait(for: [publishMessageExpect], timeout: 60.0)
}

When("^I publish message with '(.*)' type$") { args, _ in
When("^I publish message with '(.*)' customMessageType$") { args, _ in
guard let type = args?.first as? String? else {
XCTAssertNotNil(args?.first, "Step match failed")
return
Expand Down Expand Up @@ -96,7 +96,7 @@ public class PubNubPublishContractTestSteps: PubNubContractTestCase {
}


When("^I send a signal with '(.*)' type$") { args, _ in
When("^I send a signal with '(.*)' customMessageType$") { args, _ in
guard let type = args?.last else {
XCTAssertNotNil(args?.first, "Step match failed")
return
Expand Down

0 comments on commit 1abc5f3

Please sign in to comment.